HaxeFoundation / HaxeFoundation/haxe

Ast.unescape should not exist

Open
#12,160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Every time I come across this function I wonder why it exists. We use it to handle things like `"\n"` becoming an actual newline character, as opposed to backslash plus n. What I don't understand is why we don't do this in the lexer directly, because its whole job is to lex our string anyway.

I might be missing something though...

Contributor guide

Open the contributing guide

Research direction

Start by locating Ast.unescape and the lexer code that handles string literals. Compare their responsibilities and existing escape handling; done means the project has a decided approach for where unescaping belongs, with behavior preserved and appropriate tests updated.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.