Skip to content

Commit c05ace5

Browse files
committed
Merge branch 'master' of https://github.com/alexwarren/jsep into alexwarren-master
2 parents 79208f5 + 88727c9 commit c05ace5

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

build/jsep.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@
260260
} else if(ch === SQUOTE_CODE || ch === DQUOTE_CODE) {
261261
// Single or double quotes
262262
return gobbleStringLiteral();
263-
} else if(isIdentifierStart(ch) || ch === OPAREN_CODE) { // open parenthesis
264-
// `foo`, `bar.baz`
265-
return gobbleVariable();
266263
} else if (ch === OBRACK_CODE) {
267264
return gobbleArray();
268265
} else {
@@ -281,8 +278,13 @@
281278
to_check = to_check.substr(0, --tc_len);
282279
}
283280

284-
return false;
281+
if (isIdentifierStart(ch) || ch === OPAREN_CODE) { // open parenthesis
282+
// `foo`, `bar.baz`
283+
return gobbleVariable();
284+
}
285285
}
286+
287+
return false;
286288
},
287289
// Parse simple numeric literals: `12`, `3.4`, `.5`. Do this by using a string to
288290
// keep track of everything in the numeric literal and then calling `parseFloat` on that string
@@ -352,7 +354,7 @@
352354
case 'b': str += '\b'; break;
353355
case 'f': str += '\f'; break;
354356
case 'v': str += '\x0B'; break;
355-
default : str += '\\' + ch;
357+
default : str += ch;
356358
}
357359
} else {
358360
str += ch;
@@ -608,7 +610,7 @@
608610
jsep.removeAllUnaryOps = function() {
609611
unary_ops = {};
610612
max_unop_len = 0;
611-
613+
612614
return this;
613615
};
614616

@@ -632,7 +634,7 @@
632634
jsep.removeAllBinaryOps = function() {
633635
binary_ops = {};
634636
max_binop_len = 0;
635-
637+
636638
return this;
637639
};
638640

@@ -652,7 +654,7 @@
652654
*/
653655
jsep.removeAllLiterals = function() {
654656
literals = {};
655-
657+
656658
return this;
657659
};
658660

build/jsep.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)