diff options
author | dos-reis <gdr@axiomatics.org> | 2011-12-28 13:02:02 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-12-28 13:02:02 +0000 |
commit | b6e44a931b9e95fb4253eeeb048f167e55375937 (patch) | |
tree | 6e96286e9a69d406f1610cffc0683cbc9802bb93 /src/interp/c-util.boot | |
parent | 292bd212f1c30a51f0191128d5a9cd2691c5ccf9 (diff) | |
download | open-axiom-b6e44a931b9e95fb4253eeeb048f167e55375937.tar.gz |
* interp/vmlisp.lisp (SORTBY): Remove.
(QSORT): Likewise.
* interp/c-util.boot (formal?): Rename from isFormal. Avoid POSITION.
* interp/sys-utility.boot (sortBy): New.
* interp/br-op1.boot: Use it.
* interp/clam.boot: Likewise.
* interp/define.boot: Likewise.
* interp/i-output.boot: Likewise.
* interp/i-coerfn.boot: Likewise.
* interp/i-syscmd.boot: Likewise.
* interp/showimp.boot: Likewise.
* boot/tokens.boot: "<-" is now a token.
* boot/ast.boot (bfKeyArg): New.
(bfExpandKeys): Likewise.
(bfApplication): Use it.
* boot/parser.boot (bpKeyArg): New.
(bpAssign): Use it. Parse named arguments.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r-- | src/interp/c-util.boot | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index e09772c6..a032f0a8 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1825,9 +1825,9 @@ compileQuietly fn == ++ If `x' is a formal map variable, returns its position. ++ Otherwise return nil. -isFormal: %Symbol -> %Maybe %Short -isFormal x == - POSITION(x,$FormalMapVariableList,KEYWORD::TEST, function EQ) +formal?: %Symbol -> %Maybe %Short +formal? x == + or/[i for i in 0.. for y in $FormalMapVariableList | symbolEq?(x,y)] ++ Expand the form at position `slot' in the domain template `shell' ++ with argument list `args'. @@ -1837,7 +1837,7 @@ expandFormTemplate(shell,args,slot) == slot = 2 => "$$" expandFormTemplate(shell,args,vectorRef(shell,slot)) slot isnt [.,:.] => slot - slot is ["local",parm] and (n := isFormal parm) => + slot is ["local",parm] and (n := formal? parm) => args.n -- FIXME: we should probably expand with dual signature slot is ['%eval,val] => val slot is ['QUOTE,val] => @@ -1852,9 +1852,9 @@ equalFormTemplate(shell,args,slot,form) == slot = 0 => form = "$" slot = 2 => form = "$$" equalFormTemplate(shell,args,vectorRef(shell,slot),form) - slot is ["local",parm] and (n := isFormal parm) => + slot is ["local",parm] and (n := formal? parm) => equalFormTemplate(shell,args,args.n,form) - slot is ["NTREVAL",val] => form = val + slot is ['%eval,val] => form = val slot is ['QUOTE,val] => string? val or symbol? val or integer? val => val = form slot = form |