Package net.hydromatic.morel.ast
Class Core.NamedPat
- java.lang.Object
-
- net.hydromatic.morel.ast.AstNode
-
- net.hydromatic.morel.ast.Core.BaseNode
-
- net.hydromatic.morel.ast.Core.Pat
-
- net.hydromatic.morel.ast.Core.NamedPat
-
- All Implemented Interfaces:
Comparable<Core.NamedPat>
- Direct Known Subclasses:
Core.AsPat,Core.IdPat
- Enclosing class:
- Core
public abstract static class Core.NamedPat extends Core.Pat implements Comparable<Core.NamedPat>
Base class for named patterns (Core.IdPatandCore.AsPat).Implements
Comparableso that names are sorted correctly for record fields (seeRecordType.ORDERING).A
Core.ValDeclmust be one of these.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Core.NamedPataccept(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.intcompareTo(Core.NamedPat o)abstract Core.NamedPatwithType(Type type)-
Methods inherited from class net.hydromatic.morel.ast.Core.BaseNode
accept
-
-
-
-
Field Detail
-
name
public final String name
-
i
public final int i
-
-
Method Detail
-
compareTo
public int compareTo(Core.NamedPat o)
Collate first on name, then on ordinal.
- Specified by:
compareToin interfaceComparable<Core.NamedPat>
-
withType
public abstract Core.NamedPat withType(Type type)
-
accept
public abstract Core.NamedPat 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.
-
-