Represents a symbol-table entry.
Represents a symbol-table entry.
Esempio n. 1
0
		/// <summary>Enters a symbol into this scope.</summary>
		/// <remarks>Enters a symbol into this scope.</remarks>
		public virtual void PutSymbol(Symbol symbol)
		{
			if (symbol.GetName() == null)
			{
				throw new ArgumentException("null symbol name");
			}
			EnsureSymbolTable();
			symbolTable.Put(symbol.GetName(), symbol);
			symbol.SetContainingTable(this);
			top.AddSymbol(symbol);
		}
Esempio n. 2
0
		internal virtual void AddSymbol(Symbol symbol)
		{
			if (variableNames != null)
			{
				CodeBug();
			}
			if (symbol.GetDeclType() == Token.LP)
			{
				paramCount++;
			}
			symbols.Add(symbol);
		}