internal DirectiveNode( DirectiveToken directiveToken, SourceText sourceText, PolyglotSyntaxTree?syntaxTree) : base(directiveToken.DirectiveName, sourceText, syntaxTree) { Add(directiveToken); }
internal KernelNameDirectiveNode( DirectiveToken directiveToken, SourceText sourceText, PolyglotSyntaxTree?syntaxTree) : base(directiveToken, sourceText, syntaxTree) { KernelName = directiveToken.DirectiveName; }
internal ProxyKernelNameDirectiveNode( string remoteKernelName, DirectiveToken directiveToken, SourceText sourceText, PolyglotSyntaxTree?syntaxTree) : base(directiveToken, sourceText, syntaxTree) { RemoteKernelName = remoteKernelName; }
internal ActionDirectiveNode( DirectiveToken directiveToken, SourceText sourceText, string parentKernelName, PolyglotSyntaxTree?syntaxTree) : base(directiveToken, sourceText, syntaxTree) { ParentKernelName = parentKernelName; }
private bool IsLanguageDirective(DirectiveToken directiveToken) { if (_kernelChooserDirectives is null) { _kernelChooserDirectives = new HashSet <string>( _directives .OfType <ChooseKernelDirective>() .SelectMany(c => c.Aliases)); } return(_kernelChooserDirectives.Contains(directiveToken.Text)); }
private bool IsLanguageDirective(DirectiveToken directiveToken) { if (_kernelChooserDirectives is null && _subkernelDirectiveParsersByLanguageName != null) { _kernelChooserDirectives = new HashSet <string>( _rootKernelDirectiveParser .Configuration .RootCommand .Children .OfType <ChooseKernelDirective>() .SelectMany(c => c.Aliases) ); } return(_kernelChooserDirectives?.Contains(directiveToken.Text) == true); }
internal DirectiveNode(DirectiveToken directiveToken, SourceText sourceText) : base("#!-directive", sourceText) { Add(directiveToken); }
internal KernelDirectiveNode( DirectiveToken directiveToken, SourceText sourceText) : base(directiveToken, sourceText) { KernelName = directiveToken.DirectiveName; }