Permalink
Browse files

Allow rule names to begin with super*

Fixes #24
  • Loading branch information...
1 parent 6007233 commit f039a8ea3c871c2f0a122d8c6da2ccbb2aa4807c @mjackson committed Oct 27, 2011
View
@@ -165,7 +165,7 @@ def value
end
rule :super do
- all('super', :space) {
+ all('super', andp(" "), :space) {
Super.new
}
end
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,9 @@
+grammar SuperThree
+ rule keyword
+ super_keyword | "keyword"
+ end
+
+ rule super_keyword
+ "super"
+ end
+end
View
@@ -0,0 +1 @@
+rule super '' end
View
@@ -9,7 +9,7 @@ def run_file_test(file, root)
assert(match)
end
- %w<rule grammar>.each do |type|
+ %w<file grammar rule>.each do |type|
Dir[::File.dirname(__FILE__) + "/_files/#{type}*.citrus"].each do |path|
module_eval(<<-CODE.gsub(/^ /, ''), __FILE__, __LINE__ + 1)
def test_#{::File.basename(path, '.citrus')}

0 comments on commit f039a8e

Please sign in to comment.