2 * @fileoverview The list of feature flags supported by the parser and their default
4 * @author Nicholas C. Zakas
5 * @copyright 2015 Fred K. Schott. All rights reserved.
6 * @copyright 2014 Nicholas C. Zakas. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 //------------------------------------------------------------------------------
33 //------------------------------------------------------------------------------
37 //------------------------------------------------------------------------------
39 //------------------------------------------------------------------------------
43 // enable parsing of arrow functions
44 arrowFunctions: false,
46 // enable parsing of let and const
49 // enable parsing of destructured arrays and objects
52 // enable parsing of regex u flag
55 // enable parsing of regex y flag
58 // enable parsing of template strings
59 templateStrings: false,
61 // enable parsing binary literals
62 binaryLiterals: false,
64 // enable parsing ES6 octal literals
67 // enable parsing unicode code point escape sequences
68 unicodeCodePointEscapes: true,
70 // enable parsing of default parameters
73 // enable parsing of rest parameters
76 // enable parsing of for-of statements
79 // enable parsing computed object literal properties
80 objectLiteralComputedProperties: false,
82 // enable parsing of shorthand object literal methods
83 objectLiteralShorthandMethods: false,
85 // enable parsing of shorthand object literal properties
86 objectLiteralShorthandProperties: false,
88 // Allow duplicate object literal properties (except '__proto__')
89 objectLiteralDuplicateProperties: false,
91 // enable parsing of generators/yield
94 // support the spread operator
97 // enable super in functions
98 superInFunctions: false,
100 // enable parsing of classes
103 // enable parsing of modules
109 // allow return statement in global scope