HaxeFoundation / HaxeFoundation/haxe

@:markup "string" vs EDisplay

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

Description

Try hovering `` in the example below:

```haxe
macro function f(e) {
trace(e);
return macro null;
}

function main() {
f();
}
```

and observe weird expr structure:

```
src/Main.hx:2: {pos: #pos(src/Main.hx:7: characters 4-12), expr: EMeta({name: :markup, params: [], pos: #pos(src/Main.hx:7: characters 4-5)},{pos: #pos(src/Main.hx:7: characters 4-12), expr: EDisplay({pos: #pos(src/Main.hx:7: characters 4-12), expr: EConst(<...>)},DKMarked)})}
```

Basically, `EDisplay` is inserted between `@:markup` and `EConst(Cstring))`, which is weird and awkward to process, since markup literals are supposed to always be `@:markup "literal"`. I beleve it should always be `EDisplay(@:markup "literal")` instead.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.