Skip to content

Commit

Permalink
fix line continuations are allowed between the dictionary call '!' op…
Browse files Browse the repository at this point in the history
…erator (#1145)
  • Loading branch information
Andrin Meier committed Feb 26, 2016
1 parent be13076 commit 8297738
Show file tree
Hide file tree
Showing 3 changed files with 1,102 additions and 988 deletions.
12 changes: 6 additions & 6 deletions Rubberduck.Parsing/Grammar/VBA.g4
Expand Up @@ -511,7 +511,7 @@ implicitCallStmt_InBlock :
| iCS_B_ProcedureCall
;

iCS_B_MemberProcedureCall : implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS argsCall)? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*;
iCS_B_MemberProcedureCall : implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS argsCall)? (WS? dictionaryCallStmt)? (WS? LPAREN subscripts RPAREN)*;

This comment has been minimized.

Copy link
@retailcoder

retailcoder Feb 26, 2016

Member

Nice catch! I believe there should also be a WS? token before/after the dot, too.


// parantheses are forbidden in case of args
// variables cannot be called in blocks
Expand All @@ -527,15 +527,15 @@ implicitCallStmt_InStmt :
| iCS_S_DictionaryCall
;

iCS_S_VariableOrProcedureCall : ambiguousIdentifier typeHint? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*;
iCS_S_VariableOrProcedureCall : ambiguousIdentifier typeHint? (WS? dictionaryCallStmt)? (WS? LPAREN subscripts RPAREN)*;

iCS_S_ProcedureOrArrayCall : (ambiguousIdentifier | baseType) typeHint? WS? LPAREN WS? (argsCall WS?)? RPAREN dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*;
iCS_S_ProcedureOrArrayCall : (ambiguousIdentifier | baseType) typeHint? WS? LPAREN WS? (argsCall WS?)? RPAREN (WS? dictionaryCallStmt)? (WS? LPAREN subscripts RPAREN)*;

iCS_S_MembersCall : (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall)? (iCS_S_MemberCall WS?)+ dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*;
iCS_S_MembersCall : (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall)? (iCS_S_MemberCall WS?)+ (WS? dictionaryCallStmt)? (WS? LPAREN subscripts RPAREN)*;

iCS_S_MemberCall : ('.' | '!') (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall);

iCS_S_DictionaryCall : dictionaryCallStmt;
iCS_S_DictionaryCall : WS? dictionaryCallStmt;


// atomic call statements ----------------------------------
Expand All @@ -544,7 +544,7 @@ argsCall : (argCall? WS? (',' | ';') WS?)* argCall (WS? (',' | ';') WS? argCall?

argCall : LPAREN? ((BYVAL | BYREF | PARAMARRAY) WS)? RPAREN? valueStmt;

dictionaryCallStmt : '!' ambiguousIdentifier typeHint?;
dictionaryCallStmt : '!' WS? ambiguousIdentifier typeHint?;


// atomic rules for statements
Expand Down

0 comments on commit 8297738

Please sign in to comment.