Skip to content

Commit

Permalink
fix: seq expression following decl expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Nsidorenco committed Apr 25, 2024
1 parent 0b7fcab commit 7a793db
Show file tree
Hide file tree
Showing 5 changed files with 16,416 additions and 16,360 deletions.
13 changes: 7 additions & 6 deletions examples/expressions.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
do
Serializer(
1,
2,
3
)

let f x =
let y = x + 1
printfn y
printfn y
printfn y
printfn y
17 changes: 7 additions & 10 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,16 +702,13 @@ module.exports = grammar({
)),

declaration_expression: $ =>
prec.right(PREC.LET_EXPR,
seq(
choice(
seq(choice('use', 'use!'), $.identifier, '=', scoped($._expression, $._indent, $._dedent)),
$.function_or_value_defn,
),
field('in',
prec.right(PREC.SEQ_EXPR + 1, $._expression)
),
)),
seq(
choice(
seq(choice('use', 'use!'), $.identifier, '=', scoped($._expression, $._indent, $._dedent)),
$.function_or_value_defn,
),
field('in', $._expression)
),

do_expression: $ =>
prec(PREC.DO_EXPR,
Expand Down
130 changes: 61 additions & 69 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7a793db

Please sign in to comment.