C# Class Symbols.SymbolTable.Scope

Exibir arquivo Open project: YourLocalFax/OLD-Score

Public Properties

Property Type Description
name string
parent Scope

Public Methods

Method Description
AddChild ( Scope scope ) : void
GetScope ( int index ) : Scope
InsertFn ( string fnName, Modifiers mods, FnTyRef ty ) : void
InsertType ( string typeName, Modifiers mods, TyRef ty ) : void
InsertVar ( string varName, TyRef ty, bool isMut ) : void
Lookup ( string name ) : Symbol

Attempts to find a symbol with the given name. Returns the symbol if it was found, null otherwise.

Scope ( string name, Scope parent = null ) : System.Collections.Generic
ToString ( ) : string
WriteTo ( StringBuilder builder, int tabs ) : void

Private Methods

Method Description
GetSymbol ( string name, Symbol &symbol ) : bool

Method Details

AddChild() public method

public AddChild ( Scope scope ) : void
scope Scope
return void

GetScope() public method

public GetScope ( int index ) : Scope
index int
return Scope

InsertFn() public method

public InsertFn ( string fnName, Modifiers mods, FnTyRef ty ) : void
fnName string
mods Modifiers
ty Ty.FnTyRef
return void

InsertType() public method

public InsertType ( string typeName, Modifiers mods, TyRef ty ) : void
typeName string
mods Modifiers
ty Ty.TyRef
return void

InsertVar() public method

public InsertVar ( string varName, TyRef ty, bool isMut ) : void
varName string
ty Ty.TyRef
isMut bool
return void

Lookup() public method

Attempts to find a symbol with the given name. Returns the symbol if it was found, null otherwise.
public Lookup ( string name ) : Symbol
name string
return Symbol

Scope() public method

public Scope ( string name, Scope parent = null ) : System.Collections.Generic
name string
parent Scope
return System.Collections.Generic

ToString() public method

public ToString ( ) : string
return string

WriteTo() public method

public WriteTo ( StringBuilder builder, int tabs ) : void
builder System.Text.StringBuilder
tabs int
return void

Property Details

name public_oe property

public string name
return string

parent public_oe property

public Scope parent
return Scope