Class AST.SimpleExpression

java.lang.Object
nz.org.riskscape.defaults.classifier.AST
nz.org.riskscape.defaults.classifier.AST.SimpleExpression
All Implemented Interfaces:
AST.ExpressionDecl
Enclosing class:
AST

public static class AST.SimpleExpression extends AST implements AST.ExpressionDecl
  • Field Details

    • identifier

      public final nz.org.riskscape.dsl.Token identifier
    • expressionParts

      public final List<nz.org.riskscape.dsl.Token> expressionParts

      List of Tokens that make up the expression.

    • expression

      public final String expression

      The raw string of the expression. This is formed by concatenating the raw value from each Token from expressionParts.

    • built

      public nz.org.riskscape.rl.ast.Expression built
  • Constructor Details

    • SimpleExpression

      public SimpleExpression(nz.org.riskscape.dsl.Token identifier, nz.org.riskscape.dsl.Token exprToken)
    • SimpleExpression

      public SimpleExpression(nz.org.riskscape.dsl.Token identifier, List<nz.org.riskscape.dsl.Token> expressionParts)
    • SimpleExpression

      public SimpleExpression(nz.org.riskscape.dsl.Token identifier, List<nz.org.riskscape.dsl.Token> expressionParts, String expression)
  • Method Details

    • create

      public static AST.SimpleExpression create(String ident, nz.org.riskscape.rl.ast.Expression expr)

      Testing constructor

    • build

      public void build(List<nz.org.riskscape.problem.Problem> problems, nz.org.riskscape.rl.ExpressionParser parser)
      Specified by:
      build in interface AST.ExpressionDecl
    • scanStructKeys

      public Set<String> scanStructKeys()
      Specified by:
      scanStructKeys in interface AST.ExpressionDecl
    • getBoundaryToken

      public nz.org.riskscape.dsl.Token getBoundaryToken()
      Specified by:
      getBoundaryToken in class AST
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIdentifier

      public nz.org.riskscape.dsl.Token getIdentifier()
      Specified by:
      getIdentifier in interface AST.ExpressionDecl
      Overrides:
      getIdentifier in class AST
    • getExpressionParts

      public List<nz.org.riskscape.dsl.Token> getExpressionParts()

      List of Tokens that make up the expression.

    • getExpression

      public String getExpression()

      The raw string of the expression. This is formed by concatenating the raw value from each Token from expressionParts.