Commit 65cd03c
src: wrap source before doing syntax check
This is to ensure that it is evaluated the same way it would be if it
were to be run by node or required.
Before, the following would pass if run by node, but fail if run via
the syntax check flag:
if (true) {
return;
}
Now, this will pass the syntax check
PR-URL: #3587
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>1 parent 1e98d90 commit 65cd03cCopy full SHA for 65cd03c
File tree
Expand file treeCollapse file tree
3 files changed
+6
-0
lines changedOpen diff view settings
Filter options
- src
- test
- fixtures/syntax
- parallel
Expand file treeCollapse file tree
3 files changed
+6
-0
lines changedOpen diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
106 | 106 | |
107 | 107 | |
108 | 108 | |
| 109 | + |
| 110 | + |
109 | 111 | |
110 | 112 | |
111 | 113 | |
|
Collapse file
test/fixtures/syntax/illegal_if_not_wrapped.js
Copy file name to clipboard+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
Collapse file
test/parallel/test-cli-syntax.js
Copy file name to clipboardExpand all lines: test/parallel/test-cli-syntax.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
| 23 | + |
23 | 24 | |
24 | 25 | |
25 | 26 | |
|
0 commit comments