Пример #1
0
        sunCallableSymbol AddSystemBuiltin(string name)
        {
            var symbol = new sunBuiltinSymbol(name, SymbolTable.Count);

            SymbolTable.Add(symbol);
            return(symbol);
        }
Пример #2
0
        // callables
        public sunBuiltinSymbol DeclareBuiltin(sunBuiltinDeclaration node)
        {
            if (SymbolTable.Get <sunCallableSymbol>().Any(i => i.Name == node.Name.Value))
            {
                throw new sunRedeclaredBuiltinException(node);
            }
            var symbol = new sunBuiltinSymbol(node.Name.Value, node.Parameters.ParameterInfo, SymbolTable.Count);

            SymbolTable.Add(symbol);
            return(symbol);
        }