From fc29b9d041141f6918291c1e2510750cfde37d4a Mon Sep 17 00:00:00 2001 From: Nicolas BACQUEY Date: Wed, 5 Jul 2023 17:05:52 +0200 Subject: [PATCH] [OCaml] open `function_definition` scope more often --- topiary/languages/ocaml.scm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/topiary/languages/ocaml.scm b/topiary/languages/ocaml.scm index 204d0f0f..3aa145bc 100644 --- a/topiary/languages/ocaml.scm +++ b/topiary/languages/ocaml.scm @@ -785,18 +785,13 @@ ) @end_scope (#scope_id! "function_definition") ) -(parenthesized_expression - (function_expression - "function" @append_spaced_scoped_softline - ) @begin_scope @end_scope - (#scope_id! "function_definition") -) +; The following is the general case, which should happen anywhere except in let bindings ( - (_) @begin_scope + "="? @do_nothing . (function_expression "function" @append_spaced_scoped_softline - ) @end_scope + ) @begin_scope @end_scope (#scope_id! "function_definition") ) (function_expression