[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[imp-commit] r22970 - trunk/org.eclipse.imp.pdb.values/src/org/eclipse/imp/pdb/facts/impl/fast

Author: jvinju
Date: 2012-01-31 15:33:10 -0500 (Tue, 31 Jan 2012)
New Revision: 22970

Modified:
   trunk/org.eclipse.imp.pdb.values/src/org/eclipse/imp/pdb/facts/impl/fast/ValueFactory.java
Log:
avoid use of -1, instead make a source location without ints

Modified: trunk/org.eclipse.imp.pdb.values/src/org/eclipse/imp/pdb/facts/impl/fast/ValueFactory.java
===================================================================
--- trunk/org.eclipse.imp.pdb.values/src/org/eclipse/imp/pdb/facts/impl/fast/ValueFactory.java	2012-01-27 08:10:41 UTC (rev 22969)
+++ trunk/org.eclipse.imp.pdb.values/src/org/eclipse/imp/pdb/facts/impl/fast/ValueFactory.java	2012-01-31 20:33:10 UTC (rev 22970)
@@ -224,7 +224,11 @@
 	}
 	
 	public ISourceLocation sourceLocation(String path){
-		return sourceLocation(path, -1, -1, -1, -1, -1, -1);
+		try {
+			return sourceLocation(new URI("file://" + path));
+		} catch (URISyntaxException e) {
+			throw new FactParseError("Illegal path syntax: " + path, e);
+		}
 	}
 	
 	public IDateTime datetime(int year, int month, int day, int hour, int minute, int second, int millisecond){