mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
made unless less parenfull
This commit is contained in:
10
lib/lexer.js
10
lib/lexer.js
@@ -71,7 +71,7 @@
|
||||
this.identifierError(id);
|
||||
}
|
||||
}
|
||||
if (!(forcedIdentifier)) {
|
||||
if (!forcedIdentifier) {
|
||||
if (COFFEE_ALIASES.hasOwnProperty(id)) {
|
||||
tag = (id = COFFEE_ALIASES[id]);
|
||||
}
|
||||
@@ -398,7 +398,7 @@
|
||||
if (herecomment && 0 > doc.indexOf('\n')) {
|
||||
return doc;
|
||||
}
|
||||
if (!(herecomment)) {
|
||||
if (!herecomment) {
|
||||
while (match = HEREDOC_INDENT.exec(doc)) {
|
||||
attempt = match[1];
|
||||
if (indent === null || (0 < (_ref3 = attempt.length)) && (_ref3 < indent.length)) {
|
||||
@@ -409,7 +409,7 @@
|
||||
if (indent) {
|
||||
doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
|
||||
}
|
||||
if (!(herecomment)) {
|
||||
if (!herecomment) {
|
||||
doc = doc.replace(/^\n/, '');
|
||||
}
|
||||
return doc;
|
||||
@@ -463,7 +463,7 @@
|
||||
if (levels.length && starts(str, close, i) && last(levels) === pair) {
|
||||
levels.pop();
|
||||
i += close.length - 1;
|
||||
if (!(levels.length)) {
|
||||
if (!levels.length) {
|
||||
i += 1;
|
||||
}
|
||||
break;
|
||||
@@ -524,7 +524,7 @@
|
||||
if (regex) {
|
||||
return tokens;
|
||||
}
|
||||
if (!(tokens.length)) {
|
||||
if (!tokens.length) {
|
||||
return this.token('STRING', '""');
|
||||
}
|
||||
if (interpolated = tokens.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user