mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Undo a few renames in parse-js, to facilitate porting over of changes.
This commit is contained in:
parent
e93b3d5c97
commit
d96ac85879
2 changed files with 11 additions and 11 deletions
10
lib/parse-js-min.js
vendored
10
lib/parse-js-min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1066,7 +1066,7 @@ function parse($TEXT, strict_mode, embed_tokens) {
|
|||
}
|
||||
if (allow_calls && is("operator") && HOP(UNARY_POSTFIX, S.token.value)) {
|
||||
return prog1(curry(make_unary, "unary-postfix", S.token.value, expr),
|
||||
next);
|
||||
next);
|
||||
}
|
||||
return expr;
|
||||
};
|
||||
|
@ -1155,7 +1155,7 @@ function parse($TEXT, strict_mode, embed_tokens) {
|
|||
|
||||
/* -----[ helper for AST traversal ]----- */
|
||||
|
||||
function walker() {
|
||||
function ast_walker() {
|
||||
function _vardefs(defs) {
|
||||
return [ this[0], MAP(defs, function(def){
|
||||
var a = [ def[0] ];
|
||||
|
@ -1374,7 +1374,7 @@ function make_string(str) {
|
|||
}
|
||||
};
|
||||
|
||||
function stringify(ast, beautify) {
|
||||
function gen_code(ast, beautify) {
|
||||
if (beautify) beautify = defaults(beautify, {
|
||||
indent_start : 0,
|
||||
indent_level : 4,
|
||||
|
@ -1827,7 +1827,7 @@ function array_to_hash(a) {
|
|||
};
|
||||
|
||||
function slice(a, start) {
|
||||
return Array.prototype.slice.call(a, start == null ? 0 : start);
|
||||
return Array.prototype.slice.call(a, start || 0);
|
||||
};
|
||||
|
||||
function characters(str) {
|
||||
|
@ -1875,9 +1875,9 @@ function MAP(a, f, o) {
|
|||
|
||||
return {
|
||||
parse: parse,
|
||||
stringify: stringify,
|
||||
gen_code: gen_code,
|
||||
tokenizer: tokenizer,
|
||||
walker: walker
|
||||
ast_walker: ast_walker
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue