Skip to content

Commit

Permalink
Handle parsing sigil (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
plux authored Sep 27, 2024
1 parent 21fc148 commit 5afd375
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/els_lsp/src/els_erlfmt_ast.erl
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ erlfmt_to_st(Node) ->
{args, Pos, Args} ->
AAnno = dummy_anno(),
erlfmt_to_st_1({tuple, Pos, [{atom, AAnno, '*args*'} | Args]});
{sigil, Pos, _SigilPrefix, {string, StringPos0, Text}, _SigilSuffix} ->
%% erl_syntax doesn't handle sigils, so we just extract the string
%% Move start of string to start of sigil
StringPos = StringPos0#{location := maps:get(location, Pos)},
erlfmt_to_st_1({string, StringPos, Text});
%% TODO:
%% New `{spec_clause, Anno, Head, Body, Guards}` node for clauses
%% inside `spec` and `callback` attributes, similar to the `clause`
Expand Down

0 comments on commit 5afd375

Please sign in to comment.