ok/jj
1
0
Fork 0
forked from mirrors/jj

templater: disallow identifier starting with number

This commit is contained in:
Yuya Nishihara 2023-02-04 21:33:31 +09:00
parent fe8c41bbd7
commit 353d915326

View file

@ -24,7 +24,7 @@ literal_char = @{ !("\"" | "\\") ~ ANY }
raw_literal = @{ literal_char+ }
literal = { "\"" ~ (raw_literal | escape)* ~ "\"" }
identifier = @{ (ASCII_ALPHANUMERIC | "_")+ }
identifier = @{ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* }
function = { identifier ~ "(" ~ function_arguments ~ ")" }
function_arguments = {