Пример #1
0
        /// <sumamry>
        /// add a full defined symbol. This method is not intended for forwardDeclarations
        /// </summary>
        /// <exception cref="ScopeException">thrown, when trying to redefine symbol</exception>
        public void addSymbol(String symbolName)
        {
            if (m_symbols.ContainsKey(symbolName))
            {
                Symbol sym = (Symbol)m_symbols[symbolName];
                if (!(sym is SymbolFwdDecl))
                {
                    throw new ScopeException("symbol redifined: " + symbolName);
                }
            }
            Symbol newSymbol = new SymbolDefinition(symbolName, this);

            m_symbols[symbolName] = newSymbol;
        }
Пример #2
0
 /// <sumamry>
 /// add a full defined symbol. This method is not intended for forwardDeclarations
 /// </summary>
 /// <exception cref="ScopeException">thrown, when trying to redefine symbol</exception>
 public void addSymbol(String symbolName)  {
     if (m_symbols.ContainsKey(symbolName)) {
         Symbol sym = (Symbol)m_symbols[symbolName];
         if (!(sym is SymbolFwdDecl)) {
             throw new ScopeException("symbol redifined: " + symbolName);
         }
     }
     Symbol newSymbol = new SymbolDefinition(symbolName, this);
     m_symbols[symbolName] = newSymbol;
 }