Skip to content

Commit

Permalink
added support for [ and ] to the scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
barcharcraz committed Aug 5, 2014
1 parent 3d9c5da commit 0aa2c17
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion NimrodVS/NimrodScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public enum TTokenClass : int
gtOperator, gtPunctation, gtComment, gtLongComment, gtRegularExpression,
gtTagStart, gtTagEnd, gtKey, gtValue, gtRawData, gtAssembler,
gtPreprocessor, gtDirective, gtCommand, gtRule, gtHyperlink, gtLabel,
gtReference, gtOther, tkCurlyDorLe, tkCurlyDotRi, tkDot, tkParLe, tkParRi, tkComma
gtReference, gtOther, tkCurlyDorLe, tkCurlyDotRi, tkDot, tkParLe, tkParRi, tkComma,
tkBracketLe, tkBracketRe
}
static class LanguageConstants
{
Expand Down Expand Up @@ -232,6 +233,18 @@ public void advanceOne(NimrodScannerFlags flags)
end = start + 1;
tokenEnd = start + 1;
}
else if (m_source[start] == '[')
{
kind = TTokenClass.tkBracketLe;
end = start + 1;
tokenEnd = start + 1;
}
else if (m_source[start] == ']')
{
kind = TTokenClass.tkBracketRe;
end = start + 1;
tokenEnd = start + 1;
}
else
{

Expand Down

0 comments on commit 0aa2c17

Please sign in to comment.