aboutsummaryrefslogtreecommitdiff
path: root/src/boot/ast.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-24 03:23:59 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-24 03:23:59 +0000
commitfbcb9ebe438100f7a549329ae14668cd27fde508 (patch)
treeea4ac9322ecca78bc976418a33677cf8ec88b6d0 /src/boot/ast.boot
parent698aa5abf97234248cf7f59216759d9cc0d2290b (diff)
downloadopen-axiom-fbcb9ebe438100f7a549329ae14668cd27fde508.tar.gz
* boot/tokens.boot: "@" is now a new keyword.
* boot/ast.boot (bfRestrict): New. (bpTyped): Rename from bpTagged. Accept type restriction. * boot/utility.boot (drop): Restrict the result to a %List.
Diffstat (limited to 'src/boot/ast.boot')
-rw-r--r--src/boot/ast.boot4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 54d9b7ed..3d21b6f7 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -74,6 +74,7 @@ structure %Ast ==
%EqualPattern(%Ast) -- =x -- patterns
%Colon(%Symbol) -- :x
%QualifiedName(%Symbol,%Symbol) -- m::x
+ %Restrict(%Ast,%Ast) -- x@t
%DefaultValue(%Symbol,%Ast) -- opt. value for function param.
%Key(%Symbol,%Ast) -- k <- x
%Bracket(%Ast) -- [x, y]
@@ -1146,6 +1147,9 @@ bfTagged(a,b)==
a
["THE",b,a]
+bfRestrict(x,t) ==
+ ["THE",t,x]
+
bfAssign(l,r)==
bfTupleP l => bfSetelt(second l,CDDR l ,r)
l is ["%Place",:l'] => ["SETF",l',r]