ktn_dodger can't parse -else.
Open
Nobody has claimed this yet.
bug
- Dominant language
- Erlang
- Stars
- 18
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
When running ktn_dodger:parse_file/1,2 on a file with an -else., it reports an error (or, if using no_fail, it just parses that as text instead of an actual attribute).
To Reproduce
Try running ktn_parse:parse_file/1,2 on the following file…
-module x.
-export [x/0].
-ifdef(VAR).
x() ->
var.
-else.
x() ->
not_var.
-endif.
Expected Behavior
-else. to be parsed as an attribute.
Additional Context
- OS: MacOS
- Erlang version: OTP25
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ktn_dodger:parse_file/1,2 and reproduce the issue using the Erlang file shown in the report. Check how the parser handles -ifdef, -else, and -endif, then verify that -else. is returned as an attribute rather than an error or text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100