Permalink
Browse files

Better definition of super keyword

Fixes #36.
  • Loading branch information...
mjackson committed Dec 29, 2011
1 parent e362e8a commit aaac09b9a3d468c07d84d4b34aba09a1b20b8d1e
Showing with 6 additions and 1 deletion.
  1. +2 −1 lib/citrus/file.rb
  2. +1 −0 test/_files/rule6.citrus
  3. +3 −0 test/_files/rule7.citrus
View
@@ -165,7 +165,7 @@ def value
end
rule :super do
- all('super', andp(" "), :space) {
+ ext(:super_keyword) {
Super.new
}
end
@@ -329,6 +329,7 @@ def value
rule :grammar_keyword, [ /\bgrammar\b/, :space ]
rule :root_keyword, [ /\broot\b/, :space ]
rule :rule_keyword, [ /\brule\b/, :space ]
+ rule :super_keyword, [ /\bsuper\b/, :space ]
rule :end_keyword, [ /\bend\b/, :space ]
rule :constant, /[A-Z][a-zA-Z0-9_]*/
View
@@ -0,0 +1 @@
+rule super end
View
@@ -0,0 +1,3 @@
+rule abc
+ "abc" | super
+end

0 comments on commit aaac09b

Please sign in to comment.