Package net.hydromatic.morel.ast
Class Ast.Pat
- java.lang.Object
-
- net.hydromatic.morel.ast.AstNode
-
- net.hydromatic.morel.ast.Ast.Pat
-
- Direct Known Subclasses:
Ast.AnnotatedPat,Ast.Con0Pat,Ast.ConPat,Ast.IdPat,Ast.InfixPat,Ast.ListPat,Ast.LiteralPat,Ast.RecordPat,Ast.TuplePat,Ast.WildcardPat
- Enclosing class:
- Ast
public abstract static class Ast.Pat extends AstNode
Base class for a pattern.For example, "x" in "val x = 5" is a
Ast.IdPat; the "(x, y) in "val (x, y) = makePair 1 2" is aAst.TuplePat.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Ast.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.voidforEachArg(java.util.function.ObjIntConsumer<Ast.Pat> action)voidvisit(java.util.function.Consumer<Ast.Pat> consumer)
-
-
-
Method Detail
-
forEachArg
public void forEachArg(java.util.function.ObjIntConsumer<Ast.Pat> action)
-
accept
public abstract Ast.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.
-
visit
public void visit(java.util.function.Consumer<Ast.Pat> consumer)
-
-