Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Dec 2, 2018
1 parent 17a600f commit 4726d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/tokenizer/index.js
Expand Up @@ -982,7 +982,7 @@ export default class Tokenizer extends LocationParser {
this.input.charCodeAt(start) === charCodes.digit0;
if (octal) {
if (this.state.strict) {
this.raise(start, "Invalid number");
this.raise(start, "Octal literals are not allowed in strict mode");
}
if (/[89]/.test(this.input.slice(start, this.state.pos))) {
octal = false;
Expand Down

0 comments on commit 4726d39

Please sign in to comment.