mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-29 23:57:51 +00:00
templater: mark string literal as compound atomic, and integer as atomic
They aren't important because we don't use implicit whitespace rule, but let's clarify they are atomic rules. https://pest.rs/book/grammars/syntax.html#atomic
This commit is contained in:
parent
6039e9889c
commit
46b4c68325
1 changed files with 2 additions and 2 deletions
|
@ -22,9 +22,9 @@ whitespace = _{ " " | "\t" | "\r" | "\n" | "\x0c" }
|
|||
string_escape = @{ "\\" ~ ("t" | "r" | "n" | "0" | "\"" | "\\") }
|
||||
string_content_char = @{ !("\"" | "\\") ~ ANY }
|
||||
string_content = @{ string_content_char+ }
|
||||
string_literal = { "\"" ~ (string_content | string_escape)* ~ "\"" }
|
||||
string_literal = ${ "\"" ~ (string_content | string_escape)* ~ "\"" }
|
||||
|
||||
integer_literal = {
|
||||
integer_literal = @{
|
||||
ASCII_NONZERO_DIGIT ~ ASCII_DIGIT*
|
||||
| "0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue