diff options
author | Cheng-Han, Wu | 2016-06-01 14:37:28 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-06-01 14:37:28 +0800 |
commit | fb70833bc52aedffa3ed0764a31b706dd1fb3250 (patch) | |
tree | 5d88e7b20afea400a8c11eb0dc07734df3381917 /public/vendor/codemirror/mode/webidl | |
parent | 16d5e3ea8020c839dd6e2dd192e8ccba71f39eed (diff) |
Update CodeMirror to version 5.15.3
Diffstat (limited to '')
-rw-r--r-- | public/vendor/codemirror/mode/webidl/webidl.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/public/vendor/codemirror/mode/webidl/webidl.js b/public/vendor/codemirror/mode/webidl/webidl.js index 6f024c63..81433362 100644 --- a/public/vendor/codemirror/mode/webidl/webidl.js +++ b/public/vendor/codemirror/mode/webidl/webidl.js @@ -85,6 +85,7 @@ var singleOperators = /^[:<=>?]/; var integers = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/; var floats = /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/; var identifiers = /^_?[A-Za-z][0-9A-Z_a-z-]*/; +var identifiersEnd = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/; var strings = /^"[^"]*"/; var multilineComments = /^\/\*.*?\*\//; var multilineCommentsStart = /^\/\*.*/; @@ -122,12 +123,11 @@ function readToken(stream, state) { if (stream.match(strings)) return "string"; // identifier - if (stream.match(identifiers)) { - if (state.startDef) return "def"; - if (state.endDef && stream.match(/^\s*;/, false)) { - state.endDef = false; - return "def"; - } + if (state.startDef && stream.match(identifiers)) return "def"; + + if (state.endDef && stream.match(identifiersEnd)) { + state.endDef = false; + return "def"; } if (stream.match(keywords)) return "keyword"; |