aboutsummaryrefslogtreecommitdiff
path: root/lib/parse.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parse.js')
-rw-r--r--lib/parse.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/parse.js b/lib/parse.js
index 981c1294..b054c727 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -1105,12 +1105,12 @@ function parse($TEXT, options) {
});
};
- function vardefs(no_in) {
+ function vardefs(no_in, in_const) {
var a = [];
for (;;) {
a.push(new AST_VarDef({
start : S.token,
- name : as_symbol(AST_SymbolVar),
+ name : as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar),
value : is("operator", "=") ? (next(), expression(false, no_in)) : null,
end : prev()
}));
@@ -1124,7 +1124,7 @@ function parse($TEXT, options) {
var var_ = function(no_in) {
return new AST_Var({
start : prev(),
- definitions : vardefs(no_in),
+ definitions : vardefs(no_in, false),
end : prev()
});
};
@@ -1132,7 +1132,7 @@ function parse($TEXT, options) {
var const_ = function() {
return new AST_Const({
start : prev(),
- definitions : vardefs(),
+ definitions : vardefs(false, true),
end : prev()
});
};