Sha256: 9b014cdf386f13d7f402f15d1ea49fff64644c579518dc50a8268ebb6e16799d

Contents?: true

Size: 810 Bytes

Versions: 1

Compression:

Stored size: 810 Bytes

Contents

grammar TOML::Arrays
  include TOML::Primitive

  rule array
    ("[" array_comments (elements)? space ","? array_comments "]" indent?) { eval(to_str) }
  end

  rule array_comments
    (indent? comment* indent?)
  end

  rule elements
    float_array | string_array | array_array | integer_array | datetime_array | bool_array
  end

  rule float_array
    ((exponent | float) (space "," array_comments (exponent | float))*)
  end

  rule string_array
    (string (space "," array_comments string)*)
  end

  rule array_array
    (array (space "," array_comments array)*)
  end

  rule integer_array
    (integer (space "," array_comments integer)*)
  end

  rule datetime_array
    (datetime (space "," array_comments datetime)*)
  end

  rule bool_array
    (bool (space "," array_comments bool)*)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
toml-rb-0.3.14 lib/toml/grammars/array.citrus