Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/erlfmt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

-export_type([error_info/0, config/0, pragma/0]).

-type error_info() :: {file:name_all(), erl_anno:location(), module(), Reason :: any()}.
-type error_info() :: {
file:name_all(), erl_anno:location() | erlfmt_scan:anno(), module(), Reason :: any()
}.
-type pragma() :: require | insert | delete | ignore.
-type config() :: [{pragma, pragma()} | {print_width, pos_integer()} | verbose].

Expand Down
2 changes: 1 addition & 1 deletion src/erlfmt_parse.yrl
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ Erlang code.

%% XXX. To be refined.
-type error_description() :: term().
-type error_info() :: {erl_anno:line(), module(), error_description()}.
-type error_info() :: {erl_anno:location() | erlfmt_scan:anno(), module(), error_description()}.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ret_err/2 throws a proper erl_anno:location(), not sure if it can be returned by parse_node or if it always returns erlfmt_scan:anno()

-type token() :: erlfmt_scan:token().

%% mkop(Op, Arg) -> {op,Anno,Op,Arg}.
Expand Down