Fix a few crashers with And_Rule, Kleene_Rule, Plus_Rule, and Optional_Rule

This commit is contained in:
Jonathan Turner
2009-05-29 02:58:05 +00:00
parent 4921d9a89e
commit 14be974fb0
2 changed files with 10 additions and 5 deletions

View File

@@ -66,6 +66,7 @@ void parse(std::vector<TokenPtr> &tokens) {
//Example: "def add(x,y)"
Rule params;
Rule block(TokenType::Scoped_Block);
Rule rule(TokenType::Function_Def);
@@ -78,6 +79,11 @@ void parse(std::vector<TokenPtr> &tokens) {
return_statement = Ign(Str("return")) << Id(TokenType::Identifier) << Str("+") << Id(TokenType::Identifier);
/*
Rule rule, rule2;
rule = rule2;
rule2 = Str("Bob");
*/
/*
Rule rule(3);
rule = Ign(Str("Bob")) << Str("Fred");