]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/scl/SCL/Common.scl
Compilation of SCL expressions from SCL
[simantics/platform.git] / bundles / org.simantics.scl.compiler / scl / SCL / Common.scl
diff --git a/bundles/org.simantics.scl.compiler/scl/SCL/Common.scl b/bundles/org.simantics.scl.compiler/scl/SCL/Common.scl
new file mode 100644 (file)
index 0000000..9fe13d1
--- /dev/null
@@ -0,0 +1,27 @@
+module {
+    export = [moduleOfName, nameOfName, createName]
+}
+
+// Names
+
+importJava "org.simantics.scl.compiler.common.names.Name" where
+    data Name
+    
+    @JavaName module
+    moduleOfName_ :: Name -> String
+    @JavaName name
+    nameOfName_ :: Name -> String
+    
+    @JavaName create
+    createName_ :: String -> String -> Name
+
+instance Show Name where
+    sb <+ n = sb << moduleOfName n << "/" << nameOfName n
+    
+moduleOfName = moduleOfName_
+nameOfName = nameOfName_
+createName = createName_    
+    
+// Locations
+
+type Location = Long
\ No newline at end of file