mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Renamed Lexer.tag() argument to new_tag, due to Rhino scope confusion
This commit is contained in:
parent
19ed63129e
commit
2351948291
3 changed files with 6 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -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];
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue