Skip to content
Snippets Groups Projects
Unverified Commit def70631 authored by Timothy Gu's avatar Timothy Gu Committed by Marijn Haverbeke
Browse files

[webidl mode] Remove unnecessary pos saving

parent adb73ffa
No related branches found
No related tags found
No related merge requests found
...@@ -122,14 +122,12 @@ function readToken(stream, state) { ...@@ -122,14 +122,12 @@ function readToken(stream, state) {
if (stream.match(strings)) return "string"; if (stream.match(strings)) return "string";
// identifier // identifier
var pos = stream.pos;
if (stream.match(identifiers)) { if (stream.match(identifiers)) {
if (state.startDef) return "def"; if (state.startDef) return "def";
if (state.endDef && stream.match(/^\s*;/, false)) { if (state.endDef && stream.match(/^\s*;/, false)) {
state.endDef = false; state.endDef = false;
return "def"; return "def";
} }
stream.pos = pos;
} }
if (stream.match(keywords)) return "keyword"; if (stream.match(keywords)) return "keyword";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment