Skip to content

Commit

Permalink
Fix: Disallow revset function names starting with a number.
Browse files Browse the repository at this point in the history
  • Loading branch information
matts1 committed Oct 4, 2024
1 parent 3d26af8 commit 7f42180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/revset.pest
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ compat_sub_op = { "-" }
infix_op = _{ union_op | intersection_op | difference_op | compat_add_op | compat_sub_op }

function = { function_name ~ "(" ~ whitespace* ~ function_arguments ~ whitespace* ~ ")" }
function_name = @{ (ASCII_ALPHANUMERIC | "_")+ }
function_name = @{ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* }
keyword_argument = { identifier ~ whitespace* ~ "=" ~ whitespace* ~ expression }
argument = _{ keyword_argument | expression }
function_arguments = {
Expand Down

0 comments on commit 7f42180

Please sign in to comment.