lib/fear/extractor/grammar.rb in fear-1.0.0 vs lib/fear/extractor/grammar.rb in fear-1.1.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Fear module Extractor # This module contains AST nodes for GrammarParser # generated by +treetop+. The sole purpose of them all is to # generate matchers @@ -54,21 +56,21 @@ def to_matcher ValueMatcher.new(value: value, node: self) end def value - text_value.to_f + Float(text_value) end end class IntegerLiteral < Node def to_matcher ValueMatcher.new(value: value, node: self) end def value - text_value.to_i + Integer(text_value, 10) end end class StringLiteral < Node def to_matcher @@ -78,10 +80,10 @@ def value elements[1].text_value end end - require 'yaml' + require "yaml" class DoubleQuotedStringLiteral < StringLiteral def to_matcher ValueMatcher.new(value: value, node: self) end