aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-05-12 14:57:41 +0800
committerGitHub <noreply@github.com>2017-05-12 14:57:41 +0800
commitc391576d52852322a7fcfbaeabc9d5626e628c8b (patch)
treee0f27ac065ec9340bcd5bcd152f8714cf79fdcc9 /lib/ast.js
parentac73c5d4211b9ecff0f9650a032e964ef1cad585 (diff)
downloadtracifyjs-c391576d52852322a7fcfbaeabc9d5626e628c8b.tar.gz
tracifyjs-c391576d52852322a7fcfbaeabc9d5626e628c8b.zip
remove support for `const` (#1910)
As this is not part of ES5.
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 962c8f7b..57956233 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -495,10 +495,10 @@ var AST_Finally = DEFNODE("Finally", null, {
$documentation: "A `finally` node; only makes sense as part of a `try` statement"
}, AST_Block);
-/* -----[ VAR/CONST ]----- */
+/* -----[ VAR ]----- */
var AST_Definitions = DEFNODE("Definitions", "definitions", {
- $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)",
+ $documentation: "Base class for `var` nodes (variable declarations/initializations)",
$propdoc: {
definitions: "[AST_VarDef*] array of variable definitions"
},
@@ -516,14 +516,10 @@ var AST_Var = DEFNODE("Var", null, {
$documentation: "A `var` statement"
}, AST_Definitions);
-var AST_Const = DEFNODE("Const", null, {
- $documentation: "A `const` statement"
-}, AST_Definitions);
-
var AST_VarDef = DEFNODE("VarDef", "name value", {
$documentation: "A variable declaration; only appears in a AST_Definitions node",
$propdoc: {
- name: "[AST_SymbolVar|AST_SymbolConst] name of the variable",
+ name: "[AST_SymbolVar] name of the variable",
value: "[AST_Node?] initializer, or null of there's no initializer"
},
_walk: function(visitor) {
@@ -728,17 +724,13 @@ var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, {
}, AST_Symbol);
var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", {
- $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)",
+ $documentation: "A declaration symbol (symbol in var, function name or argument, symbol in catch)",
}, AST_Symbol);
var AST_SymbolVar = DEFNODE("SymbolVar", null, {
$documentation: "Symbol defining a variable",
}, AST_SymbolDeclaration);
-var AST_SymbolConst = DEFNODE("SymbolConst", null, {
- $documentation: "A constant declaration"
-}, AST_SymbolDeclaration);
-
var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, {
$documentation: "Symbol naming a function argument",
}, AST_SymbolVar);