-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors logs improvements #167
Merged
Merged
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6300dbc
improved template syntax errors with file, line number and failed tok…
ilyapuchka 69cd8e4
replaced Token with Lexeme protocol on TemplateSyntaxError
ilyapuchka 0edb385
added ErrorReporter protocol with default implementation
ilyapuchka d5f0be9
using error reporter from environment to handle syntax errors
ilyapuchka e59609f
handling unknown filter errors
ilyapuchka 079fdf3
added parent context to ErrorReporterContext and handling errors in i…
ilyapuchka 7688326
renamed Scanner property for original content
ilyapuchka 97ab3cf
xcode backward compatibility fixes
ilyapuchka 5878c32
fixed iterating over template lines on linux
ilyapuchka 27135f3
changer Never return type to Error in ErrorReporter
ilyapuchka 53c1550
reporting node rendering errors using reference to node’s token
ilyapuchka 9a28142
reporting error with its parent context
ilyapuchka c486617
fixed reporting errors in child templates
ilyapuchka bb3f337
unified setting higlighting range for errors
ilyapuchka ea7e1ef
fixed highlighting of errors happening in {{ block.super }}
ilyapuchka 218822f
updated CHANGELOG
ilyapuchka 8d68edd
replaced Lexeme protocol with Token
ilyapuchka 7756522
fixed error on swift 3.1
ilyapuchka ed885f4
refactored environment tests
ilyapuchka abeb30b
fix rendering templates created from string literals
ilyapuchka cb12431
removed unneeded changes
ilyapuchka ac2fd56
storing full sourcemap in token, refactored error reporting
ilyapuchka a165a67
fixed typos
ilyapuchka 4bfdb73
removed unneeded code
ilyapuchka 662849e
removed trailing witespaces
ilyapuchka d6766b4
minor code refactoring
ilyapuchka b542927
fixed swift 3 compiler crash
ilyapuchka 3a4cd8a
Merge branch 'master' into errors-logs-improvements
ilyapuchka 4f1a5b3
store reference to token when parsing range variable
ilyapuchka b9702af
fixed indetnations
ilyapuchka 71ad162
more indentations fixed
ilyapuchka 92ebfe5
removed unneeded error reporter references
ilyapuchka 96a004e
replace implicitly unwrapped optional with fatalError
ilyapuchka File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the errorReporter property is only used by context's errorReporter property. But that isn't used anywhere (I may have missed this)?
What is the reason that the Environment and Context should hold the errorReporter? If I understand how this is intended to be used, a consumer of the library would catch an error and pass it to the errorReporter themselves? In that case I think it would make sense to remove the property from Environment and Context leaving the consumer free to create their own ErrorReporter as desired. Decoupling these a little bit.