Class Ast.From

Enclosing class:
Ast

public static class Ast.From extends Ast.Exp
From expression.
  • Field Details

    • steps

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

      public final @Nullable Ast.Exp implicitYieldExp
      An implicit yield expression, if the last step is not a Ast.Yield; null if the last step is a Ast.Yield.
  • Constructor Details

    • From

      From(Pos pos, com.google.common.collect.ImmutableList<Ast.FromStep> steps, @Nullable Ast.Exp implicitYieldExp)
  • Method Details

    • implicitYieldExp

      static @Nullable Ast.Exp implicitYieldExp(Pos pos, List<Ast.FromStep> steps)
    • accept

      public Ast.Exp accept(Shuttle shuttle)
      Description copied from class: AstNode
      Accepts a shuttle, calling the Shuttle.visit(net.hydromatic.morel.ast.Ast.Literal) method appropriate to the type of this node, and returning the result.
      Specified by:
      accept in class Ast.Exp
    • accept

      public void accept(Visitor visitor)
      Description copied from class: AstNode
      Accepts a visitor, calling the Shuttle.visit(net.hydromatic.morel.ast.Ast.Literal) method appropriate to the type of this node, and returning the result.
      Specified by:
      accept in class AstNode
    • unparse

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

      public Ast.From copy(List<Ast.FromStep> steps, @Nullable Ast.Exp implicitYieldExp)
      Creates a copy of this From 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.