Skip to content

Commit

Permalink
the_fart
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascrockford committed Aug 9, 2016
1 parent 54a6d0c commit 1856614
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions jslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2852,45 +2852,45 @@ var jslint = (function JSLint() {
stop("wrap_assignment", token);
}
advance("=>");
var the_arrow = token;
the_arrow.arity = "binary";
the_arrow.name = "=>";
the_arrow.level = functionage.level + 1;
functions.push(the_arrow);
var the_fart = token;
the_fart.arity = "binary";
the_fart.name = "=>";
the_fart.level = functionage.level + 1;
functions.push(the_fart);
if (functionage.loop > 0) {
warn("function_in_loop", the_arrow);
warn("function_in_loop", the_fart);
}

// Give the function properties storing its names and for observing the depth
// of loops and switches.

the_arrow.context = empty();
the_arrow.finally = 0;
the_arrow.loop = 0;
the_arrow.switch = 0;
the_arrow.try = 0;
the_fart.context = empty();
the_fart.finally = 0;
the_fart.loop = 0;
the_fart.switch = 0;
the_fart.try = 0;

// Push the current function context and establish a new one.

stack.push(functionage);
functionage = the_arrow;
the_arrow.parameters = pl[0];
the_arrow.signature = pl[1];
the_arrow.complex = true;
the_arrow.parameters.forEach(function (name) {
functionage = the_fart;
the_fart.parameters = pl[0];
the_fart.signature = pl[1];
the_fart.complex = true;
the_fart.parameters.forEach(function (name) {
enroll(name, "parameter", true);
});
if (!option.es6) {
warn("es6", the_arrow);
warn("es6", the_fart);
}
if (next_token.id === "{") {
warn("expected_a_b", the_arrow, "function", "=>");
the_arrow.block = block("body");
warn("expected_a_b", the_fart, "function", "=>");
the_fart.block = block("body");
} else {
the_arrow.expression = expression(0);
the_fart.expression = expression(0);
}
functionage = stack.pop();
return the_arrow;
return the_fart;
}

prefix("(", function () {
Expand Down

2 comments on commit 1856614

@Daniel15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called the_fart?

@douglascrockford
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fart is short for fat arrow.

Please sign in to comment.