This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 71aed60430f5ef483810a0636f53f6c6c050ce39 Author: Josh Tynjala <[email protected]> AuthorDate: Wed Aug 7 12:54:03 2024 -0700 TokenBase: in adjustLocation(), don't adjust the end column unless endLine == line If we have any tokens that are multi-line, this might affect them. I'm guessing we don't, but technically, this is more correct. --- .../java/org/apache/royale/compiler/internal/parsing/TokenBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/TokenBase.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/TokenBase.java index 08006bec7..ffc8ba14b 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/TokenBase.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/TokenBase.java @@ -481,7 +481,11 @@ public abstract class TokenBase extends Token implements ICMToken, ISourceLocati line += lineAdjustment; column += columnAdjustment; endLine += lineAdjustment; - endColumn += columnAdjustment; + if (endLine == line) + { + // don't adjust end column if the start and end lines are different + endColumn += columnAdjustment; + } } /**
