Skip to content

Commit 7042dda

Browse files
committed
Add handling for With blocks
1 parent 70f0825 commit 7042dda

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
]
119119
},
120120
"scripts": {
121-
"vscode:prepublish": "npm run antlr4ngPre && npm run antlr4ng && npm run textMate && npm run compile",
121+
"vscode:prepublish": "npm run textMate && npm run antlr",
122122
"compile": "tsc -b",
123123
"watch": "tsc -b -w",
124124
"lint": "eslint ./client/src ./server/src --ext .ts,.tsx",

server/src/antlr/vbafmt.g4

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ documentElement
4949
| ifElseBlock
5050
| selectCaseBlock
5151
| whileBlock
52+
| withBlock
5253
| basicStatement
5354
| blankLine
5455
;
@@ -105,6 +106,12 @@ methodClose
105106
: ws? END ws (SUB | FUNCTION | PROPERTY)
106107
;
107108

109+
withBlock
110+
: ws? WITH ws expression endOfStatement
111+
block?
112+
END ws WITH endOfStatement
113+
;
114+
108115
block
109116
: documentElement+
110117
;
@@ -423,6 +430,10 @@ UNDERSCORE
423430
: '_'
424431
;
425432

433+
WITH
434+
: 'WITH'
435+
;
436+
426437
TAB
427438
: '\t'+
428439
;

0 commit comments

Comments
 (0)