From d217674a21a02825a09cf90598c2195b440ffadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20M=C3=A4nnchen?= Date: Wed, 21 Feb 2024 18:41:09 +0100 Subject: [PATCH] Fix "expression updates a literal" warning for OTP 27 (#353) --- src/erlfmt_parse.yrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/erlfmt_parse.yrl b/src/erlfmt_parse.yrl index 8afc35b..dfd3a5d 100644 --- a/src/erlfmt_parse.yrl +++ b/src/erlfmt_parse.yrl @@ -1048,10 +1048,10 @@ Erlang code. -define(val(Tok), element(1, Tok)). --define(range_anno(Tok1, Tok2), #{ +-define(range_anno(Tok1, Tok2), begin #{ location => map_get(location, ?anno(Tok1)), end_location => map_get(end_location, ?anno(Tok2)) -}). +} end). -define(range_upto_anno(Tok1, Tok2), #{ location => map_get(location, ?anno(Tok1)),