protected DeclarationTreeBuilderVisitor(LanguageSyntaxTree syntaxTree, string scriptClassName, bool isSubmission) { _syntaxTree = syntaxTree; _scriptClassName = scriptClassName; _isSubmission = isSubmission; this.PropertyStack = new Stack <Property>(); }
public BoundTree(LanguageCompilation compilation, LanguageSyntaxTree syntaxTree, Binder rootBinder, DiagnosticBag diagnostics) { _compilation = compilation; _syntaxTree = syntaxTree; _rootBinder = rootBinder; _diagnostics = diagnostics; _boundNodeFactoryVisitorPool = new ObjectPool <BoundNodeFactoryVisitor>(() => Language.CompilationFactory.CreateBoundNodeFactoryVisitor(this), 64); _isBindableNodeVisitorPool = new ObjectPool <IsBindableNodeVisitor>(() => Language.CompilationFactory.CreateIsBindableNodeVisitor(this), 64); }
// Add all active #pragma warn and #nullable directives under trivia into the list, in source code order. private static void GetAllPragmaWarningDirectives(LanguageSyntaxTree syntaxTree, ArrayBuilder <IDirectiveTriviaSyntax> directiveList) { foreach (var directive in syntaxTree.GetRootNode().GetDirectives()) { var d = ((IDirectiveTriviaSyntax)directive).Directive; if (d == null) { continue; } // Ignore directives inside disabled code (by #if and #endif) if (!d.IsActive) { continue; } switch (d.Kind) { case DirectiveKind.PragmaWarning: case DirectiveKind.Nullable: directiveList.Add((IDirectiveTriviaSyntax)directive); break; } } }
public LineDirectiveMap(LanguageSyntaxTree syntaxTree) : base(syntaxTree) { }
public PragmaWarningStateMap(LanguageSyntaxTree syntaxTree, bool isGeneratedCode) : base(syntaxTree, isGeneratedCode) { }
public override RootSingleDeclaration CreateDeclarationTree(LanguageSyntaxTree syntaxTree, string scriptClassName, bool isSubmission) { return(MetaDeclarationTreeBuilderVisitor.ForTree((MetaSyntaxTree)syntaxTree, scriptClassName, isSubmission)); }
internal MappingBinderFactory(LanguageCompilation compilation, LanguageSyntaxTree syntaxTree) : base(compilation, syntaxTree) { _map = new ConcurrentDictionary <BinderCacheKey, Binder>(); }
private LexicalSortKey(LanguageSyntaxTree tree, int position, LanguageCompilation compilation) : this(tree == null ? -1 : compilation.GetSyntaxTreeOrdinal(tree), position) { }