mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::json: Optimize string character grammar.
This commit is contained in:
parent
d2fd7488fe
commit
898f7980f6
1 changed files with 8 additions and 1 deletions
|
@ -148,9 +148,16 @@ ircd::json::parser
|
|||
,"escaper"
|
||||
};
|
||||
|
||||
const rule<> escape_sequence
|
||||
{
|
||||
escape >> escaper_nc
|
||||
,"escape sequence"
|
||||
};
|
||||
|
||||
const rule<string_view> chars
|
||||
{
|
||||
raw[*((char_ - escaped) | (escape >> escaper_nc))]
|
||||
//raw[*((char_ - escaped) | (escape >> escaper_nc))]
|
||||
raw[*((~char_('\x00', '\x1F') - char_("\x22\x5C")) | (escape >> escaper_nc))]
|
||||
,"characters"
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue