C++ compiler.
Add an extra flag in the JSON AST to tell apart "x->f" (field access) and "x->f()" (which actually means "f(x)").
This commit is contained in:
Родитель
10c7f04346
Коммит
45ccbfae36
|
@ -553,6 +553,7 @@ module TDev.AST.Json
|
|||
var r = this.visitPropertyRef(n.propRef)
|
||||
r.nodeType = "call";
|
||||
r.args = this.toJsons(n.args);
|
||||
r.isExtensionMethod = n.propRef.prop instanceof AST.ExtensionProperty;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,6 +126,11 @@ module TDev.AST.Json
|
|||
export interface JCall extends JPropertyRef, JExpr
|
||||
{
|
||||
args:JExpr[];
|
||||
// The field below allows to tell the difference between f->x (a
|
||||
// reference to a field from a record, for which [isExtensionMethod] is
|
||||
// false) and f->x() (a call to function x which takes f as a parameter,
|
||||
// but that is represented as an "extension method")
|
||||
isExtensionMethod: boolean;
|
||||
}
|
||||
|
||||
// Expressions can be represented in two different manners.
|
||||
|
|
|
@ -31,6 +31,7 @@ module TDev {
|
|||
}],
|
||||
name: libs[i].name,
|
||||
parent: null,
|
||||
isExtensionMethod: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче