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:
Yuya Nishihara 2024-04-07 15:58:39 +09:00
parent 6039e9889c
commit 46b4c68325

View file

@ -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"
}