About the IMPORT instruction
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- C#
- 星标
- 0
- 派生
- 0
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 5
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Natvs/Nt.SyntaxParser 的其他 Issue
-
New light syntax未关闭good first issue usability
难度 3/5 1-2 天 新手友好度 48/100
Natvs/Nt.SyntaxParser#45 ·
-
good first issue usability
难度 3/5 半天 新手友好度 73/100
Natvs/Nt.SyntaxParser#44 ·
-
documentation
难度 3/5 1-2 天 新手友好度 55/100
Natvs/Nt.SyntaxParser#35 ·
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
Natvs/Nt.SyntaxParser#28 ·
-
enhancement good first issue
难度 4/5 3-5 天 新手友好度 35/100
Natvs/Nt.SyntaxParser#15 ·
查看 Natvs/Nt.SyntaxParser 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
Natvs/Nt.Automaton#33 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
a-corriger documentation
难度 2/5 1-3 小时 新手友好度 82/100
christian-raj/S-Aloha#312 ·
-
ready-for-agent tech-debt
难度 1/5 1-3 小时 新手友好度 85/100
DigiBanks99/menlo#640 ·
维护者通常 1 天内回复
-
ci
难度 1/5 1 小时以内 新手友好度 62/100
OpenTabletDriver/OpenTabletDriver#5283 ·
维护者通常 3 天内回复