Esempio n. 1
0
 /// <summary>
 ///		Initializes a new instance of this class with the given identifier,
 ///		and add's itself to the given scope's symbol list.
 /// </summary>
 /// <param name="ident">Identifier used to identify this symbol.</param>
 /// <param name="scope">Scope that symbol is in.</param>
 public FunctionSymbol(string ident, Symbol scope)
 {
     _ident = ident;
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
 }
Esempio n. 2
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 public EnumerationSymbol(Symbol scope)
 {
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
 }
Esempio n. 3
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 public VariableSymbol(Symbol scope)
 {
     if (scope == null) return;
     _scope = scope;
     scope.AddSymbol(this);
 }
Esempio n. 4
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 /// <param name="ident">Contents of this string.</param>
 public StringSymbol(Symbol scope, string ident)
 {
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
     _ident = ident;
 }
Esempio n. 5
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 public StateSymbol(Symbol scope)
 {
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
 }
Esempio n. 6
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 public NamespaceSymbol(Symbol scope)
 {
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
 }
Esempio n. 7
0
 /// <summary>
 ///		Initializes a new instance of this class and adds itself to 
 ///		the given scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that this symbol is in.</param>
 /// <param name="ident">Name of this meta data.</param>
 /// <param name="value">Value of this meta data.</param>
 public MetaDataSymbol(Symbol scope, string ident, string value)
 {
     _scope = scope;
     if (scope != null) scope.AddSymbol(this);
     _ident = ident;
     _value = value;
 }
Esempio n. 8
0
 /// <summary>
 ///		Initializes a new jump target instance and adds itself to the given
 ///		scope's symbol list.
 /// </summary>
 /// <param name="scope">Scope that symbol is in.</param>
 public JumpTargetSymbol(Symbol scope)
 {
     _scope = scope;
     if (scope != null) _instrIndex = scope.Instructions.Count;
     if (scope != null) scope.AddSymbol(this);
 }