reaadd tokenizer check
This commit is contained in:
parent
faec023507
commit
4b3d183ba7
2 changed files with 8 additions and 4 deletions
|
|
@ -107,10 +107,14 @@ var Tokenizer = function(rules) {
|
|||
} else {
|
||||
token.value += value;
|
||||
}
|
||||
|
||||
if (lastIndex == line.length) {
|
||||
break;
|
||||
}
|
||||
lastIndex = re.lastIndex;
|
||||
break;
|
||||
} else if (re.lastIndex == lastIndex) {
|
||||
throw new Error("tokenizer error");
|
||||
}
|
||||
|
||||
lastIndex = re.lastIndex;
|
||||
};
|
||||
|
||||
if (token.type) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue