pull/659/head
s.bazarsadaev 2023-06-14 19:18:26 +07:00
parent 3c5e57a55b
commit 662a3e9957
3 changed files with 32 additions and 4 deletions

@ -1065,6 +1065,8 @@ object O {
}
{ b =>
if (c) d.e }
{ a => implicit b => b }
{ (a: Int) ?=> (b: Int) => b }
}
--------------------------------------------------------------------------------
@ -1137,7 +1139,25 @@ object O {
(identifier))
(field_expression
(identifier)
(identifier)))))))))
(identifier))))))
(block
(lambda_expression
(identifier)
(lambda_expression
(identifier)
(identifier))))
(block
(lambda_expression
(bindings
(binding
(identifier)
(type_identifier)))
(lambda_expression
(bindings
(binding
(identifier)
(type_identifier)))
(identifier)))))))
================================================================================
Unit expressions

@ -90,6 +90,7 @@ module.exports = grammar({
[$.class_parameters],
// 'for' operator_identifier ':' _annotated_type • ':' …
[$._type, $.compound_type],
[$.lambda_expression, $.modifiers],
],
word: $ => $._alpha_identifier,
@ -1051,8 +1052,15 @@ module.exports = grammar({
lambda_expression: $ =>
prec.right(
seq(
field("parameters", choice($.bindings, $._identifier, $.wildcard)),
"=>",
field(
"parameters",
choice(
$.bindings,
seq(optional("implicit"), $._identifier),
$.wildcard,
),
),
choice("=>", "?=>"),
$._indentable_expression,
),
),

@ -3,7 +3,7 @@
# This is an integration test to generally check the quality of parsing.
SCALA_SCALA_LIBRARY_EXPECTED=100
SCALA_SCALA_COMPILER_EXPECTED=95
SCALA_SCALA_COMPILER_EXPECTED=96
DOTTY_COMPILER_EXPECTED=83
SYNTAX_COMPLEXITY_CEILING=1300