Sha256: d4e0511ee35c0246b3448768806ef1fc88d59adb1f469d6a2ae45bf3aa1f0162
Contents?: true
Size: 332 Bytes
Versions: 3
Compression:
Stored size: 332 Bytes
Contents
# frozen_string_literal: true module Basic101 class Parser < Parslet::Parser rule(:unquoted_string) do match('(?=[[:print:]])[^,": ]').repeat(0).as(:string) end rule(:quoted_string) do str('"') >> match('(?=[[:print:]])[^"]').repeat(0).maybe.as(:string) >> str('"') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
basic101-1.0.2 | lib/basic101/parser/string.rb |
basic101-1.0.1 | lib/basic101/parser/string.rb |
basic101-1.0.0 | lib/basic101/parser/string.rb |