About the IMPORT instruction
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 20/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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
- Langage dominant
- C#
- Étoiles
- 0
- Forks
- 0
- Merge moyen
- 3 j 4 h
- PR mergées (30 j)
- 5
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Natvs/Nt.SyntaxParser
-
New light syntaxOuvertegood first issue usability
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
Natvs/Nt.SyntaxParser#45 ·
-
Starting a new branchOuvertegood first issue usability
Difficulté 3/5 Une demi-journée Accessibilité débutants 73/100
Natvs/Nt.SyntaxParser#44 ·
-
documentation
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
Natvs/Nt.SyntaxParser#35 ·
-
More pre-parsing instructionsOuverteenhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
Natvs/Nt.SyntaxParser#28 ·
-
Comments in grammar filesOuverteenhancement good first issue
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Natvs/Nt.SyntaxParser#15 ·
Toutes les issues de Natvs/Nt.SyntaxParser
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Natvs/Nt.Automaton#33 ·
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
a-corriger documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
christian-raj/S-Aloha#312 ·
-
ready-for-agent tech-debt
Difficulté 1/5 1-3 heures Accessibilité débutants 85/100
DigiBanks99/menlo#640 ·
Les mainteneurs répondent en général sous 1 jour
-
ci
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
OpenTabletDriver/OpenTabletDriver#5283 ·
Les mainteneurs répondent en général sous 3 jours