The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
AST.AstNode Class Referenceabstract

Abstract class for all nodes that compounds the abstract syntax tree. More...

Inheritance diagram for AST.AstNode:
AST.Namespace AST.SourceFile AST.Statement AST.AssertStatement AST.Block AST.BreakStatement AST.CatchStatement AST.ContinueStatement AST.Declaration AST.DoStatement AST.ExceptionManagementStatement AST.Expression AST.ForeachStatement AST.ForStatement AST.IfElseStatement AST.MoveStatement AST.ReturnStatement AST.SwitchLabel AST.SwitchSection AST.SwitchStatement AST.ThetaStatement AST.ThrowStatement AST.WhileStatement

Public Member Functions

abstract Object Accept (Visitor v, Object o)
 Accept method of a concrete visitor. More...
 
override bool Equals (object obj)
 AntLR compares Nodes with the class name. This is not correct for our purposes. More...
 
override int GetHashCode ()
 
virtual object AcceptOperation (AstOperation op, object arg)
 Dispatches expressions to the operation passed as argument. It provokes the execution of op.AcceptOperation(AstNode) with the parameter resolved polymorfically More...
 

Protected Member Functions

 AstNode (Location location)
 Protected constructor of NodeAst More...
 

Protected Attributes

Location location
 Location: Encapsulates in one object the line, column and filename More...
 

Properties

Location Location [get]
 

Detailed Description

Abstract class for all nodes that compounds the abstract syntax tree.

Implements Composite pattern [Component]. Implements Visitor pattern [Element].

Definition at line 33 of file AstNode.cs.

Constructor & Destructor Documentation

AST.AstNode.AstNode ( Location  location)
protected

Protected constructor of NodeAst

Parameters
location

localization (file, line, and column) of the node in the text program

Definition at line 59 of file AstNode.cs.

Member Function Documentation

abstract Object AST.AstNode.Accept ( Visitor  v,
Object  o 
)
pure virtual

Accept method of a concrete visitor.

Parameters
vConcrete visitor
oOptional information to use in the visit.
Returns
Optional information to return

Implemented in AST.ForStatement, AST.SourceFile, AST.IfElseStatement, AST.SwitchStatement, AST.SingleIdentifierExpression, AST.Block, AST.AssignmentExpression, AST.TypeDefinition, AST.UnaryExpression, AST.TernaryExpression, AST.WhileStatement, AST.NewArrayExpression, AST.MethodDeclaration, AST.ThetaStatement, AST.ExceptionManagementStatement, AST.IdDeclaration, AST.ArgumentExpression, AST.DoStatement, AST.RelationalExpression, AST.FieldAccessExpression, AST.SwitchLabel, AST.SwitchSection, AST.BitwiseExpression, AST.CompoundExpression, AST.DeclarationSet, AST.ArithmeticExpression, AST.FieldDeclaration, AST.Definition, AST.ForeachStatement, AST.IsExpression, AST.CastExpression, AST.MoveStatement, AST.Namespace, AST.BaseCallExpression, AST.ReturnStatement, AST.LogicalExpression, AST.MethodDefinition, AST.PropertyDefinition, AST.ArrayAccessExpression, AST.FieldDeclarationSet, AST.NewExpression, AST.QualifiedIdentifierExpression, AST.AssertStatement, AST.CatchStatement, AST.ClassDefinition, AST.DoubleLiteralExpression, AST.ConstructorDefinition, AST.InvocationExpression, AST.IntLiteralExpression, AST.FieldDefinition, AST.BoolLiteralExpression, AST.StringLiteralExpression, AST.CharLiteralExpression, AST.ThrowStatement, AST.ConstantDefinition, AST.ConstantFieldDefinition, AST.InterfaceDefinition, AST.BreakStatement, AST.NullExpression, AST.BaseExpression, AST.ThisExpression, and AST.ContinueStatement.

virtual object AST.AstNode.AcceptOperation ( AstOperation  op,
object  arg 
)
virtual

Dispatches expressions to the operation passed as argument. It provokes the execution of op.AcceptOperation(AstNode) with the parameter resolved polymorfically

Parameters
opAstOperation to dispatch
Returns

Reimplemented in AST.SingleIdentifierExpression, AST.NewArrayExpression, AST.IdDeclaration, AST.Expression, AST.FieldAccessExpression, AST.Definition, AST.BaseCallExpression, AST.Declaration, AST.NewExpression, AST.InvocationExpression, AST.IdentifierExpression, AST.BaseExpression, and AST.Statement.

Definition at line 104 of file AstNode.cs.

override bool AST.AstNode.Equals ( object  obj)

AntLR compares Nodes with the class name. This is not correct for our purposes.

Parameters
objThe other ast node to compare
Returns
Whether they are the same or not

Definition at line 84 of file AstNode.cs.

override int AST.AstNode.GetHashCode ( )

Definition at line 90 of file AstNode.cs.

Member Data Documentation

Location AST.AstNode.location
protected

Location: Encapsulates in one object the line, column and filename

Definition at line 39 of file AstNode.cs.

Property Documentation

Location AST.AstNode.Location
get

Definition at line 45 of file AstNode.cs.


The documentation for this class was generated from the following file: