Skip to content

Commit 18718f1

Browse files
committed
fixes #1012 (macroIfThenElse blocks now allows, well, content inside them)
1 parent 5390b13 commit 18718f1

File tree

2 files changed

+2523
-2439
lines changed

2 files changed

+2523
-2439
lines changed

Rubberduck.Parsing/Grammar/VBA.g4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,17 @@ macroIfThenElseStmt : macroIfBlockStmt macroElseIfBlockStmt* macroElseBlockStmt?
360360

361361
macroIfBlockStmt :
362362
MACRO_IF WS? ifConditionStmt WS THEN NEWLINE+
363-
(moduleBody NEWLINE+)?
363+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)?
364364
;
365365

366366
macroElseIfBlockStmt :
367367
MACRO_ELSEIF WS? ifConditionStmt WS THEN NEWLINE+
368-
(moduleBody NEWLINE+)?
368+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)?
369369
;
370370

371371
macroElseBlockStmt :
372372
MACRO_ELSE NEWLINE+
373-
(moduleBody NEWLINE+)?
373+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)?
374374
;
375375

376376
midStmt : MID WS? LPAREN WS? argsCall WS? RPAREN;

0 commit comments

Comments
 (0)