diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-intern.boot | 1 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 2 | ||||
-rw-r--r-- | src/interp/i-spec2.boot | 29 | ||||
-rw-r--r-- | src/interp/pf2sex.boot | 21 | ||||
-rw-r--r-- | src/interp/ptrees.boot | 1 |
5 files changed, 45 insertions, 9 deletions
diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot index 681464a6..055fc160 100644 --- a/src/interp/i-intern.boot +++ b/src/interp/i-intern.boot @@ -251,6 +251,7 @@ mkAtree3(x,op,argl) == [mkAtreeNode 'DEF,[[op,:v.0],:r],if v.2 then v.2 else true,false] [mkAtreeNode 'DEF,[a,:r],true,false] op="[||]" => [mkAtreeNode op, :argl] + op in '(%Inline %With %Add %Export) => [mkAtreeNode op,:argl] --x is ['when,y,pred] => -- y isnt ['DEF,a,:r] => -- keyedSystemError("S2II0003",['"when",y,'"improper argument form"]) diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 1540cd68..9ad10e05 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -42,7 +42,7 @@ $specialOps := '( ADEF AlgExtension _and _case COERCE COLLECT construct Declare DEF Dollar equation error free has IF _is _isnt iterate _break %LET _local MDEF _or pretend QUOTE REDUCE REPEAT _return SEQ TARGET tuple typeOf _where - _[_|_|_] %Macro %MLambda) + _[_|_|_] %Macro %MLambda %Import %Export %Inline %With %Add) $repeatLabel := NIL $breakCount := 0 diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index f8c2ab27..e78da954 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -1160,6 +1160,14 @@ copyHack(env) == CONS(CAR p,[(EQCAR(q,'localModemap) => q; copy q) for q in CDR p]) [[d]] +--% importing domains +up%Import t == + t isnt [.,:types] => nil + -- ??? shall we error in case types is nil? + for x in types repeat + $e := addDomain(devaluate objVal getValue x,$e) + setValueToVoid t + --% Macro handling -- Well, in fact we never handle macros in the interpreter directly. @@ -1173,6 +1181,27 @@ up%Macro t == up%MLambda t == setValueToVoid t + +--% Sorry for unhandled input constructs +sorry kind == + throwKeyedMsg("S2IP0006",[kind]) + +--% Export +up%Export t == + sorry '"export declaration" + +--% Inline +up%Inline t == + sorry '"inline declaration" + +--% Category +up%With t == + sorry '"category definition" + +--% Domain +up%Add t == + sorry '"domain definition" + -- Creates the function names of the special function handlers and puts -- them on the property list of the function name diff --git a/src/interp/pf2sex.boot b/src/interp/pf2sex.boot index 77c04c83..9da4d3b4 100644 --- a/src/interp/pf2sex.boot +++ b/src/interp/pf2sex.boot @@ -495,19 +495,25 @@ pfMLambda2Sex pf == pfType2SexOrNil pf == - pfNohting? pf => nil + pfNothing? pf => nil + pf2Sex1 pf + +pfDoc2SexOrNil pf == + pfNothing? pf => nil pf2Sex1 pf pfWith2Sex pf == - ["%With", pf2Sex1 pfWithBase, pf2Sex1 pfWithWithin pf, - pf2Sex1 pf2Sex1 pfWithWithon pf] + ["%With", pfType2SexOrNil pfWithBase pf, + [pf2Sex1 s for s in pf0WithWithin pf], + pfType2SexOrNil pfWithWithon pf] pfAdd2Sex pf == ["%Add", pf2Sex1 pfAddBase pf, pf2Sex1 pfAddAddin pf, pfType2SexOrNil pfAddAddon pf] pfWDeclare2Sex pf == - ["%Declare", pf2Sex1 pfWDeclareSignature pf, pf2Sex1 pfWDeclareDoc pf] + ["%Signature", rest pf2Sex1 pfWDeclareSignature pf, + pfDoc2SexOrNil pfWDeclareDoc pf] pfAttribute2Sex pf == ["%Attribute", pf2Sex1 pfAttributeExpr pf] @@ -523,9 +529,8 @@ pfImport2Sex pf == ["%Import", :[pf2Sex1 item for item in pf0ImportItems pf]] pfInline2Sex pf == - ["%Inline", :[pf2Sex1 item for item in pfInlineItems pf]] + ["%Inline", :[pf2Sex1 item for item in pf0InlineItems pf]] pfQualType2Sex pf == - ["%QualType", pf2Sex1 pfQyalTypeType pf, - pfType2SexOrNil pfQualTypeQual pf] - + -- pfQualTypeQual is always nothing. + pf2Sex1 pfQualTypeType pf diff --git a/src/interp/ptrees.boot b/src/interp/ptrees.boot index ed40c466..3ddc9d96 100644 --- a/src/interp/ptrees.boot +++ b/src/interp/ptrees.boot @@ -638,6 +638,7 @@ pf0ImportItems pf == pfParts pfImportItems pf pfInline(pfitems) == pfTree('Inline, [pfitems]) pfInline?(pf) == pfAbSynOp? (pf, 'Inline) pfInlineItems pf == second pf -- was ==> +pf0InlineItems pf == pfParts pfInlineItems pf -- QualType := (Type: Type, Qual: ? Type) |