Mercurial > repos > tabletprog
comparison modules/symbols.tp @ 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 | 004946743678 |
children | aea99b93cf2f |
comparison
equal
deleted
inserted
replaced
262:9d93e65a34be | 263:98147071baf6 |
---|---|
51 } | 51 } |
52 | 52 |
53 buildMethodTable <- :tree { | 53 buildMethodTable <- :tree { |
54 _object <- ast obj | 54 _object <- ast obj |
55 _assignment <- ast assignment | 55 _assignment <- ast assignment |
56 _call <- ast call | |
57 | |
56 tree fold: table with: :acc el { | 58 tree fold: table with: :acc el { |
57 if: (el nodeType) = _object { | 59 if: (el nodeType) = _object { |
58 (el messages) fold: acc with: :acc msg { | 60 (el messages) fold: acc with: :acc msg { |
59 if: (msg nodeType) = _assignment { | 61 if: (msg nodeType) = _assignment { |
60 acc defineMethod: ((msg to) name) | 62 acc defineMethod: ((msg to) name) |
63 } else: { | |
64 if: (msg nodeType) = _call && (msg llMessage?) { | |
65 acc defineMethod: (((msg args) value) name) | |
66 } | |
61 } | 67 } |
62 acc | 68 acc |
63 } | 69 } |
64 } else: { | 70 } else: { |
65 acc | 71 acc |