Rakefile in rbs-1.7.0.beta.2 vs Rakefile in rbs-1.7.0.beta.3
- old
+ new
@@ -19,9 +19,24 @@
end
end
multitask :default => [:test, :stdlib_test, :rubocop, :validate, :test_doc]
+task :lexer do
+ sh "re2c -W --no-generation-date -o ext/rbs_extension/lexer.c ext/rbs_extension/lexer.re"
+end
+
+task :confirm_lexer => :lexer do
+ puts "Testing if lexer.c is updated with respect to lexer.re"
+ sh "git diff --exit-code ext/rbs_extension/lexer.c"
+end
+
+rule ".c" => ".re" do |t|
+ puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake lexer` ⚠️⚠️⚠️"
+end
+
+task :compile => "ext/rbs_extension/lexer.c"
+
task :test_doc do
files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").select do |file| Pathname(file).extname == ".md" end
end