lib/fonte/parsers/property.treetop in fonte-0.1.0 vs lib/fonte/parsers/property.treetop in fonte-0.2.0

- old
+ new

@@ -1,9 +1,11 @@ module Fonte module Parsers grammar Property include Word + include Number + include Player rule properties property+ { def value elements.inject({}) { |properties, property| properties.merge property.value } @@ -38,10 +40,22 @@ end } end rule property_value - quoted_word + number_property / player_property / quoted_word + end + + rule player_property + QUOTE value:player QUOTE + end + + rule number_property + QUOTE number QUOTE { + def value + number.value + end + } end end end end