Fixed problem in startsWith. Fixed grammar error
This commit is contained in:
parent
0cc768260e
commit
ebbb1907d1
|
@ -111,7 +111,7 @@ struct Parser
|
||||||
* Parses an AliasDeclaration.
|
* Parses an AliasDeclaration.
|
||||||
*
|
*
|
||||||
* $(GRAMMAR $(RULEDEF aliasDeclaration):
|
* $(GRAMMAR $(RULEDEF aliasDeclaration):
|
||||||
* $(LITERAL 'alias') $(RULE aliasInitializer) $(LPAREN)$(LITERAL ',') $(RULE aliasInitializer)$(RPAREN)*
|
* $(LITERAL 'alias') $(RULE aliasInitializer) $(LPAREN)$(LITERAL ',') $(RULE aliasInitializer)$(RPAREN)* $(LITERAL ';')
|
||||||
* | $(LITERAL 'alias') $(RULE type) $(LITERAL identifier) $(LITERAL ';')
|
* | $(LITERAL 'alias') $(RULE type) $(LITERAL identifier) $(LITERAL ';')
|
||||||
* ;)
|
* ;)
|
||||||
*/
|
*/
|
||||||
|
@ -6423,7 +6423,7 @@ private:
|
||||||
|
|
||||||
bool startsWith(TokenType[] types...) const nothrow
|
bool startsWith(TokenType[] types...) const nothrow
|
||||||
{
|
{
|
||||||
if (index >= tokens.length)
|
if (index + types.length >= tokens.length)
|
||||||
return false;
|
return false;
|
||||||
for (size_t i = 0; (i < types.length) && ((index + i) < tokens.length); ++i)
|
for (size_t i = 0; (i < types.length) && ((index + i) < tokens.length); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue