Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow rule names to begin with super*

Fixes #24
  • Loading branch information...
commit f039a8ea3c871c2f0a122d8c6da2ccbb2aa4807c 1 parent 6007233
@mjackson authored
View
2  lib/citrus/file.rb
@@ -165,7 +165,7 @@ def value
end
rule :super do
- all('super', :space) {
+ all('super', andp(" "), :space) {
Super.new
}
end
View
0  test/_files/super.citrus → test/_files/file1.citrus
File renamed without changes
View
0  test/_files/super2.citrus → test/_files/file2.citrus
File renamed without changes
View
9 test/_files/file3.citrus
@@ -0,0 +1,9 @@
+grammar SuperThree
+ rule keyword
+ super_keyword | "keyword"
+ end
+
+ rule super_keyword
+ "super"
+ end
+end
View
1  test/_files/rule5.citrus
@@ -0,0 +1 @@
+rule super '' end
View
2  test/file_test.rb
@@ -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')}
Please sign in to comment.
Something went wrong with that request. Please try again.