Skip to content

Commit

Permalink
Change parsing order of parenthesized expression and inline function.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Nov 27, 2024
1 parent 16577e2 commit e037eef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion spec/examples/argument
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ component Main {
test()
}
}

-------------------------------------------------------------------------------
component Main {
fun render : String {
(value: String) { value }("")
}
}
2 changes: 1 addition & 1 deletion src/parsers/base_expression.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Mint
left =
case char
when '('
parenthesized_expression || inline_function
inline_function || parenthesized_expression
when '-', .ascii_number?
state_setter || number_literal || unary_minus
when '!'
Expand Down

0 comments on commit e037eef

Please sign in to comment.