Skip to content

Commit

Permalink
Fix warnings (#19)
Browse files Browse the repository at this point in the history
* Fix warning from uninitialized @Quantifier

Fixes #18

* Update build task to prepend `warn-indent:false`

Partially addresses #10 but does not eliminate all warnings
  • Loading branch information
backus authored and ammar committed May 8, 2016
1 parent 00ed37d commit 6a877b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Rakefile
Expand Up @@ -53,8 +53,17 @@ namespace :ragel do
desc "Process the ragel source files and output ruby code"
task :rb do |t|
RAGEL_SOURCE_FILES.each do |file|
output_file = "#{RAGEL_OUTPUT_DIR}/#{file}.rb"
# using faster flat table driven FSM, about 25% larger code, but about 30% faster
sh "ragel -F1 -R #{RAGEL_SOURCE_DIR}/#{file}.rl -o #{RAGEL_OUTPUT_DIR}/#{file}.rb"
sh "ragel -F1 -R #{RAGEL_SOURCE_DIR}/#{file}.rl -o #{output_file}"

contents = File.read(output_file)

File.open(output_file, 'r+') do |file|
contents = "# -*- warn-indent:false; -*-\n" + contents

file.write(contents)
end
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/regexp_parser/expression.rb
Expand Up @@ -16,6 +16,7 @@ def initialize(token)
@level = token.level
@set_level = token.set_level
@conditional_level = token.conditional_level
@quantifier = nil
@options = nil
end

Expand Down

0 comments on commit 6a877b0

Please sign in to comment.