Fix the line number for rules produced inside a sigil_SHEET
#77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Required to fix bug in liveview-native/liveview-client-swiftui#1402.
Currently, the
sigil_SHEET
parses blocks and hands the block contents to asigil_RULES
. We don't pass down any line information to thesigil_RULES
. The parser used by thesigil_RULES
will not receive information about the location of the block contents it is parsing.In the sheet below, the rules parser will treat
rule-blue
andrule-yellow
as though they are at the same location. Both are assumed to be on line 3 (1 (Location of sheet parser) + 1 (location of block in sheet) + 1 (location of rule in block)).This PR passes block line information from the sheet parser down to the rules parser which allows for more correct errors and warnings. In the example above,
rule-blue
will be on line 3 andrule-yellow
on line 7.