You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2016/11/14 23:42:26 UTC

git commit: [flex-falcon] [refs/heads/develop] - compiler: SourceLocation constructor takes endLine and endColumn (but keeps option to omit them to maintain backwards compatibility

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 3d3993f89 -> 2b54f35c1


compiler: SourceLocation constructor takes endLine and endColumn (but keeps option to omit them to maintain backwards compatibility


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2b54f35c
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2b54f35c
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2b54f35c

Branch: refs/heads/develop
Commit: 2b54f35c1d83b1f382e814a161d610450761d86d
Parents: 3d3993f
Author: Josh Tynjala <jo...@gmail.com>
Authored: Mon Nov 14 15:34:58 2016 -0800
Committer: Josh Tynjala <jo...@gmail.com>
Committed: Mon Nov 14 15:34:58 2016 -0800

----------------------------------------------------------------------
 .../flex/compiler/common/SourceLocation.java    | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2b54f35c/compiler/src/main/java/org/apache/flex/compiler/common/SourceLocation.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/common/SourceLocation.java b/compiler/src/main/java/org/apache/flex/compiler/common/SourceLocation.java
index 0d0e1b0..524dc60 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/common/SourceLocation.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/common/SourceLocation.java
@@ -30,15 +30,24 @@ public class SourceLocation implements ISourceLocation
     /**
      * Constructor for a known source location.
      */
-    public SourceLocation(String sourcePath, int start, int end, int line, int column)
+    public SourceLocation(String sourcePath, int start, int end,
+                          int line, int column, int endLine, int endColumn)
     {
         this.sourcePath = sourcePath;
         this.start = start;
         this.end = end;
         this.line = line;
         this.column = column;
-        this.endLine = UNKNOWN;
-        this.endColumn = UNKNOWN;
+        this.endLine = endLine;
+        this.endColumn = endColumn;
+    }
+
+    /**
+     * For backwards compatibility
+     */
+    public SourceLocation(String sourcePath, int start, int end, int line, int column)
+    {
+        this(sourcePath, start, end, line, column, UNKNOWN, UNKNOWN);
     }
     
     /**
@@ -50,7 +59,9 @@ public class SourceLocation implements ISourceLocation
              location.getStart(),
              location.getEnd(),
              location.getLine(),
-             location.getColumn());
+             location.getColumn(),
+             location.getEndLine(),
+             location.getEndColumn());
     }
 
     /**
@@ -58,7 +69,7 @@ public class SourceLocation implements ISourceLocation
      */
     public SourceLocation()
     {
-        this(null, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN);
+        this(null, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN);
     }
 
     /**