rokucommunity / rokucommunity/brighterscript
XmlParsing issue
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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