Package net.hydromatic.morel.ast
Class Core.Pat
- java.lang.Object
-
- net.hydromatic.morel.ast.AstNode
-
- net.hydromatic.morel.ast.Core.BaseNode
-
- net.hydromatic.morel.ast.Core.Pat
-
- Direct Known Subclasses:
Core.Con0Pat,Core.ConPat,Core.ListPat,Core.LiteralPat,Core.NamedPat,Core.RecordPat,Core.TuplePat,Core.WildcardPat
- Enclosing class:
- Core
public abstract static class Core.Pat extends Core.BaseNode
Base class for a pattern.For example, "x" in "val x = 5" is a
Core.IdPat; the "(x, y) in "val (x, y) = makePair 1 2" is aCore.TuplePat.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Core.Pataccept(Shuttle shuttle)Accepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.Typetype()Returns the type.-
Methods inherited from class net.hydromatic.morel.ast.Core.BaseNode
accept
-
-
-
-
Field Detail
-
type
public final Type type
-
-
Method Detail
-
type
public Type type()
Returns the type.
-
accept
public abstract Core.Pat accept(Shuttle shuttle)
Description copied from class:AstNodeAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.- Overrides:
acceptin classCore.BaseNode
-
-