diff backendutils.rhope @ 35:3498713c3dc9

C backend portion of supporting user defined types is done, but untested. Parser/NWorker still need a fair bit of work
author Mike Pavone <pavone@retrodev.com>
date Wed, 30 Sep 2009 23:55:04 -0400
parents 914ad38f9b59
children 495dddadd058
line wrap: on
line diff
--- a/backendutils.rhope	Wed Sep 30 01:25:03 2009 -0400
+++ b/backendutils.rhope	Wed Sep 30 23:55:04 2009 -0400
@@ -1,8 +1,7 @@
 
-Escape Rhope Name[name:escaped]
+Escape Rhope Name NU[name:escaped]
 {
-	escaped <- [[[[[[[[[[[name]Replace["_","__"]
-		]Replace["@","_AT_"]
+	escaped <- [[[[[[[[[[name]Replace["@","_AT_"]
 		]Replace[" ","_SP_"]
 		]Replace[":","_CN_"]
 		]Replace["?","_QN_"]
@@ -14,6 +13,11 @@
 		]Replace["<","_GT_"]
 }
 
+Escape Rhope Name[name:escaped]
+{
+	escaped <- Escape Rhope Name NU[[name]Replace["_","__"]]
+}
+
 Blueprint AddRef
 {
 	Value
@@ -137,3 +141,19 @@
 {
 	out <- ["("]Append[[[[cond]Condition1 >>]Append[" && "]]Append[[[cond]Condition2 >>]Append[")"]]]
 }
+
+Blueprint Field Ref
+{
+	Variable
+	Field
+}
+
+Field Ref[var,field:out]
+{
+	out <- [[Build["Field Ref"]]Variable <<[var]]Field <<[field]
+}
+
+Make Op@Field Ref[ref,func:out]
+{
+	out <- [func]Field Result[[ref]Variable >>,[ref]Field >>]
+}