sunCallableSymbol AddSystemBuiltin(string name) { var symbol = new sunBuiltinSymbol(name, SymbolTable.Count); SymbolTable.Add(symbol); return(symbol); }
// 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); }