Skip to content

Better error message for missing comma inside attribute list #95

@schveiguy

Description

@schveiguy
a(href="/blah/blah" target="_blank")

results in a very long series of errors that aren't actually in the code. An example from my project:

job/edit.dt(417,51): Error: found `target` when expecting `;` following `return` statement
job/edit.dt(417,57): Error: found `=` instead of statement
job/edit.dt(416,18): Error: found `target` when expecting `)`
job/edit.dt(416,24): Error: found `=` instead of statement
job/edit.dt(416,42): Error: found `target` when expecting `)`
job/edit.dt(416,48): Error: found `=` when expecting `)`
job/edit.dt(416,49): Error: found `"_blank"` when expecting `)`
job/edit.dt(416,57): Error: found `)` instead of statement
job/edit.dt(416,44): Error: found `target` when expecting `)`
job/edit.dt(416,59): Error: found `)` when expecting `;` following statement
job/edit.dt(416,60): Deprecation: use `{ }` for an empty statement, not `;`

It's not always the same set of errors.

It would be nice if the diet compiler could say "missing comma in attribute list" instead of generating invalid D code.

Note that pug files actually allow spaces, and I get confused because on another project, I'm actually using pug.

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