Fixes #1042
This commit is contained in:
parent
9df5f3d571
commit
edaeaadf99
|
@ -85,7 +85,7 @@ namespace Antlr4.Runtime
|
|||
protected virtual IDictionary<string, int> CreateTokenTypeMap(IVocabulary vocabulary)
|
||||
{
|
||||
var result = new Dictionary<string, int>();
|
||||
for (int i = 0; i < Atn.maxTokenType; i++)
|
||||
for (int i = 0; i <= Atn.maxTokenType; i++)
|
||||
{
|
||||
string literalName = vocabulary.GetLiteralName(i);
|
||||
if (literalName != null)
|
||||
|
|
Loading…
Reference in New Issue