About the IMPORT instruction
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- C#
- Estrelas
- 0
- Forks
- 0
- Merge médio
- 3d 4h
- PRs com merge (30d)
- 5
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Natvs/Nt.SyntaxParser
-
New light syntaxAbertagood first issue usability
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
Natvs/Nt.SyntaxParser#45 ·
-
Starting a new branchAbertagood first issue usability
Dificuldade 3/5 Meio dia Facilidade para iniciantes 73/100
Natvs/Nt.SyntaxParser#44 ·
-
documentation
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
Natvs/Nt.SyntaxParser#35 ·
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
Natvs/Nt.SyntaxParser#28 ·
-
Comments in grammar filesAbertaenhancement good first issue
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
Natvs/Nt.SyntaxParser#15 ·
Todas as issues de Natvs/Nt.SyntaxParser
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NimblePros/eShopOnWeb#333 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Natvs/Nt.Automaton#33 ·
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
Add readme for the toolsAbertadocumentation
Dificuldade 2/5 Meio dia Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia