diff core/src/luan/LuanElement.java @ 171:3dcb0f9bee82

add core component git-svn-id: https://luan-java.googlecode.com/svn/trunk@172 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Sun, 22 Jun 2014 05:41:22 +0000
parents src/luan/LuanElement.java@7e160d2f6d9c
children b48cfa14ba60
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/src/luan/LuanElement.java	Sun Jun 22 05:41:22 2014 +0000
@@ -0,0 +1,20 @@
+package luan;
+
+
+public abstract class LuanElement {
+
+	final String toString(String fnName) {
+		String s = location();
+		if( fnName != null )
+			s += ": in function '" + fnName + "'";
+		return s;
+	}
+
+	abstract String location();
+
+	public static final LuanElement JAVA = new LuanElement(){
+		@Override String location() {
+			return "Java";
+		}
+	};
+}