diff --git a/tools/lsp/squirrel/grammar/camligo/grammar.js b/tools/lsp/squirrel/grammar/camligo/grammar.js index e3d9fb638..483fb2817 100644 --- a/tools/lsp/squirrel/grammar/camligo/grammar.js +++ b/tools/lsp/squirrel/grammar/camligo/grammar.js @@ -229,7 +229,7 @@ module.exports = grammar({ "fun", repeat1(field("arg", $._paren_pattern)), "->", - field("body", $._expr) + field("body", $._program) ), list_expr: $ => seq( diff --git a/tools/lsp/squirrel/grammar/pascaligo/grammar.js b/tools/lsp/squirrel/grammar/pascaligo/grammar.js index 5b94192b3..6ba30796c 100644 --- a/tools/lsp/squirrel/grammar/pascaligo/grammar.js +++ b/tools/lsp/squirrel/grammar/pascaligo/grammar.js @@ -363,13 +363,11 @@ module.exports = grammar({ choice( $._instruction, $.clause_block, + $.block, ), clause_block: $ => - choice( - field("block", $.block), - seq('{', sepBy1(';', field("statement", $._statement)), '}') - ), + seq('{', sepBy1(';', field("statement", $._statement)), '}'), block: $ => choice( @@ -822,4 +820,4 @@ module.exports = grammar({ skip: $ => 'skip', recursive: $ => 'recursive', } -}); \ No newline at end of file +});