Hardcode "#" in error message
It's not going to be anything else...
This commit is contained in:
parent
70318c9413
commit
4cbd22a15f
@ -376,7 +376,7 @@ export default class Tokenizer extends LocationParser {
|
|||||||
// All in the name of speed.
|
// All in the name of speed.
|
||||||
|
|
||||||
// number sign is "#"
|
// number sign is "#"
|
||||||
readToken_numberSign(code: number): void {
|
readToken_numberSign(): void {
|
||||||
if (this.state.pos === 0 && this.readToken_interpreter()) {
|
if (this.state.pos === 0 && this.readToken_interpreter()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -400,10 +400,7 @@ export default class Tokenizer extends LocationParser {
|
|||||||
) {
|
) {
|
||||||
this.finishOp(tt.hash, 1);
|
this.finishOp(tt.hash, 1);
|
||||||
} else {
|
} else {
|
||||||
this.raise(
|
this.raise(this.state.pos, "Unexpected character '#'");
|
||||||
this.state.pos,
|
|
||||||
`Unexpected character '${String.fromCodePoint(code)}'`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,7 +652,7 @@ export default class Tokenizer extends LocationParser {
|
|||||||
getTokenFromCode(code: number): void {
|
getTokenFromCode(code: number): void {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case charCodes.numberSign:
|
case charCodes.numberSign:
|
||||||
this.readToken_numberSign(code);
|
this.readToken_numberSign();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The interpretation of a dot depends on whether it is followed
|
// The interpretation of a dot depends on whether it is followed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user