From f6beec0a7ca37a1de7e3faf4e850a3dcaf4d197b Mon Sep 17 00:00:00 2001 From: Gaith Hallak Date: Thu, 17 Nov 2022 17:26:22 +0300 Subject: [PATCH] Add file to aeso_syntax:ann() --- src/aeso_ast_to_fcode.erl | 2 +- src/aeso_syntax.erl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/aeso_ast_to_fcode.erl b/src/aeso_ast_to_fcode.erl index 0eab963..6264b2c 100644 --- a/src/aeso_ast_to_fcode.erl +++ b/src/aeso_ast_to_fcode.erl @@ -58,7 +58,7 @@ | {contract_code, string()} %% for CREATE, by name | {typerep, ftype()}. --type fann() :: [ {file, string() | no_file} | {line, aeso_syntax:ann_line()} | {col, aeso_syntax:ann_col()} ]. +-type fann() :: [ {file, aeso_syntax:ann_file()} | {line, aeso_syntax:ann_line()} | {col, aeso_syntax:ann_col()} ]. -type fexpr() :: {lit, fann(), flit()} | {nil, fann()} diff --git a/src/aeso_syntax.erl b/src/aeso_syntax.erl index f1c7f99..0ff9f5e 100644 --- a/src/aeso_syntax.erl +++ b/src/aeso_syntax.erl @@ -10,7 +10,7 @@ -export([get_ann/1, get_ann/2, get_ann/3, set_ann/2, qualify/2]). --export_type([ann_line/0, ann_col/0, ann_origin/0, ann_format/0, ann/0]). +-export_type([ann_file/0, ann_line/0, ann_col/0, ann_origin/0, ann_format/0, ann/0]). -export_type([name/0, id/0, con/0, qid/0, qcon/0, tvar/0, op/0]). -export_type([bin_op/0, un_op/0]). -export_type([decl/0, letbind/0, typedef/0, pragma/0, fundecl/0]). @@ -24,8 +24,9 @@ -type ann_col() :: integer(). -type ann_origin() :: system | user. -type ann_format() :: '?:' | hex | infix | prefix | elif. +-type ann_file() :: string() | no_file. --type ann() :: [ {line, ann_line()} | {col, ann_col()} | {format, ann_format()} | {origin, ann_origin()} +-type ann() :: [ {file, ann_file()} | {line, ann_line()} | {col, ann_col()} | {format, ann_format()} | {origin, ann_origin()} | stateful | private | payable | main | interface | entrypoint]. -type name() :: string().