refactor
This commit is contained in:
parent
797aa1d035
commit
38b01e67dc
|
|
@ -540,11 +540,6 @@ function parseFile(code, file) {
|
||||||
return toplevel;
|
return toplevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
function FakeSymbolDef(name, id) {
|
|
||||||
this.name = name;
|
|
||||||
this.id = id;
|
|
||||||
};
|
|
||||||
|
|
||||||
function extendAst(root){
|
function extendAst(root){
|
||||||
var current_id = 0;
|
var current_id = 0;
|
||||||
|
|
||||||
|
|
@ -565,14 +560,6 @@ function extendAst(root){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node instanceof AST_Symbol) {
|
if (node instanceof AST_Symbol) {
|
||||||
// if (node.definition() == null && node instanceof AST_This){
|
|
||||||
// var scope = node;
|
|
||||||
// while (!(scope instanceof AST_Lambda) && scope.parent != null){
|
|
||||||
// scope = scope.parent;
|
|
||||||
// }
|
|
||||||
// var name = nodeToString(scope);
|
|
||||||
// node.thedef = new FakeSymbolDef(name + "_this", scope.id);
|
|
||||||
// } else {
|
|
||||||
if (node.definition() != null) {
|
if (node.definition() != null) {
|
||||||
node.definition().id = current_id;
|
node.definition().id = current_id;
|
||||||
current_id++;
|
current_id++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user