diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-analy.boot | 6 | ||||
-rw-r--r-- | src/interp/i-spec2.boot | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 84518d51..1541fbc7 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -207,6 +207,12 @@ pushDownOp?(op,n) == -- Also see I-SPEC BOOT for special handlers and I-MAP BOOT for -- user function processing. +++ Take a parse form and return the VAT for its elaboration. +elaborateForm pf == + t := mkAtree1 pf + bottomUp t + t + bottomUp t == -- bottomUp takes an attributed tree, and returns the modeSet for it. -- As a side-effect it also evaluates the tree. diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index 43be7dd2..5b3742ee 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -210,19 +210,19 @@ uphas t == t isnt [op,type,prop] => nil -- handler for category and attribute queries type := - isLocalVar(type) => - $genValue => ["evaluateType", ["unabbrev", type]] - -- At this point, type will have already been reduced to - -- its object representation. - ["devaluate", type] - MKQ unabbrev type + x := elaborateForm type + getModeSet x is [m] and (conceptualType m = $Type or categoryForm? m) => + val := objValUnwrap getValue x + $genValue => MKQ val + ["devaluate",val] + throwKeyedMsg("S2IE0021",[type]) catCode := -- FIXME: when we come to support category valued variable -- this code needs to be adapted. prop := unabbrev prop evaluateType0 prop => ["evaluateType", MKQ prop] MKQ prop - code:=["newHasTest",type, catCode] + code := ["NOT",["NULL",["newHasTest",type, catCode]]] if $genValue then code := wrap timedEVALFUN code putValue(op,objNew(code,$Boolean)) putModeSet(op,[$Boolean]) |