Fix a few issues with parsing drawings#9
Merged
CoffeeFlux merged 2 commits intoTypesettingTools:masterfrom Jan 1, 2023
Merged
Conversation
The constructor should be given an empty argument list. The if block cannot be simply removed entirely, since then any coordinates following the 'c' would cause an infinite loop since the Close command has parameter count 0.
075ab78 to
854bc3f
Compare
These might have worked for some moonscript version in the past (I don't know for sure), but they don't appear in the reference, and they do not work on Aegisub builds currently in use or current moonscript distributions on Linux. "a, b += 1" just compiles to "local a = a + 1".
854bc3f to
72578ef
Compare
CoffeeFlux
reviewed
Jan 1, 2023
|
|
||
| DrawBezier.getTagParams = (precision = @__tag.precision) => | ||
| x1, y1, x2, y2, x3, y3 = @p1.x, @p1.y, @p2.x, @p2.y, @p3.x, @p3.y | ||
| x1, x2, x3, y1, y2, y3 %= @__tag.mod if @__tag.mod |
Member
There was a problem hiding this comment.
Ouch. Did you skim through to see if this happens elsewhere, or should I do that? It's also probably worth quickly auditing DepCtrl for this pattern...
Member
Author
There was a problem hiding this comment.
I grepped all of assf for something like ,.*[^ =!]= to find these, so hopefully these are all occurrences here
Member
Author
There was a problem hiding this comment.
Looks like DepCtrl doesn't have any of these.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This can mostly be reviewed commit by commit, with explanations in the commit messages.
The handling of the
ccommand isn't perfect yet, especially since it should only be relevant when followingscommands, and those aren't even recognized yet. For that reason, I just made this minimally invasive fix and nothing more. If parsing ofsis ever added,ccan be adjusted.