Skip to content

Grammar converter does not escape rule names #4

@mamacdon

Description

@mamacdon

Grammar rules can have names containing special characters. The converter currently does not escape these when it spits out the JavaScript object literal, so you end up with syntax errors.

For example, the Java grammar that comes with TextMate produces this:

repository: {
    all-types: { // bad
        ...
    }
}

Also, JS reserved words may be present as keys (class, char, …). They must be escaped as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions