Skip to content

Commit

Permalink
parse to end of string
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Sep 26, 2016
1 parent e0d2f6b commit 3b988a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pgmoon/hstore.lua
Expand Up @@ -50,7 +50,7 @@ do
end
local g = P({
"hstore",
hstore = Cf(Ct("") * (V("pair") * (V("delim") * V("pair")) ^ 0) ^ -1, rawset),
hstore = Cf(Ct("") * (V("pair") * (V("delim") * V("pair")) ^ 0) ^ -1, rawset) * -1,
pair = Cg(V("value") * "=>" * (V("value") + V("null"))),
value = V("invalid_char") + V("string"),
string = P('"') * Cs((P([[\\]]) / [[\]] + P([[\"]]) / [["]] + (P(1) - P('"'))) ^ 0) * P('"'),
Expand Down
2 changes: 1 addition & 1 deletion pgmoon/hstore.moon
Expand Up @@ -26,7 +26,7 @@ decode_hstore = do
g = P {
"hstore"

hstore: Cf(Ct("") * (V"pair" * (V"delim" * V"pair")^0)^-1, rawset)
hstore: Cf(Ct("") * (V"pair" * (V"delim" * V"pair")^0)^-1, rawset) * -1
pair: Cg(V"value" * "=>" * (V"value" + V"null"))
value: V"invalid_char" + V"string"

Expand Down

0 comments on commit 3b988a0

Please sign in to comment.