[Github-comments] [geany/geany] Erlang parser doesnt care about leading whitespaces, geany symbols list does (#2653)

Jiří Techet notifications at xxxxx
Wed Jan 5 12:31:24 UTC 2022


For everyone who investigates this bug - the erlang ctags parser is very primitive and distinguishes function definitions only based on indentation in code such as:
```
tot_print(ToT) ->
  tot_print(1, ToT).
tot_print(Y, ToT) when Y =< size(ToT) ->
  tot_print_tuple(element(Y, ToT)),
  io:fwrite("~n"),
  tot_print(Y+1, ToT);
tot_print(Y, ToT) -> ok.
tot_print_tuple(T) ->
  tot_print_tuple(1, T).
tot_print_tuple(X, T) when X =< size(T) ->
  io:fwrite("~s", [[element(X, T)]]),
  tot_print_tuple(X+1, T);
tot_print_tuple(X, T) -> ok.
```
So for the ctags parser, definitions are those lines without any indentation. I think proper fix would require rewriting the whole parser to something better.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2653#issuecomment-1005646116
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/2653/1005646116 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220105/74ec4541/attachment.htm>


More information about the Github-comments mailing list