/// <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); }
/// <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); }
/// <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); }
/// <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; }
/// <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); }
/// <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); }
/// <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; }
/// <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); }