Renamed Lexer.tag() argument to new_tag, due to Rhino scope confusion

This commit is contained in:
noonat 2010-04-05 22:58:56 -07:00
parent 19ed63129e
commit 2351948291
3 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -551,13 +551,13 @@
return this.tokens.push([tag, value, this.line]);
};
// Peek at a tag in the current token stream.
Lexer.prototype.tag = function tag(index, tag) {
Lexer.prototype.tag = function tag(index, new_tag) {
var tok;
if (!(tok = this.prev(index))) {
return null;
}
if ((typeof tag !== "undefined" && tag !== null)) {
tok[0] = tag;
if ((typeof new_tag !== "undefined" && new_tag !== null)) {
tok[0] = new_tag;
return tok[0];
}
return tok[0];

View File

@ -399,9 +399,9 @@ exports.Lexer: class Lexer
@tokens.push [tag, value, @line]
# Peek at a tag in the current token stream.
tag: (index, tag) ->
tag: (index, new_tag) ->
return unless tok: @prev index
return tok[0]: tag if tag?
return tok[0]: new_tag if new_tag?
tok[0]
# Peek at a value in the current token stream.