Skip to content

Commit c193a3a

Browse files
committed
fixes #1063
1 parent fb596db commit c193a3a

File tree

4 files changed

+401
-424
lines changed

4 files changed

+401
-424
lines changed

Rubberduck.Parsing/Grammar/VBA.g4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
* - modified NEWLINE lexer rule to properly support instructions separator (':').
7070
* - tightened DATELITERAL lexer rule to the format enforced by the VBE, because "#fn: Close #"
7171
* in "Dim fn: fn = FreeFile: Open "filename" For Output As #fn: Close #fn" was picked up as a date literal.
72+
* - redefined IDENTIFIER lexer rule to support non-Latin characters (e.g. Japanese)
73+
* - made seekStmt, lockStmt, unlockStmt, getStmt and widthStmt accept a fileNumber (needed to support '#')
74+
* - fixed precompiler directives, which can now be nested. they still can't interfere with other blocks though.
75+
* - optional parameters can be a valueStmt.
7276
*
7377
*======================================================================================
7478
*
@@ -629,7 +633,7 @@ argList : LPAREN (WS? arg (WS? ',' WS? arg)*)? WS? RPAREN;
629633

630634
arg : (OPTIONAL WS)? ((BYVAL | BYREF) WS)? (PARAMARRAY WS)? ambiguousIdentifier (WS? LPAREN WS? RPAREN)? (WS? asTypeClause)? (WS? argDefaultValue)?;
631635

632-
argDefaultValue : EQ WS? (literal | ambiguousIdentifier);
636+
argDefaultValue : EQ WS? valueStmt;
633637

634638
subscripts : subscript (WS? ',' WS? subscript)*;
635639

0 commit comments

Comments
 (0)