NavigateAST
Utility functions to go from typed to untyped ASTs
Attributes
- Graph
- Supertypes
- Self type
- NavigateAST.type
Members list
Value members
Concrete methods
The reverse path from any node in from
to the node that closest encloses span
,
or Nil
if no such path exists. If a non-empty path is returned it starts with
the node closest enclosing span
and ends with one of the nodes in from
.
The reverse path from any node in from
to the node that closest encloses span
,
or Nil
if no such path exists. If a non-empty path is returned it starts with
the node closest enclosing span
and ends with one of the nodes in from
.
Attributes
- skipZeroExtent
If true, skip over zero-extent nodes in the search. These nodes do not correspond to code the user wrote since their start and end point are the same, so this is useful when trying to reconcile nodes with source code.
The untyped tree corresponding to typed tree tree
in the compilation
unit specified by ctx
The untyped tree corresponding to typed tree tree
in the compilation
unit specified by ctx
Attributes
The reverse path of untyped trees starting with a tree that closest matches
tree
and ending in the untyped tree at the root of the compilation unit
specified by ctx
.
The reverse path of untyped trees starting with a tree that closest matches
tree
and ending in the untyped tree at the root of the compilation unit
specified by ctx
.
Attributes
- exactMatch
If
true
, the path must start with a node that exactly matchestree
, orNil
is returned. Iffalse
the path might start with a node enclosing the logical position oftree
. Note: A complication concerns member definitions. ValDefs and DefDefs have after desugaring a position that spans just the name of the symbol being defined and nothing else. So we look instead for an untyped tree approximating the envelope of the definition, and declare success if we find another DefTree.
The reverse part of the untyped root of the compilation unit of ctx
to
the given span
.
The reverse part of the untyped root of the compilation unit of ctx
to
the given span
.