| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e98d90 commit 65cd03c
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -106,6 +106,8 @@ | |||
| 106 | 106 | var source = fs.readFileSync(filename, 'utf-8'); | |
| 107 | 107 | // remove shebang and BOM | |
| 108 | 108 | source = internalModule.stripBOM(source.replace(/^\#\!.*/, '')); | |
| 109 | + // wrap it | ||
| 110 | + source = Module.wrap(source); | ||
| 109 | 111 | // compile the script, this will throw if it fails | |
| 110 | 112 | new vm.Script(source, {filename: filename, displayErrors: true}); | |
| 111 | 113 | process.exit(0); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + if (true) { | ||
| 2 | + return; | ||
| 3 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ var syntaxArgs = [ | |||
| 20 | 20 | 'syntax/good_syntax', | |
| 21 | 21 | 'syntax/good_syntax_shebang.js', | |
| 22 | 22 | 'syntax/good_syntax_shebang', | |
| 23 | + 'syntax/illegal_if_not_wrapped.js' | ||
| 23 | 24 | ].forEach(function(file) { | |
| 24 | 25 | file = path.join(common.fixturesDir, file); | |
| 25 | 26 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments