-
Notifications
You must be signed in to change notification settings - Fork 15
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
Improvement/pattern parser #141
Conversation
merge: merge of all commits until 2/1/2021
.map(s -> PatternParser.parsePattern(s, logger).orElse(null)) | ||
.map(s -> { | ||
var result = PatternParser.parsePattern(s, logger).orElse(null); | ||
logger.finalizeLogs(); |
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.
Shouldn't this logger be outside the stream? After all the patterns in the map have parsed, then finalize the logs?
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 recall correctly, finalizing the logs should be done after each parsing attempt, so if it is a pattern or a line of code. The naming could be a bit confusing, but honestly the whole SkriptLogger class lacks propper documentation and it took me a while to figure out as well.
I'll take a look just to be sure.
This pull request contains general improvements to the pattern parsing system.
Closes #140.