Class AstNode

java.lang.Object
net.hydromatic.filtex.ast.AstNode
Direct Known Subclasses:
Ast.Absolute, Ast.Box, Ast.Call0, Ast.Call1, Ast.Call2, Ast.Circle, Ast.Comparison, Ast.DateLiteral, Ast.DayLiteral, Ast.Interval, Ast.LastInterval, Ast.MatchesAdvanced, Ast.MonthInterval, Ast.NumericRange, Ast.Past, Ast.Point, Ast.Range, Ast.RangeInterval, Ast.Relative, Ast.RelativeRange, Ast.RelativeUnit, Ast.ThisRange, Ast.ThisUnit

public abstract class AstNode extends Object
Base class for Abstract Syntax Tree node.
  • Field Details

    • pos

      public final Pos pos
    • op

      public final Op op
    • id

      public @Nullable Integer id
      Unique identifier of a node, or null. It's mutable, so that we don't have to copy the tree just to number it, but just be careful.
  • Method Details

    • toString

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

      public abstract AstWriter unparse(AstWriter writer)
    • accept

      public abstract void accept(net.hydromatic.filtex.ast.AstVisitor visitor, @Nullable AstNode parent)
    • is

      public boolean is()
      False if negated, true if not negated.
    • expression

      public @Nullable String expression()
    • summary

      public @Nullable String summary()
    • type

      public String type()
      Returns the FilterModel type. For example, "," for "OR".
    • value

      public Iterable<Comparable> value()
    • low

      public String low()
    • high

      public String high()
    • bounds

      public String bounds()
    • valueString

      public @Nullable String valueString()
    • dateString

      public String dateString(boolean showTime)
      Converts a DATE or DATE_TIME node to a descriptive string.
    • digest

      public Digester digest(Digester digester)