rokucommunity / rokucommunity/brighterscript

XmlParsing issue

Open
#753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

The xml parser detects the issue, but throws the error on the first line instead of the actual location.

it.only('flags missing closing tag', () => {
    program.setFile<XmlFile>(`components/app.xml`, trim`
    <?xml version="1.0" encoding="utf-8" ?>
        <component name="BaseScene" extends="Scene">
        <children>
            <LayoutGroup>
            <LayoutGroup/> <!--oops, it should have been </LayoutGroup> -->
        </children>
        </component>
    `);
    program.validate();
    expectDiagnostics(program, [{
        message: 'Syntax error',
        range: util.createRange(4, 20, 4, 33)
    }]);
});

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the inline test for “flags missing closing tag,” especially the XmlFile setup and program.validate() call. Trace the XML parser’s diagnostic location handling and make the reported range point to the mismatched tag on line 4 rather than the first line. Run the test and confirm the expected range and “Syntax error” diagnostic pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.