private static Reply<CompilationUnit> Parse(string rookCode) { var tokens = new RookLexer().Tokenize(rookCode); return new RookGrammar().CompilationUnit.Parse(new TokenStream(tokens)); }
public static Class ParseClass(this string source) { var tokens = new RookLexer().Tokenize(source); var parser = new RookGrammar().Class; return parser.Parse(new TokenStream(tokens)).Value; }
public static Reply <T> Parses <T>(this Parser <T> parser, string source) { var tokens = new RookLexer().Tokenize(source); return(parser.Parses(tokens)); }