lib/kaiser_ruby/rockstar_transform.rb in kaiser-ruby-0.2.2 vs lib/kaiser_ruby/rockstar_transform.rb in kaiser-ruby-0.2.3
- old
+ new
@@ -1,10 +1,11 @@
require 'pry'
module KaiserRuby
class RockstarTransform < Parslet::Transform
rule(variable_name: simple(:str)) { |c| parameterize(c[:str]) }
- rule(nil_value: simple(:_)) { 'nil' }
+ rule(mysterious_value: simple(:_)) { 'nil' }
+ rule(null_value: simple(:_)) { '0' }
rule(true_value: simple(:_)) { 'true' }
rule(false_value: simple(:_)) { 'false' }
rule(string_value: simple(:str)) { str }
rule(numeric_value: simple(:num)) { num }
rule(unquoted_string: simple(:str)) { "\"#{str}\"" }
\ No newline at end of file