Skip to content

Commit b110234

Browse files
committed
Correct typos in comment in the parser grammar
1 parent 189b5a3 commit b110234

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Rubberduck.Parsing/Grammar/VBAParser.g4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,9 @@ subscript : (expression whiteSpace TO whiteSpace)? expression;
580580
unrestrictedIdentifier : identifier | statementKeyword | markerKeyword;
581581
legalLabelIdentifier : { !(new[]{DOEVENTS,END,CLOSE,ELSE,LOOP,NEXT,RANDOMIZE,REM,RESUME,RETURN,STOP,WEND}).Contains(_input.La(1))}? identifier | markerKeyword;
582582
//The predicate in the following rule has been introduced to lessen the problem that VBA uses the same characters used as type hints in other syntactical constructs,
583-
//e.g. in the bang notation (see withDictionaryAccessExpr). Generally, it is not legal to have an identifier of openeing bracket follow immediately after a type hint.
584-
//The first part of the predicate tries to exclude these two situations. Unfortunately, predicates have to be at the start of a rule. S, an assumprion about the number
585-
//of tokens in the identifier is made. All untypedIdentifers not a foreignNames consist of exactly one token and a typedIdentifier is an untypes one followed by a typeHint,
583+
//e.g. in the bang notation (see withDictionaryAccessExpr). Generally, it is not legal to have an identifier or opening bracket follow immediately after a type hint.
584+
//The first part of the predicate tries to exclude these two situations. Unfortunately, predicates have to be at the start of a rule. So, an assumption about the number
585+
//of tokens in the identifier is made. All untypedIdentifers not a foreignNames consist of exactly one token and a typedIdentifier is an untyped one followed by a typeHint,
586586
//again a single token. So, in the majority of situations, the third token is the token following the potential type hint.
587587
//For foreignNames, no assumption can be made because they consist of a pair of brackets containing arbitrarily many tokens.
588588
//That is why the second part of the predicate looks at the first character in order to determine whether the identifier is a foreignName.

0 commit comments

Comments
 (0)