Skip to content

Commit

Permalink
feat: add support for camunda variable escaping extension
Browse files Browse the repository at this point in the history
fixes #36
  • Loading branch information
makepanic committed Aug 21, 2024
1 parent 4f9b608 commit 72252bc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/feel.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Identifier {
}

VariableName {
(!name Identifier ~ident)+
(!name Identifier ~ident)+ | backtickIdentifier
}

AdditionalIdentifier[@name=Identifier] {
Expand Down Expand Up @@ -453,6 +453,10 @@ commaSep<Expr> {
(digits ("." digits)? | "." digits)
}

backtickIdentifier {
"`" (![\\\n`] | "\\" _)* "`"
}

@precedence { BlockComment, LineComment, divide }

@precedence {
Expand Down
15 changes: 15 additions & 0 deletions test/expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2619,4 +2619,19 @@ foo[[[[[[[(1..10).start included]]]]]]]

Expression(
FilterExpression(VariableName(...), List(...))
)


# Camunda escape character { "top": "Expressions" }

`foo`;
foo.`bar`;
foo.`bar-baz`;

==>

Expressions(
VariableName(...),
PathExpression(VariableName(...), VariableName(...)),
PathExpression(VariableName(...), VariableName(...))
)

0 comments on commit 72252bc

Please sign in to comment.