Skip to content

Commit f0efec1

Browse files
committed
Merge pull request #2398 from Shopify/c-api
Introduce standalone C parser for RBS with arena allocation
1 parent 8777b31 commit f0efec1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+17964
-7845
lines changed

Rakefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ end
3636
multitask :default => [:test, :stdlib_test, :typecheck_test, :rubocop, :validate, :test_doc]
3737

3838
task :lexer do
39-
sh "re2c -W --no-generation-date -o ext/rbs_extension/lexer.c ext/rbs_extension/lexer.re"
39+
sh "re2c -W --no-generation-date -o src/lexer.c src/lexer.re"
4040
end
4141

4242
task :confirm_lexer => :lexer do
4343
puts "Testing if lexer.c is updated with respect to lexer.re"
44-
sh "git diff --exit-code ext/rbs_extension/lexer.c"
44+
sh "git diff --exit-code src/lexer.c"
4545
end
4646

4747
task :confirm_templates => :templates do
@@ -70,17 +70,19 @@ task :confirm_annotation do
7070
end
7171

7272
task :templates do
73-
sh "#{ruby} templates/template.rb include/rbs/constants.h"
74-
sh "#{ruby} templates/template.rb include/rbs/ruby_objs.h"
75-
sh "#{ruby} templates/template.rb src/constants.c"
76-
sh "#{ruby} templates/template.rb src/ruby_objs.c"
73+
sh "#{ruby} templates/template.rb ext/rbs_extension/ast_translation.h"
74+
sh "#{ruby} templates/template.rb ext/rbs_extension/ast_translation.c"
75+
76+
sh "#{ruby} templates/template.rb ext/rbs_extension/class_constants.h"
77+
sh "#{ruby} templates/template.rb ext/rbs_extension/class_constants.c"
78+
79+
sh "#{ruby} templates/template.rb include/rbs/ast.h"
80+
sh "#{ruby} templates/template.rb src/ast.c"
7781
end
7882

79-
task :compile => "ext/rbs_extension/lexer.c"
80-
task :compile => "include/rbs/constants.h"
81-
task :compile => "include/rbs/ruby_objs.h"
82-
task :compile => "src/constants.c"
83-
task :compile => "src/ruby_objs.c"
83+
task :compile => "ext/rbs_extension/class_constants.h"
84+
task :compile => "ext/rbs_extension/class_constants.c"
85+
task :compile => "src/lexer.c"
8486

8587
task :test_doc do
8688
files = Dir.chdir(File.expand_path('..', __FILE__)) do

0 commit comments

Comments
 (0)