adding missing parameters

This commit is contained in:
Danny Yoo 2011-09-21 13:28:23 -04:00
parent 56d3748d30
commit 689d4f0016
4 changed files with 58 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/*global plt*/
/*jslint browser: true, unparam: true, vars: true, white: true, maxerr: 50, indent: 4 */
/*jslint browser: true, unparam: true, vars: true, white: true, maxerr: 50, indent: 4 , plusplus: true */
// Continuation marks
(function(baselib) {
@ -71,21 +71,33 @@
return result;
};
var isContinuationMarkSet = baselib.makeClassPredicate(ContinuationMarkSet);
// A continuation prompt tag labels a prompt frame.
var ContinuationPromptTag = function(name) {
this.name = name;
this.name = name; // String
};
var isContinuationPromptTag = baselib.makeClassPredicate(ContinuationPromptTag);
var DEFAULT_CONTINUATION_PROMPT_TAG =
new ContinuationPromptTag("default-continuation-prompt-tag");
exports.ContinuationMarkSet = ContinuationMarkSet;
exports.isContinuationMarkSet = isContinuationMarkSet;
exports.ContinuationPromptTag = ContinuationPromptTag;
exports.isContinuationPromptTag = isContinuationPromptTag;
exports.DEFAULT_CONTINUATION_PROMPT_TAG = DEFAULT_CONTINUATION_PROMPT_TAG;
}(this.plt.baselib));

View File

@ -2058,6 +2058,7 @@
return baselib.srclocs.srclocColumn(checkSrcloc(M, 'srcloc-column', 0));
});
installPrimitiveProcedure(
'srcloc-position',
1,
@ -2065,6 +2066,7 @@
return baselib.srclocs.srclocPosition(checkSrcloc(M, 'srcloc-position', 0));
});
installPrimitiveProcedure(
'srcloc-span',
1,
@ -2072,6 +2074,37 @@
return baselib.srclocs.srclocSpan(checkSrcloc(M, 'srcloc-span', 0));
});
installPrimitiveProcedure(
'make-continuation-prompt-tag',
makeList(0, 1),
function(M) {
var sym;
if (M.a === 1) {
sym = checkSymbol(M, "make-continuation-prompt-tag", 0);
return new baselib.contmarks.ContinuationPromptTag(sym.toString());
}
return new baselib.contmarks.ContinuationPromptTag(undefined);
});
installPrimitiveProcedure(
'continuation-prompt-tag?',
1,
function(M) {
return baselib.contmarks.isContinuationPromptTag(M.e[M.e.length - 1]);
});
installPrimitiveProcedure(
'default-continuation-prompt-tag',
0,
function(M) {
return baselib.contmarks.DEFAULT_CONTINUATION_PROMPT_TAG;
});
exports['Primitives'] = Primitives;
exports['installPrimitiveProcedure'] = installPrimitiveProcedure;
exports['installPrimitiveClosure'] = installPrimitiveClosure;

View File

@ -565,8 +565,8 @@
// There is a single, distinguished default continuation prompt tag
// that's used to wrap around toplevel prompts.
var DEFAULT_CONTINUATION_PROMPT_TAG =
new ContinuationPromptTag("default-continuation-prompt-tag");
var DEFAULT_CONTINUATION_PROMPT_TAG =
baselib.contmarks.DEFAULT_CONTINUATION_PROMPT_TAG;

View File

@ -449,14 +449,16 @@ char=?
char-upcase
char-downcase
;; call-with-current-continuation
;; these are defined in bootstrapped-primitives in Whalesong's compiler package
call-with-current-continuation
call/cc
;; call-with-continuation-prompt
;; abort-current-continuation
;; default-continuation-prompt-tag
;; make-continuation-prompt-tag
;; continuation-prompt-tag?
;; call-with-continuation-prompt
;; abort-current-continuation
default-continuation-prompt-tag
make-continuation-prompt-tag
continuation-prompt-tag?
make-reader-graph
make-placeholder