public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d681405
)
Re-use the caught exception's error message in the parse error call.
author
Chris Cowan
<agentme49@gmail.com>
Thu, 14 May 2015 19:27:56 +0000
(12:27 -0700)
committer
Richard van Velzen
<rvanvelzen@experty.com>
Wed, 29 Jul 2015 13:06:52 +0000
(15:06 +0200)
lib/parse.js
patch
|
blob
|
history
diff --git
a/lib/parse.js
b/lib/parse.js
index
70ee2e8
..
ab72ad2
100644
(file)
--- a/
lib/parse.js
+++ b/
lib/parse.js
@@
-480,13
+480,11
@@
function tokenizer($TEXT, filename, html5_comments) {
regexp += ch;
}
var mods = read_name();
- var r;
try {
- r
= new RegExp(regexp, mods
);
+ r
eturn token("regexp", new RegExp(regexp, mods)
);
} catch(e) {
- parse_error(
"Invalid regular expression"
);
+ parse_error(
e.message
);
}
- return token("regexp", r);
});
function read_operator(prefix) {