About the IMPORT instruction
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
The payload names no files, so start by finding the pre-parser and the IMPORT handling in the C# source. Read how the main file's configuration is applied to the merged text. Done would mean imported files are pre-parsed recursively with their own configuration, syntax errors report the correct file and line, and the grammar reads are merged before the main parse. The issue is a design proposal with no maintainer decision, so confirm the approach in the thread before writing code.
Written by the indexing model from the issue text.
Description
What we have now
The pre-parsing applies on the main file. For each IMPORT read, it deletes that import and add the imported content to the start of the new string to parse.
The problem
Now if there is an error in one file, the parsing will still trigger an error, but it will neither give the file it occurs nor the correct line of the error. Moreover, different files may need different configurations. As for now, only the last line is taken into account for configuration, and that may lead to unexpected errors when parsing.
Idea for solution
Here is what I propose:
- When the pre-parser reads the main file, each time a IMPORT instruction is encountered
- The pre-parsing is also applied on the imported file, with a new empty configuration context so that the main configuration and the imported file configuration does not conflict. (Each time a IMPORT instruction is read, pre-parsing must recursively applied to the imported file).
- The syntax parsing is applied to the imported file.
- Once the pre-parsing is finished, all imported grammar reads are merged together
- The parsing can normally apply on the main file normally
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from Natvs/Nt.SyntaxParser
-
New light syntaxOpengood first issue usability
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Natvs/Nt.SyntaxParser#45 ·
-
good first issue usability
Difficulty 3/5 Half a day Newbie friendliness 73/100
Natvs/Nt.SyntaxParser#44 ·
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Natvs/Nt.SyntaxParser#35 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
Natvs/Nt.SyntaxParser#28 ·
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Natvs/Nt.SyntaxParser#15 ·
All issues in Natvs/Nt.SyntaxParser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Natvs/Nt.Automaton#33 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
a-corriger documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
christian-raj/S-Aloha#312 ·
-
ready-for-agent tech-debt
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
DigiBanks99/menlo#640 ·
Maintainers usually reply within 1 day
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 62/100
OpenTabletDriver/OpenTabletDriver#5283 ·
Maintainers usually reply within 3 days