Class AstNode

    • Field Detail

      • pos

        public final Pos pos
      • op

        public final Op op
    • Constructor Detail

      • AstNode

        public AstNode​(Pos pos,
                       Op op)
    • Method Detail

      • toString

        public final java.lang.String toString()
        Converts this node into an ML string.

        The purpose of this string is debugging. If you want to generate an expression, use unparse(net.hydromatic.morel.ast.AstWriter, int, int), which will insert parentheses as necessary for operator precedence.

        Derived classes may override, but they must produce the same result; so the only reason to override is if they can do it more efficiently.

        Overrides:
        toString in class java.lang.Object