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 => { b =>
if (c) d.e } if (c) d.e }
{ a => implicit b => b }
{ (a: Int) ?=> (b: Int) => b }
} }
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -1137,7 +1139,25 @@ object O {
(identifier)) (identifier))
(field_expression (field_expression
(identifier) (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 Unit expressions

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

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