X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ferrors%2FLocations.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ferrors%2FLocations.java;h=70c258b9bab1fa89ae816c97d1bb02d7290441b6;hp=3a77cf3250d7c1f58bd17c2e2fcbd8ac164bb9db;hb=bb8e054f744ea6a627ac9f2e3cc49c08719bed90;hpb=1ee8004c71eaa9818fe1a49e16d0463adbf559f6 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); + } }