Updated README and bin utility to be aware of ES6 support.
This commit is contained in:
parent
3ee9e288a2
commit
a061f1f0a6
@ -50,8 +50,7 @@ object referring to that same position.
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, or 6. This influences support for strict mode, the set
|
||||
of reserved words, and support for getters and setter. Default is 5.
|
||||
ES6 is only partially supported.
|
||||
of reserved words, and support for new syntax features. Default is 5.
|
||||
|
||||
- **strictSemicolons**: If `true`, prevents the parser from doing
|
||||
automatic semicolon insertion, and statements that do not end with
|
||||
|
||||
@ -8,7 +8,7 @@ var infile, parsed, options = {}, silent = false, compact = false;
|
||||
|
||||
function help(status) {
|
||||
var print = (status == 0) ? console.log : console.error;
|
||||
print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5] [--strictSemicolons]");
|
||||
print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6] [--strictSemicolons]");
|
||||
print(" [--locations] [--compact] [--silent] [--help] [--] infile");
|
||||
process.exit(status);
|
||||
}
|
||||
@ -19,6 +19,7 @@ for (var i = 2; i < process.argv.length; ++i) {
|
||||
else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i];
|
||||
else if (arg == "--ecma3") options.ecmaVersion = 3;
|
||||
else if (arg == "--ecma5") options.ecmaVersion = 5;
|
||||
else if (arg == "--ecma6") options.ecmaVersion = 6;
|
||||
else if (arg == "--strictSemicolons") options.strictSemicolons = true;
|
||||
else if (arg == "--locations") options.locations = true;
|
||||
else if (arg == "--silent") silent = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user