X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ferrors%2FLocations.java;h=70c258b9bab1fa89ae816c97d1bb02d7290441b6;hb=e515d1fda563f0fa3b8b71f9099696cf49a06d25;hp=3a77cf3250d7c1f58bd17c2e2fcbd8ac164bb9db;hpb=d8e51c3b7d55403115dc83d0a9b2337378e91fb8;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/Locations.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/Locations.java index 3a77cf325..70c258b9b 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/Locations.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/Locations.java @@ -48,4 +48,11 @@ public class Locations { localEnd = begin-end; return location(begin+localBegin, begin+localEnd); } + + public static String toString(long location) { + if(location == NO_LOCATION) + return "NO LOCATION"; + else + return beginOf(location) + "-" + endOf(location); + } }