changeset 263:98147071baf6

Add support for llMessage definitions in buildMethodTables
author Michael Pavone <pavone@retrodev.com>
date Mon, 14 Jul 2014 09:30:31 -0700
parents 9d93e65a34be
children cba0cb39517a
files modules/ast.tp modules/symbols.tp
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/ast.tp	Mon Jul 14 09:29:49 2014 -0700
+++ b/modules/ast.tp	Mon Jul 14 09:30:31 2014 -0700
@@ -125,6 +125,9 @@
 				tocall <- _tocall
 				args <- _args
 				hasReceiver? <- _receiver?
+				llMessage? <- {
+					(tocall nodeType) = _symbol && (tocall name) = "llMessage:withVars:andCode"
+				}
 				stringIndent <- :indent {
 					argparts <- []
 					if: (tocall nodeType) = _symbol {
--- a/modules/symbols.tp	Mon Jul 14 09:29:49 2014 -0700
+++ b/modules/symbols.tp	Mon Jul 14 09:30:31 2014 -0700
@@ -53,11 +53,17 @@
 		buildMethodTable <- :tree {
 			_object <- ast obj
 			_assignment <- ast assignment
+			_call <- ast call
+
 			tree fold: table with: :acc el {
 				if: (el nodeType) = _object {
 					(el messages) fold: acc with: :acc msg {
 						if: (msg nodeType) = _assignment {
 							acc defineMethod: ((msg to) name)
+						} else: {
+							if: (msg nodeType) = _call && (msg llMessage?) {
+								acc defineMethod: (((msg args) value) name)
+							}
 						}
 						acc
 					}