예제 #1
0
 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())));
 }
예제 #2
0
 private static Parser <char, IDeclaration> GetGlobalDeclarationListParser()
 {
     return(Keyword("globals").Then(Newlines).Then(GlobalDeclarationParser.Many()).Before(Keyword("endglobals"))
            .Select <IDeclaration>(globals => new JassGlobalDeclarationListSyntax(globals.ToImmutableArray())));
 }