Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better definition of super keyword

Fixes #36.
  • Loading branch information...
commit aaac09b9a3d468c07d84d4b34aba09a1b20b8d1e 1 parent e362e8a
@mjackson authored
View
3  lib/citrus/file.rb
@@ -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
1  test/_files/rule6.citrus
@@ -0,0 +1 @@
+rule super end
View
3  test/_files/rule7.citrus
@@ -0,0 +1,3 @@
+rule abc
+ "abc" | super
+end
Please sign in to comment.
Something went wrong with that request. Please try again.