Skip to content

Commit 8ed900e

Browse files
author
Andrin Meier
committed
remove macro/compilation directives (removed by preprocessor)
1 parent 67f4810 commit 8ed900e

File tree

7 files changed

+24352
-27708
lines changed

7 files changed

+24352
-27708
lines changed

Rubberduck.Parsing/Grammar/VBA.g4

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,8 @@ moduleDeclarationsElement :
6767
| variableStmt
6868
| moduleOption
6969
| typeStmt
70-
| macroStmt
7170
;
7271

73-
macroStmt :
74-
macroConstStmt
75-
| macroIfThenElseStmt;
76-
7772
moduleBody :
7873
moduleBodyElement (endOfStatement moduleBodyElement)* endOfStatement;
7974

@@ -83,7 +78,6 @@ moduleBodyElement :
8378
| propertySetStmt
8479
| propertyLetStmt
8580
| subStmt
86-
| macroStmt
8781
;
8882

8983

@@ -126,7 +120,6 @@ blockStmt :
126120
| loadStmt
127121
| lockStmt
128122
| lsetStmt
129-
| macroStmt
130123
| midStmt
131124
| mkdirStmt
132125
| nameStmt
@@ -291,25 +284,6 @@ lockStmt : LOCK WS valueStmt (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?;
291284

292285
lsetStmt : LSET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt;
293286

294-
macroConstStmt : MACRO_CONST WS? ambiguousIdentifier WS? EQ WS? valueStmt;
295-
296-
macroIfThenElseStmt : macroIfBlockStmt macroElseIfBlockStmt* macroElseBlockStmt? MACRO_END_IF;
297-
298-
macroIfBlockStmt :
299-
MACRO_IF WS? ifConditionStmt WS THEN endOfStatement
300-
(moduleDeclarations | moduleBody | block)*
301-
;
302-
303-
macroElseIfBlockStmt :
304-
MACRO_ELSEIF WS? ifConditionStmt WS THEN endOfStatement
305-
(moduleDeclarations | moduleBody | block)*
306-
;
307-
308-
macroElseBlockStmt :
309-
MACRO_ELSE endOfStatement
310-
(moduleDeclarations | moduleBody | block)*
311-
;
312-
313287
midStmt : MID WS? LPAREN WS? argsCall WS? RPAREN;
314288

315289
mkdirStmt : MKDIR WS valueStmt;
@@ -725,11 +699,6 @@ LOCK_READ : L O C K WS R E A D;
725699
LOCK_WRITE : L O C K WS W R I T E;
726700
LOCK_READ_WRITE : L O C K WS R E A D WS W R I T E;
727701
LSET : L S E T;
728-
MACRO_CONST : '#' C O N S T;
729-
MACRO_IF : '#' I F;
730-
MACRO_ELSEIF : '#' E L S E I F;
731-
MACRO_ELSE : '#' E L S E;
732-
MACRO_END_IF : '#' E N D WS? I F;
733702
ME : M E;
734703
MID : M I D;
735704
MKDIR : M K D I R;

Rubberduck.Parsing/Grammar/VBABaseListener.cs

Lines changed: 2226 additions & 2306 deletions
Large diffs are not rendered by default.

Rubberduck.Parsing/Grammar/VBABaseVisitor.cs

Lines changed: 1874 additions & 1942 deletions
Large diffs are not rendered by default.

Rubberduck.Parsing/Grammar/VBALexer.cs

Lines changed: 1158 additions & 1186 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)