Class SymbolResolver

Hierarchy (view full)

Constructors

Properties

currentScope: null | Scope = null

Represents the scope where the resolver has descended. It initially is null, but the resolver should encounter a NodeWithScope and set this to the scope of that node.

isInCallee: boolean = false

Methods

  • visitFunctionCallExpr switches the SymbolResolver into a special mode where it falls back to resolving named functions when processing lookup expressions. This behaviour tries to mimic the behaviour of OpenSCAD's function call resolution, it is not perfect, since you can abuse this to do things like assign a named function to a variable which is not allowed in OpenSCAD. So this covers all but the most pathological cases.

    Parameters

    Returns ASTNode