File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,9 @@ options:
250
250
- ` --allow-hash-bang ` : If the code starts with the characters #! (as
251
251
in a shellscript), the first line will be treated as a comment.
252
252
253
+ - ` --allow-await-outside-function ` : Allows top-level ` await ` expressions.
254
+ See the ` allowAwaitOutsideFunction ` option for more information.
255
+
253
256
- ` --compact ` : No whitespace is used in the AST output.
254
257
255
258
- ` --silent ` : Do not output the AST, just return the exit status.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const options = {}
8
8
function help ( status ) {
9
9
const print = ( status === 0 ) ? console . log : console . error
10
10
print ( "usage: " + basename ( process . argv [ 1 ] ) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]" )
11
- print ( " [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]" )
11
+ print ( " [--tokenize] [--locations] [---allow-hash-bang] [--allow-await-outside-function] [-- compact] [--silent] [--module] [--help] [--] [infile]" )
12
12
process . exit ( status )
13
13
}
14
14
@@ -18,6 +18,7 @@ for (let i = 2; i < process.argv.length; ++i) {
18
18
else if ( arg === "--" && ! infile && i + 2 === process . argv . length ) forceFile = infile = process . argv [ ++ i ]
19
19
else if ( arg === "--locations" ) options . locations = true
20
20
else if ( arg === "--allow-hash-bang" ) options . allowHashBang = true
21
+ else if ( arg === "--allow-await-outside-function" ) options . allowAwaitOutsideFunction = true
21
22
else if ( arg === "--silent" ) silent = true
22
23
else if ( arg === "--compact" ) compact = true
23
24
else if ( arg === "--help" ) help ( 0 )
You can’t perform that action at this time.
0 commit comments