Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
3532-asn1-Quote-the-atoms-maybe-and-else.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3532-asn1-Quote-the-atoms-maybe-and-else.patch of Package erlang
From eb16500f70cbcc7dafe2150155238e05723f91da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Wed, 24 Nov 2021 12:27:57 +0100 Subject: [PATCH 2/2] asn1: Quote the atoms 'maybe' and 'else' --- lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl | 12 ++++++------ lib/asn1/src/asn1ct_imm.erl | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl index 35cf9691c7..a927abbb67 100644 --- a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl +++ b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl @@ -463,8 +463,8 @@ gen_decode_set(Gen, Typename, #type{}=D) -> emit(["SetFun = fun(FunTlv) ->", nl]), emit(["case FunTlv of ",nl]), NextNum = gen_dec_set_cases(Gen, Typename, CompList, 1), - emit([indent(6), {curr,else}," -> ",nl, - indent(9),"{",NextNum,", ",{curr,else},"}",nl]), + emit([indent(6), {curr,'else'}," -> ",nl, + indent(9),"{",NextNum,", ",{curr,'else'},"}",nl]), emit([indent(3),"end",nl]), emit([indent(3),"end,",nl]), @@ -906,18 +906,18 @@ gen_dec_choice(Erules,TopType, _ChTag, CompList, Ext) -> asn1ct_name:new(choTags), asn1ct_name:new(res), gen_dec_choice_cases(Erules,TopType,CompList), - emit([indent(6), {curr,else}," -> ",nl]), + emit([indent(6), {curr,'else'}," -> ",nl]), case Ext of noext -> emit([indent(9),"exit({error,{asn1,{invalid_choice_tag,", - {curr,else},"}}})",nl]); + {curr,'else'},"}}})",nl]); _ -> emit([indent(9),"{asn1_ExtAlt,", - {call,ber,ber_encode,[{curr,else}]},"}",nl]) + {call,ber,ber_encode,[{curr,'else'}]},"}",nl]) end, emit([indent(3),"end",nl]), asn1ct_name:new(tag), - asn1ct_name:new(else). + asn1ct_name:new('else'). gen_dec_choice_cases(_Erules,_TopType, []) -> ok; diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index 231048694a..cc18721000 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -1344,7 +1344,7 @@ eval_cond([[Cond|Actions]=H|T], Seen0) -> eval_cond(T, Seen); true -> [['_'|Actions]]; - maybe -> + 'maybe' -> [H|eval_cond(T, Seen)] end; true -> @@ -1362,7 +1362,7 @@ eval_cond_1({ge,I,N}) when is_integer(I), is_integer(N) -> I >= N; eval_cond_1({lt,I,N}) when is_integer(I), is_integer(N) -> I < N; -eval_cond_1(_) -> maybe. +eval_cond_1(_) -> 'maybe'. prepend_to_cond([H|T], Code) -> [prepend_to_cond_1(H, Code)|prepend_to_cond(T, Code)]; @@ -2067,7 +2067,7 @@ enc_opt_cs([{Cond,Imm0}|T], St0) -> true -> {Imm,#ost{t=Type}} = enc_opt(Imm0, St0), [{'_',Imm,Type}]; - maybe -> + 'maybe' -> St = update_type_info(Cond, St0), {Imm,#ost{t=Type}} = enc_opt(Imm0, St), [{Cond,Imm,Type}|enc_opt_cs(T, St0)] @@ -2079,18 +2079,18 @@ eo_eval_cond('_', _) -> eo_eval_cond({Op,{var,_}=Var,Val}, St) -> Type = get_type(Var, St), case t_range(Type) of - any -> maybe; + any -> 'maybe'; {_,_}=Range -> eval_cond_range(Op, Range, Val) end; -eo_eval_cond({_Op,{expr,_},_Val}, _St) -> maybe. +eo_eval_cond({_Op,{expr,_},_Val}, _St) -> 'maybe'. eval_cond_range(lt, {Lb,Ub}, Val) -> if Ub < Val -> true; Val =< Lb -> false; - true -> maybe + true -> 'maybe' end; -eval_cond_range(_Op, _Range, _Val) -> maybe. +eval_cond_range(_Op, _Range, _Val) -> 'maybe'. update_type_info({ult,{var,_}=Var,Val}, St) -> Int = t_integer({0,Val-1}), -- 2.34.1
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