enhance evaluate (#3649)

This commit is contained in:
Alex Lam S.L
2019-12-28 20:26:15 +00:00
committed by GitHub
parent 22b47cdd63
commit d9cd3d33c8
6 changed files with 153 additions and 41 deletions

View File

@@ -618,7 +618,7 @@ var AST_PropAccess = DEFNODE("PropAccess", "expression property", {
getProperty: function() {
var p = this.property;
if (p instanceof AST_Constant) {
return p.getValue();
return p.value;
}
if (p instanceof AST_UnaryPrefix
&& p.operator == "void"
@@ -824,9 +824,6 @@ var AST_This = DEFNODE("This", null, {
var AST_Constant = DEFNODE("Constant", null, {
$documentation: "Base class for all constants",
getValue: function() {
return this.value;
}
});
var AST_String = DEFNODE("String", "value quote", {