Skip to content

Commit 743f4c9

Browse files
committed
build: ignore handling region/endregion
1 parent 2d078e8 commit 743f4c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/emnapi/script/preprocess.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class Compilation {
9898
if (matchResult = this.lines[lineNumber].match(/^\s*\/\/\s*#else\s*$/)) return this._elseDirective(lineNumber)
9999
if (matchResult = this.lines[lineNumber].match(/^\s*\/\/\s*#endif\s*$/)) return this._endifDirective(lineNumber)
100100
if (matchResult = this.lines[lineNumber].match(/^\s*\/\/\s*#error\s+(.+?)\s*$/)) return this._errorDirective(lineNumber, matchResult[1])
101+
if (matchResult = this.lines[lineNumber].match(/^\s*\/\/\s*#(region|endregion)/)) return -1
101102

102103
throw new Error(`Syntax error: ${this.lines[lineNumber]}`)
103104
}

0 commit comments

Comments
 (0)