Allow kebab case identifiers (i.e. identifiers with `-`)
Signed-off-by: Olivier <olivier@librepush.net>
This commit is contained in:
parent
b7818dddc1
commit
cdc34d45f7
|
@ -198,7 +198,9 @@ bracketedTerm = _{ "(" ~ Expr ~ ")" }
|
|||
|
||||
|
||||
IntLiteral = @{ (ASCII_NONZERO_DIGIT ~ ASCII_DIGIT+ | ASCII_DIGIT) }
|
||||
Identifier = { (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* }
|
||||
// `-` is important in identifiers for `kebab-case` HTML element attributes
|
||||
// We could consider splitting this out into its own kind of identifier but let's not bother now.
|
||||
Identifier = { (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_" | "-")* }
|
||||
commaSeparatedExprs = _{ wsnl* ~ (Expr ~ wsnl* ~ ("," ~ wsnl* ~ Expr ~ wsnl*)* ~ ("," ~ wsnl*)?)? }
|
||||
FunctionCall = { Identifier ~ "(" ~ commaSeparatedExprs ~ ")" }
|
||||
Variable = { "$" ~ Identifier }
|
||||
|
|
Loading…
Reference in New Issue