private static Parser <SyntaxToken, IDeclaration> GetGlobalDeclarationListParser() { return(Keyword(SyntaxTokenType.GlobalsKeyword).Then(Newline.AtLeastOnce()).Then(GlobalDeclarationParser.Many()).Before(Keyword(SyntaxTokenType.EndglobalsKeyword)) .Select <IDeclaration>(globals => new JassGlobalDeclarationListSyntax(globals.ToImmutableArray()))); }
private static Parser <char, IDeclaration> GetGlobalDeclarationListParser() { return(Keyword("globals").Then(Newlines).Then(GlobalDeclarationParser.Many()).Before(Keyword("endglobals")) .Select <IDeclaration>(globals => new JassGlobalDeclarationListSyntax(globals.ToImmutableArray()))); }