Package dev.cel.common.navigation
Class CelNavigableAst
- java.lang.Object
-
- dev.cel.common.navigation.CelNavigableAst
-
public final class CelNavigableAst extends java.lang.ObjectDecorates aCelAbstractSyntaxTreewith navigational properties. This allows us to visit a node's children, descendants or its parent with ease.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CelNavigableAstfromAst(CelAbstractSyntaxTree ast)Constructs a new instance ofCelNavigableAstfromCelAbstractSyntaxTree.CelAbstractSyntaxTreegetAst()Returns the underlyingCelAbstractSyntaxTree.CelNavigableExprgetRoot()Returns the root of the AST.
-
-
-
Method Detail
-
fromAst
public static CelNavigableAst fromAst(CelAbstractSyntaxTree ast)
Constructs a new instance ofCelNavigableAstfromCelAbstractSyntaxTree.
-
getRoot
public CelNavigableExpr getRoot()
Returns the root of the AST.
-
getAst
public CelAbstractSyntaxTree getAst()
Returns the underlyingCelAbstractSyntaxTree.
-
-