Skip to content

Error metadata lost on EEx syntax error #15296

@lukaszsamson

Description

@lukaszsamson

Elixir and Erlang/OTP versions

Erlang/OTP 28 [erts-16.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.20.0-rc.4 (25cbbfe) (compiled with Erlang/OTP 28)

Operating system

any

Current behavior

Repro:

EEx.compile_string("<%/ true %>", file: "sample.eex", line: 7)
** (EEx.SyntaxError) unsupported EEx syntax <%/ %> (the syntax is valid but not supported by the current EEx engine)
    lib/eex/engine.ex:219: EEx.Engine.handle_expr/3
    lib/eex/compiler.ex:350: EEx.Compiler.generate_buffer/4
    iex:1: (file)

Note neither file, line nor column is preserved

Expected behavior

EEx.SyntaxError should return file and position

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions