Package autumn.lang.compiler.ast.nodes
Class NegateOperation
java.lang.Object
autumn.lang.compiler.ast.nodes.NegateOperation
- All Implemented Interfaces:
IConstruct
,IExpression
,IOperation
,IUnaryOperation
An instance of this class is an AST node that represents the negation operator.
Property Name | Property Description |
operand | This expression produces the operation's only operand. |
location | This is the source-location information regarding this construct. |
This file was auto-generated on (Sun May 31 11:54:12 EDT 2015).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(IAstVisitor visitor) This method welcomes a visitor that wants to visit this object.copy()
This method creates a shallow copy of this object.static NegateOperation
create
(IExpression operand, SourceLocation location) This method creates a new instance of this class.Getter.Getter.setLocation
(SourceLocation value) Setter.setOperand
(IExpression value) Setter.toMap()
This method creates a map representation of this struct.toString()
-
Constructor Details
-
NegateOperation
public NegateOperation()
-
-
Method Details
-
setOperand
Setter.- Specified by:
setOperand
in interfaceIUnaryOperation
- Parameters:
value
- is the new value of propertyoperand
.- Returns:
- a copy of this object with property
operand
set to value.
-
getOperand
Getter.- Specified by:
getOperand
in interfaceIUnaryOperation
- Returns:
- the value of property
operand
.
-
setLocation
Setter.- Specified by:
setLocation
in interfaceIConstruct
- Parameters:
value
- is the new value of propertylocation
.- Returns:
- a copy of this object with property
location
set to value.
-
getLocation
Getter.- Specified by:
getLocation
in interfaceIConstruct
- Returns:
- the value of property
location
.
-
create
This method creates a new instance of this class.- Parameters:
operand
- is the value for propertyoperand
.location
- is the value for propertylocation
.- Returns:
- a new instance of this class.
-
accept
This method welcomes a visitor that wants to visit this object.- Specified by:
accept
in interfaceIConstruct
- Parameters:
visitor
- is the visitor that is visiting this object.
-
copy
This method creates a shallow copy of this object.- Specified by:
copy
in interfaceIConstruct
- Returns:
- a shallow copy of this object.
-
toMap
This method creates a map representation of this struct.Each key is the name of a field. Each value is the result of calling the key field's getter.
- Returns:
- a map containing the entries in this struct.
-
toString
-