Class Ast.Query

Direct Known Subclasses:
Ast.Exists, Ast.Forall, Ast.From
Enclosing class:
Ast

public abstract static class Ast.Query extends Ast.Exp
Base class for "from", "exists" or "forall" expression.
  • Field Details

    • steps

      public final com.google.common.collect.ImmutableList<Ast.FromStep> steps
  • Constructor Details

    • Query

      Query(Pos pos, Op op, com.google.common.collect.ImmutableList<Ast.FromStep> steps)
  • Method Details

    • unparse

      AstWriter unparse(AstWriter w, int left, int right)
      Specified by:
      unparse in class AstNode
    • copy

      public abstract Ast.Query copy(List<Ast.FromStep> steps)
      Creates a copy of this From or Exists with given contents, or this if the contents are the same.
    • isCompute

      public boolean isCompute()
      Returns whether this from expression ends with a compute step. If so, it is a monoid comprehension, not a monad comprehension, and its type is a scalar value (or record), not a list.
    • isInto

      public boolean isInto()
      Returns whether this from expression ends with as into step. If so, its type is a scalar value (or record), not a list.