Package net.hydromatic.morel.ast
Class Core.Id
java.lang.Object
net.hydromatic.morel.ast.AstNode
net.hydromatic.morel.ast.Core.BaseNode
net.hydromatic.morel.ast.Core.Exp
net.hydromatic.morel.ast.Core.Id
- All Implemented Interfaces:
Comparable<Core.Id>
- Enclosing class:
Core
Reference to a variable.
While Ast.Id is widely used, and means an occurrence of a name
in the parse tree, Id is much narrower: it means a reference to a
value. What would be an Id in Ast is often a String in
Core; for example, compare Ast.Con0Pat.tyCon
with Core.Con0Pat.tyCon.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.voidAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.intbooleaninthashCode()(package private) AstWriterMethods inherited from class net.hydromatic.morel.ast.Core.Exp
arg, forEachArg, isCallTo, isConstant, type
-
Field Details
-
idPat
-
-
Constructor Details
-
Id
Id(Core.NamedPat idPat) Creates an Id.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<Core.Id>
-
hashCode
public int hashCode() -
equals
-
accept
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. -
accept
Description copied from class:AstNodeAccepts a visitor, 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
-
unparse
-