Skip to content

Commit

Permalink
Merge pull request #225 from zenspider/zenspider/frozen_string_literals
Browse files Browse the repository at this point in the history
Add --frozen to add frozen_string_literals to top of generated files.
  • Loading branch information
flavorjones committed Jul 19, 2023
2 parents 79ad0ef + f95ae86 commit d7c4368
Show file tree
Hide file tree
Showing 9 changed files with 295 additions and 589 deletions.
5 changes: 5 additions & 0 deletions bin/racc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def main
make_executable = false
rubypath = nil
embed_runtime = false
frozen_strings = false
debug_flags = Racc::DebugFlags.new
line_convert = true
line_convert_all = false
Expand Down Expand Up @@ -57,6 +58,9 @@ def main
parser.on('-E', '--embedded', "Embeds Racc runtime in output.") {
embed_runtime = true
}
parser.on('-F', '--frozen', "Add frozen_string_literals: true.") {
frozen_strings = true
}
parser.on('--line-convert-all', 'Converts line numbers of user codes.') {
line_convert_all = true
}
Expand Down Expand Up @@ -162,6 +166,7 @@ def main
params.convert_line = line_convert
params.convert_line_all = line_convert_all
params.embed_runtime = embed_runtime
params.frozen_strings = frozen_strings
profiler.section('generation') {
generator = Racc::ParserFileGenerator.new(states, params)
generator.generate_parser_file(output || make_filename(input, '.tab.rb'))
Expand Down
282 changes: 0 additions & 282 deletions doc/en/NEWS.en.rdoc

This file was deleted.

0 comments on commit d7c4368

Please sign in to comment.