1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
syntax .js-esc
state special
char "'\"\\bfnrtv" END special
char 0 3n
char x 2left
char u 4left
noeat short
state 4left special
char 0-9a-fA-F 3left
noeat short
state 3left special
char 0-9a-fA-F 2left
noeat short
state 2left special
char 0-9a-fA-F 1left
noeat short
state 1left special
char 0-9a-fA-F END special
noeat short
state 3n special
char 0-9 2n
noeat short
state 2n special
char 0-9 1n
noeat short
state 1n special
char 0-9 END special
noeat short
state short special
# Don't eat \n
char -n "\n" END error
noeat END
syntax .js-regexp
state regexp
char "\\" regexp-esc
char "[" regexp-char-list-start
char "{" regexp-range
char "/" regexp-flags regexp
char "^$|()?:*+." this regexp-special
char "\n" END error
eat this
state regexp-esc regexp-special
char "\n" END error
eat regexp regexp-special
state regexp-char-list-start regexp-special
char ^ regexp-char-list regexp-special
char ] regexp regexp-special
char "\n" END error
eat regexp-char-list
state regexp-char-list regexp
char "-" this regexp-special
char "\\" regexp-char-list-esc
char ] regexp regexp-special
char "\n" END error
eat this
state regexp-char-list-esc regexp-special
char "\n" END error
eat regexp-char-list regexp-special
state regexp-range regexp-special
char "0-9" this regexp
char "," regexp-range-second
char "}" regexp regexp-special
char "\n" END error
eat this error
state regexp-range-second regexp-special
char "0-9" this regexp
char "}" regexp regexp-special
char "\n" END error
eat this error
state regexp-flags regexp-special
char gimuy this
noeat END
syntax javascript
state first-line
char " \t" this
char # line-comment
noeat code
state code
char -b a-zA-Z_ ident
char 0 zero
char 1-9 dec
char . dot
str "//" line-comment
str "/*" long-comment
char \' sq
char \" dq
char "(;:,=*/%&|!?+-" foo
eat this
# who knows where regexps are allowed?
state foo code
char " \t(;:,=*%&|!?+-" this
str "//" line-comment
str "/*" long-comment
char / .js-regexp:code
noeat code
state zero numeric
char xX hex
char . float
noeat check-suffix
state dec numeric
char 0-9 this
char eE exp
char . float
noeat check-suffix
state hex numeric
char 0-9a-fA-F this
noeat check-suffix
state dot numeric
char 0-9 float
recolor code 1
noeat code
state float numeric
char 0-9 this
char eE exp
noeat check-suffix
state exp numeric
char +- exp-digit
char 0-9 exp-digit
noeat check-suffix
state exp-digit numeric
char 0-9 this
noeat check-suffix
state check-suffix error
char a-zA-Z0-9_ this
noeat code
state ident
char -b a-zA-Z0-9_ this
inlist keyword code
inlist reserved code keyword
inlist type code
inlist errortype code type
inlist constant code
inlist builtin-namespace code constant
inlist function code builtin
inlist message code builtin
inlist global code builtin
inlist member code builtin
inlist deprecated code
noeat code
state line-comment comment
char "\n" code
eat this
state long-comment comment
str "*/" code comment
eat this
state sq string
char \' code string
char "\n" code
char "\\" .js-esc:this
eat this
state dq string
char \" code string
char "\n" code
char "\\" .js-esc:this
eat this
list keyword \
break case catch continue debugger default delete do else finally for \
function if in instanceof new return switch this throw try typeof var \
void while with
list reserved \
class const enum export extends implements import interface let \
package private protected public static super yield
list type \
Array Boolean Date Function Number Object RegExp String \
Map WeakMap Set WeakSet Symbol Promise Proxy ArrayBuffer DataView \
Float32Array Float64Array Int8Array Int16Array Int32Array \
Uint8Array Uint16Array Uint32Array Uint8ClampedArray
# Non-constructible, built-in objects (used and referred to as "namespaces")
list builtin-namespace \
Intl JSON Math Reflect WebAssembly
list errortype \
Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
list constant \
arguments \
Infinity NaN false null true undefined
list function \
decodeURI decodeURIComponent encodeURI encodeURIComponent eval \
isFinite isNaN parseFloat parseInt
# builtin?
list message \
alert confirm prompt status
list global \
self window top parent
list member \
document event location
list deprecated \
escape unescape
default special regexp
default special regexp-special
|