internal IReadOnlyList <AccessorLetExpr> RetrieveValues(StaticScope container, bool close, int skipCount = 0) { if (skipCount < 0) { throw new ArgumentException("skipCount"); } int i = _count - skipCount; if (i <= 0 && !close) { return(AccessorLetExpr.EmptyArray); } var all = i > 0 ? new AccessorLetExpr[i] : AccessorLetExpr.EmptyArray; NameEntry first = _firstNamed; while (first != null) { NameEntry e = first.Next ?? first; Debug.Assert(e.E != null); if (i > 0) { all[--i] = e.E; } if (close) { container.Unregister(first); } first = e.NextInScope; } return(all); }
public ExprAnalyser(Config configuration = null) { if (configuration == null) { configuration = _emptyConfig; } _scope = new StaticScope(configuration.GlobalScope, configuration.AllowMasking, configuration.AllowLocalRedefinition); }
/// <summary> /// Initialzes a new <see cref="Analyzer"/>. /// </summary> /// <param name="options">Analyser options to use.</param> public Analyzer(AnalyzerOptions options = null) { _options = options ?? _defaultOptions; _scope = new StaticScope(_options.ShareGlobalScope, _options.AllowScopeMasking, _options.AllowScopeLocalRedefinition); }