17 using System.Collections.Generic;
19 using ErrorManagement;
33 public abstract class AstNode : antlr.CommonAST {
46 get {
return this.location; }
78 #region EqualsAndGetHashCode
79 public override bool Equals(
object obj) {
88 return this.Location.Equals(node.Location);
91 return Location.GetHashCode();
96 #region Dispatcher AstOperation
105 return op.Exec(
this, arg);
virtual object AcceptOperation(AstOperation op, object arg)
Dispatches expressions to the operation passed as argument. It provokes the execution of op...
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
override int GetHashCode()
This class represent the entry wnen sending a message to an operation object. derived from AstNode ...
AstNode(Location location)
Protected constructor of NodeAst
override bool Equals(object obj)
AntLR compares Nodes with the class name. This is not correct for our purposes.
Abstract class for all nodes that compounds the abstract syntax tree.
abstract Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
Location location
Location: Encapsulates in one object the line, column and filename