Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0507-epp-Correct-creation-of-line-annotations.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0507-epp-Correct-creation-of-line-annotations.patch of Package erlang
From 3adaea882b35ebfa0f81cff930954ad1b558dca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Mon, 24 May 2021 05:47:11 +0200 Subject: [PATCH] epp: Correct creation of line annotations Use `erl_anno:new(0)` instead of `0` when creating token annotations. In the future, using a plain integer as the annotation may stop working. --- lib/stdlib/src/epp.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index 1ec3307dbd..8577fca072 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -1218,7 +1218,7 @@ rewrite_expr({call,_,{atom,_,defined},[N0]}, #epp{macs=Macs}) -> {atom,_,N1} -> N1; _ -> throw({bad,'if'}) end, - {atom,0,maps:is_key(N, Macs)}; + {atom,erl_anno:new(0),maps:is_key(N, Macs)}; rewrite_expr({call,_,{atom,_,Name},As0}, none) -> As = rewrite_expr(As0, none), Arity = length(As), @@ -1241,9 +1241,9 @@ rewrite_expr(Other, _) -> Other. to_conses([H|T]) -> - {cons,0,H,to_conses(T)}; + {cons,erl_anno:new(0),H,to_conses(T)}; to_conses([]) -> - {nil,0}. + {nil,erl_anno:new(0)}. %% scan_elif(Tokens, EndifToken, From, EppState) %% Handle the conditional parsing of a file. -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor