The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
|
Encapsulates the source code. More...
Public Member Functions | |
SourceFile (Location loc) | |
Constructor of SourceFile More... | |
void | AddUsing (string include) |
Add a new include file. More... | |
void | AddDeclaration (Declaration declaration) |
Add a new declaration. More... | |
void | AddNamespace (IdentifierExpression name, List< Declaration > declaration) |
Add a new namespace definition. More... | |
Declaration | GetDeclarationElement (int index) |
Gets the element stored in the specified index. More... | |
int | GetNamespaceDefinitionCount (string name) |
Gets the number of declaration into the specified namespace. More... | |
Namespace | GetNamespaceDeclarationElement (string name, int index) |
Gets the element stored in the specified namespace and index. More... | |
override 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... | |
Properties | |
List< string > | Usings [get] |
Gets the included files. More... | |
Dictionary< string, List < Namespace > >.KeyCollection | Namespacekeys [get] |
Gets the keys of namespace definition. More... | |
int | DeclarationCount [get] |
Gets the number of declarations out of namespace definition. More... | |
![]() | |
Location | Location [get] |
Additional Inherited Members | |
![]() | |
AstNode (Location location) | |
Protected constructor of NodeAst More... | |
![]() | |
Location | location |
Location: Encapsulates in one object the line, column and filename More... | |
Encapsulates the source code.
Inheritance: AstNode. Implements Composite pattern [Composite]. Implements Visitor pattern [Concrete Element].
Definition at line 35 of file SourceFile.cs.
AST.SourceFile.SourceFile | ( | Location | loc | ) |
Constructor of SourceFile
f | Information of the file stores source code. |
lineNumber | Line number. |
columnNumber | Column number. |
Definition at line 93 of file SourceFile.cs.
|
virtual |
Accept method of a concrete visitor.
v | Concrete visitor |
o | Optional information to use in the visit. |
Implements AST.AstNode.
Definition at line 202 of file SourceFile.cs.
void AST.SourceFile.AddDeclaration | ( | Declaration | declaration | ) |
Add a new declaration.
declaration | Declaration to add. |
Definition at line 123 of file SourceFile.cs.
void AST.SourceFile.AddNamespace | ( | IdentifierExpression | name, |
List< Declaration > | declaration | ||
) |
Add a new namespace definition.
name | Namespace name. |
declaration | Declaration. |
Definition at line 137 of file SourceFile.cs.
void AST.SourceFile.AddUsing | ( | string | include | ) |
Add a new include file.
include | string that represents a external file to include in the current source code. |
Definition at line 110 of file SourceFile.cs.
Declaration AST.SourceFile.GetDeclarationElement | ( | int | index | ) |
Gets the element stored in the specified index.
index | Index. |
Definition at line 155 of file SourceFile.cs.
Namespace AST.SourceFile.GetNamespaceDeclarationElement | ( | string | name, |
int | index | ||
) |
Gets the element stored in the specified namespace and index.
name | Namespace name. |
index | Index. |
Definition at line 185 of file SourceFile.cs.
int AST.SourceFile.GetNamespaceDefinitionCount | ( | string | name | ) |
Gets the number of declaration into the specified namespace.
name | Namespace name. |
Definition at line 168 of file SourceFile.cs.
|
get |
Gets the number of declarations out of namespace definition.
Definition at line 79 of file SourceFile.cs.
|
get |
Gets the keys of namespace definition.
Definition at line 71 of file SourceFile.cs.
|
get |
Gets the included files.
Definition at line 63 of file SourceFile.cs.