private SemanticResolver( ParserOptions parserOptions, Dictionary <string, DbParameterReferenceExpression> parameters, Dictionary <string, DbVariableReferenceExpression> variables, TypeResolver typeResolver) { _parserOptions = parserOptions; _parameters = parameters; _variables = variables; _typeResolver = typeResolver; // // Creates Scope manager // _scopeManager = new ScopeManager(NameComparer); // // Push a root scope region // EnterScopeRegion(); // // Add command free variables to the root scope // foreach (var variable in _variables.Values) { CurrentScope.Add(variable.VariableName, new FreeVariableScopeEntry(variable)); } }
void IExpectationScope.Add(IExpectation expectation, bool hasHigherPrecedence) { if (expectation == null) { throw new ArgumentNullException("expectation"); } CurrentScope.Add(expectation, hasHigherPrecedence); }
// Add a symbol to the current scope Symbol Add(string name, Symbol sym) { CurrentScope.Add(sym, name); return(sym); }