![]() |
Gorgon Game Engine
|
This is an instantiation of a scope. More...
Public Member Functions | |
| ~ScopeInstance () | |
| void | AddSymbol (const StaticMember &symbol) |
| Adds a symbol to the symbol table of this scope. More... | |
| void | Compile () |
| Forces the compilation of entire scope. More... | |
| Data | FindSymbol (const std::string &name, bool reference) |
| Tries to find the given symbol (including variables) More... | |
| const Instruction * | Get () |
| Returns the code at the current line and increments the current line. More... | |
| unsigned long | GetLineNumber () const |
| Returns the current executing logical line number. More... | |
| Variable * | GetLocalVariable (const std::string &name) |
| const std::map< std::string, Variable, String::CaseInsensitiveLess > & | GetLocalVariables () |
| SourceMarker | GetMarkerForCurrent () const |
| Returns a unique identifier for the next line in source code. More... | |
| SourceMarker | GetMarkerForNext () const |
| Returns a unique identifier for the next line in source code. More... | |
| std::string | GetName () const |
| long | GetPhysicalLine () |
| Scope & | GetScope () const |
| Returns the scope of this scope instance. More... | |
| Variable * | GetVariable (const std::string &name) |
| void | Jumpto (unsigned long line) |
| Jumps to the given line, line numbers start at zero. More... | |
| void | MoveToEnd () |
| const Instruction * | Peek () |
| Returns the code at the current line without incrementing it. More... | |
| const Instruction * | Peek (unsigned long line) |
| Returns the code at the given line without changing current line. More... | |
| void | SetReturn (Return returns) |
| Sets the return type of this scope instance. More... | |
| void | SetVariable (const std::string &name, const Data &data) |
| bool | UnsetVariable (const std::string &name) |
Public Attributes | |
| Data | ReturnValue |
| Current return value of the scope. This value can be modified before actually returning from the scope. More... | |
This is an instantiation of a scope.
| ~ScopeInstance | ( | ) |
| void AddSymbol | ( | const StaticMember & | symbol | ) |
Adds a symbol to the symbol table of this scope.
References Member::GetName(), and Member::GetQualifiedName().
| void Compile | ( | ) |
Forces the compilation of entire scope.
References Scope::ReadInstruction().
| Data FindSymbol | ( | const std::string & | name, |
| bool | reference | ||
| ) |
Tries to find the given symbol (including variables)
References ScopeInstance::FindSymbol(), Scope::GetParent(), Data::GetReference(), Scope::GetVariable(), Scope::HasInstance(), Scope::HasParent(), Data::Invalid(), Scope::IsTerminal(), and Scope::LastInstance().
| const Instruction* Get | ( | ) |
Returns the code at the current line and increments the current line.
References Scope::ReadInstruction().
| unsigned long GetLineNumber | ( | ) | const |
Returns the current executing logical line number.
| Variable* GetLocalVariable | ( | const std::string & | name | ) |
| const std::map<std::string, Variable, String::CaseInsensitiveLess>& GetLocalVariables | ( | ) |
| SourceMarker GetMarkerForCurrent | ( | ) | const |
Returns a unique identifier for the next line in source code.
This information can be used to go back across execution scopes. Useful for Try Catch like structures.
| SourceMarker GetMarkerForNext | ( | ) | const |
Returns a unique identifier for the next line in source code.
This information can be used to go back across execution scopes. Useful for Try Catch like structures.
| std::string GetName | ( | ) | const |
| long GetPhysicalLine | ( | ) |
References Scope::GetPhysicalLine().
| Scope& GetScope | ( | ) | const |
Returns the scope of this scope instance.
| Variable* GetVariable | ( | const std::string & | name | ) |
| void Jumpto | ( | unsigned long | line | ) |
Jumps to the given line, line numbers start at zero.
| void MoveToEnd | ( | ) |
References Scope::ReadyInstructionCount().
| const Instruction* Peek | ( | ) |
Returns the code at the current line without incrementing it.
References Scope::ReadInstruction().
| const Instruction* Peek | ( | unsigned long | line | ) |
Returns the code at the given line without changing current line.
References Scope::ReadInstruction().
| void SetReturn | ( | Return | returns | ) |
Sets the return type of this scope instance.
| void SetVariable | ( | const std::string & | name, |
| const Data & | data | ||
| ) |
| bool UnsetVariable | ( | const std::string & | name | ) |
| Data ReturnValue |
Current return value of the scope. This value can be modified before actually returning from the scope.