Changeset 53916 in webkit
- Timestamp:
- Jan 27, 2010 3:18:55 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53915 r53916 1 1 2010-01-27 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Improve SourceHTMLTokenizer so that it treats script tag well. 6 7 https://bugs.webkit.org/show_bug.cgi?id=34177 8 9 * inspector/front-end/SourceHTMLTokenizer.js: 10 (WebInspector.SourceHTMLTokenizer): 11 (WebInspector.SourceHTMLTokenizer.prototype._isAttribute): 12 (WebInspector.SourceHTMLTokenizer.prototype._isAttributeValue): 13 (WebInspector.SourceHTMLTokenizer.prototype._setAttributeValue): 14 (WebInspector.SourceHTMLTokenizer.prototype._setAttribute): 15 (WebInspector.SourceHTMLTokenizer.prototype._stringToken): 16 (WebInspector.SourceHTMLTokenizer.prototype.nextToken): 17 * inspector/front-end/SourceHTMLTokenizer.re2js: 18 19 2010-01-26 Pavel Feldman <pfeldman@chromium.org> 2 20 3 21 Reviewed by Timothy Hatcher. -
trunk/WebCore/inspector/front-end/SourceHTMLTokenizer.js
r53846 r53916 1 /* Generated by re2c 0.13.5 on Tue Jan 26 01:16:332010 */1 /* Generated by re2c 0.13.5 on Tue Jan 26 23:10:38 2010 */ 2 2 /* 3 3 * Copyright (C) 2009 Google Inc. All rights reserved. … … 58 58 ATTRIBUTE: 2, 59 59 ATTRIBUTE_VALUE: 3, 60 DOCTYPE: 4 60 SCRIPT: 4, 61 SCRIPT_ATTRIBUTE: 5, 62 SCRIPT_ATTRIBUTE_VALUE: 6, 63 DOCTYPE: 7 61 64 }; 62 65 … … 70 73 71 74 WebInspector.SourceHTMLTokenizer.prototype = { 75 _isAttribute: function() 76 { 77 return this._parseCondition === this._parseConditions.ATTRIBUTE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE; 78 }, 79 80 _isAttributeValue: function() 81 { 82 return this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE; 83 }, 84 85 _setAttributeValue: function() 86 { 87 if (this._parseCondition === this._parseConditions.ATTRIBUTE) 88 this._parseCondition = this._parseConditions.ATTRIBUTE_VALUE; 89 else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE) 90 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE_VALUE; 91 }, 92 93 _setAttribute: function() 94 { 95 if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE) 96 this._parseCondition = this._parseConditions.ATTRIBUTE; 97 else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE) 98 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE; 99 }, 100 72 101 _stringToken: function(cursor, stringEnds) 73 102 { 74 if (this._ parseCondition === this._parseConditions.ATTRIBUTE_VALUE) {103 if (this._isAttributeValue()) { 75 104 this.tokenType = "html-attr-value"; 76 105 if (stringEnds) 77 this._ parseCondition = this._parseConditions.ATTRIBUTE;106 this._setAttribute(); 78 107 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 79 108 this.tokenType = "html-doctype"; … … 234 263 yyaccept = 0; 235 264 yych = this._charAt(YYMARKER = ++cursor); 236 { gotoCase = 68; continue; };265 { gotoCase = 82; continue; }; 237 266 case 30: 238 267 yyaccept = 0; 239 268 yych = this._charAt(YYMARKER = ++cursor); 240 { gotoCase = 62; continue; };269 { gotoCase = 76; continue; }; 241 270 case 31: 242 271 yyaccept = 1; 243 272 yych = this._charAt(YYMARKER = ++cursor); 244 if (yych == '!') { gotoCase = 42; continue; }; 245 if (yych == '/') { gotoCase = 41; continue; }; 273 if (yych <= '/') { 274 if (yych == '!') { gotoCase = 44; continue; }; 275 if (yych >= '/') { gotoCase = 41; continue; }; 276 } else { 277 if (yych <= 'S') { 278 if (yych >= 'S') { gotoCase = 42; continue; }; 279 } else { 280 if (yych == 's') { gotoCase = 42; continue; }; 281 } 282 } 246 283 case 32: 247 284 { 285 if (this._parseCondition === this._parseConditions.SCRIPT) { 286 this.tokenType = null; 287 return cursor; 288 } 289 248 290 this.tokenType = "html-tag"; 249 291 this._parseCondition = this._parseConditions.TAG; … … 253 295 ++cursor; 254 296 { 255 if (this._ parseCondition === this._parseConditions.ATTRIBUTE) {297 if (this._isAttribute()) { 256 298 this.tokenType = null; 257 this._ parseCondition = this._parseConditions.ATTRIBUTE_VALUE;299 this._setAttributeValue(); 258 300 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 259 301 this.tokenType = "html-doctype"; … … 265 307 ++cursor; 266 308 { 309 if (this._parseCondition === this._parseConditions.SCRIPT) { 310 this.tokenType = null; 311 return cursor; 312 } 313 267 314 if (this._parseCondition === this._parseConditions.DOCTYPE) 268 315 this.tokenType = "html-doctype"; 269 316 else 270 317 this.tokenType = "html-tag"; 271 this._parseCondition = this._parseConditions.INITIAL; 318 319 if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE) 320 this._parseCondition = this._parseConditions.SCRIPT; 321 else 322 this._parseCondition = this._parseConditions.INITIAL; 272 323 return cursor; 273 324 } … … 278 329 case 38: 279 330 { 331 if (this._parseCondition === this._parseConditions.SCRIPT) { 332 this.tokenType = null; 333 return cursor; 334 } 335 280 336 if (this._parseCondition === this._parseConditions.TAG) { 281 337 this.tokenType = "html-tag"; 282 338 this._parseCondition = this._parseConditions.ATTRIBUTE; 283 } else if (this._ parseCondition === this._parseConditions.ATTRIBUTE) {339 } else if (this._isAttribute()) 284 340 this.tokenType = "html-attr-name"; 285 this._parseCondition = this._parseConditions.ATTRIBUTE; 286 } else if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE) { 341 else if (this._isAttributeValue()) 287 342 this.tokenType = "html-attr-value"; 288 this._parseCondition = this._parseConditions.ATTRIBUTE; 289 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 343 else if (this._parseCondition === this._parseConditions.DOCTYPE) 290 344 this.tokenType = "html-doctype"; 291 345 else … … 309 363 } 310 364 case 41: 311 yych = this._charAt(++cursor); 365 yyaccept = 1; 366 yych = this._charAt(YYMARKER = ++cursor); 367 if (yych == 'S') { gotoCase = 68; continue; }; 368 if (yych == 's') { gotoCase = 68; continue; }; 312 369 { gotoCase = 32; continue; }; 313 370 case 42: 314 371 yych = this._charAt(++cursor); 315 if (yych <= 'C') { 316 if (yych == '-') { gotoCase = 44; continue; }; 317 } else { 318 if (yych <= 'D') { gotoCase = 45; continue; }; 319 if (yych == 'd') { gotoCase = 45; continue; }; 320 } 372 if (yych == 'C') { gotoCase = 62; continue; }; 373 if (yych == 'c') { gotoCase = 62; continue; }; 321 374 case 43: 322 375 cursor = YYMARKER; … … 328 381 case 44: 329 382 yych = this._charAt(++cursor); 330 if (yych == '-') { gotoCase = 53; continue; }; 383 if (yych <= 'C') { 384 if (yych != '-') { gotoCase = 43; continue; }; 385 } else { 386 if (yych <= 'D') { gotoCase = 46; continue; }; 387 if (yych == 'd') { gotoCase = 46; continue; }; 388 { gotoCase = 43; continue; }; 389 } 390 yych = this._charAt(++cursor); 391 if (yych == '-') { gotoCase = 54; continue; }; 331 392 { gotoCase = 43; continue; }; 332 case 4 5:333 yych = this._charAt(++cursor); 334 if (yych == 'O') { gotoCase = 4 6; continue; };393 case 46: 394 yych = this._charAt(++cursor); 395 if (yych == 'O') { gotoCase = 47; continue; }; 335 396 if (yych != 'o') { gotoCase = 43; continue; }; 336 case 4 6:337 yych = this._charAt(++cursor); 338 if (yych == 'C') { gotoCase = 4 7; continue; };397 case 47: 398 yych = this._charAt(++cursor); 399 if (yych == 'C') { gotoCase = 48; continue; }; 339 400 if (yych != 'c') { gotoCase = 43; continue; }; 340 case 4 7:341 yych = this._charAt(++cursor); 342 if (yych == 'T') { gotoCase = 4 8; continue; };401 case 48: 402 yych = this._charAt(++cursor); 403 if (yych == 'T') { gotoCase = 49; continue; }; 343 404 if (yych != 't') { gotoCase = 43; continue; }; 344 case 4 8:345 yych = this._charAt(++cursor); 346 if (yych == 'Y') { gotoCase = 49; continue; };405 case 49: 406 yych = this._charAt(++cursor); 407 if (yych == 'Y') { gotoCase = 50; continue; }; 347 408 if (yych != 'y') { gotoCase = 43; continue; }; 348 case 49:349 yych = this._charAt(++cursor); 350 if (yych == 'P') { gotoCase = 5 0; continue; };409 case 50: 410 yych = this._charAt(++cursor); 411 if (yych == 'P') { gotoCase = 51; continue; }; 351 412 if (yych != 'p') { gotoCase = 43; continue; }; 352 case 5 0:353 yych = this._charAt(++cursor); 354 if (yych == 'E') { gotoCase = 5 1; continue; };413 case 51: 414 yych = this._charAt(++cursor); 415 if (yych == 'E') { gotoCase = 52; continue; }; 355 416 if (yych != 'e') { gotoCase = 43; continue; }; 356 case 51: 357 ++cursor; 358 { 359 var token = this._line.substring(cursorOnEnter, cursor); 417 case 52: 418 ++cursor; 419 { 360 420 this.tokenType = "html-doctype"; 361 421 this._parseCondition = this._parseConditions.DOCTYPE; 362 422 return cursor; 363 423 } 364 case 5 3:365 ++cursor; 366 yych = this._charAt(cursor); 367 if (yych <= '\f') { 368 if (yych == '\n') { gotoCase = 5 6; continue; };369 { gotoCase = 5 3; continue; };370 } else { 371 if (yych <= '\r') { gotoCase = 5 6; continue; };372 if (yych != '-') { gotoCase = 5 3; continue; };373 } 374 ++cursor; 375 yych = this._charAt(cursor); 376 if (yych == '-') { gotoCase = 5 8; continue; };424 case 54: 425 ++cursor; 426 yych = this._charAt(cursor); 427 if (yych <= '\f') { 428 if (yych == '\n') { gotoCase = 57; continue; }; 429 { gotoCase = 54; continue; }; 430 } else { 431 if (yych <= '\r') { gotoCase = 57; continue; }; 432 if (yych != '-') { gotoCase = 54; continue; }; 433 } 434 ++cursor; 435 yych = this._charAt(cursor); 436 if (yych == '-') { gotoCase = 59; continue; }; 377 437 { gotoCase = 43; continue; }; 378 case 5 6:438 case 57: 379 439 ++cursor; 380 440 this.setLexCondition(this._lexConditions.COMMENT); 381 441 { this.tokenType = "html-comment"; return cursor; } 382 case 5 8:383 ++cursor; 384 yych = this._charAt(cursor); 385 if (yych != '>') { gotoCase = 5 3; continue; };442 case 59: 443 ++cursor; 444 yych = this._charAt(cursor); 445 if (yych != '>') { gotoCase = 54; continue; }; 386 446 ++cursor; 387 447 { this.tokenType = "html-comment"; return cursor; } 388 case 61:389 ++cursor;390 yych = this._charAt(cursor);391 448 case 62: 392 if (yych <= '\f') { 393 if (yych != '\n') { gotoCase = 61; continue; }; 394 } else { 395 if (yych <= '\r') { gotoCase = 63; continue; }; 396 if (yych == '\'') { gotoCase = 65; continue; }; 397 { gotoCase = 61; continue; }; 398 } 449 yych = this._charAt(++cursor); 450 if (yych == 'R') { gotoCase = 63; continue; }; 451 if (yych != 'r') { gotoCase = 43; continue; }; 399 452 case 63: 453 yych = this._charAt(++cursor); 454 if (yych == 'I') { gotoCase = 64; continue; }; 455 if (yych != 'i') { gotoCase = 43; continue; }; 456 case 64: 457 yych = this._charAt(++cursor); 458 if (yych == 'P') { gotoCase = 65; continue; }; 459 if (yych != 'p') { gotoCase = 43; continue; }; 460 case 65: 461 yych = this._charAt(++cursor); 462 if (yych == 'T') { gotoCase = 66; continue; }; 463 if (yych != 't') { gotoCase = 43; continue; }; 464 case 66: 465 ++cursor; 466 { 467 this.tokenType = "html-tag"; 468 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE; 469 return cursor; 470 } 471 case 68: 472 yych = this._charAt(++cursor); 473 if (yych == 'C') { gotoCase = 69; continue; }; 474 if (yych != 'c') { gotoCase = 43; continue; }; 475 case 69: 476 yych = this._charAt(++cursor); 477 if (yych == 'R') { gotoCase = 70; continue; }; 478 if (yych != 'r') { gotoCase = 43; continue; }; 479 case 70: 480 yych = this._charAt(++cursor); 481 if (yych == 'I') { gotoCase = 71; continue; }; 482 if (yych != 'i') { gotoCase = 43; continue; }; 483 case 71: 484 yych = this._charAt(++cursor); 485 if (yych == 'P') { gotoCase = 72; continue; }; 486 if (yych != 'p') { gotoCase = 43; continue; }; 487 case 72: 488 yych = this._charAt(++cursor); 489 if (yych == 'T') { gotoCase = 73; continue; }; 490 if (yych != 't') { gotoCase = 43; continue; }; 491 case 73: 492 ++cursor; 493 { 494 this.tokenType = "html-tag"; 495 this._parseCondition = this._parseConditions.INITIAL; 496 return cursor; 497 } 498 case 75: 499 ++cursor; 500 yych = this._charAt(cursor); 501 case 76: 502 if (yych <= '\f') { 503 if (yych != '\n') { gotoCase = 75; continue; }; 504 } else { 505 if (yych <= '\r') { gotoCase = 77; continue; }; 506 if (yych == '\'') { gotoCase = 79; continue; }; 507 { gotoCase = 75; continue; }; 508 } 509 case 77: 400 510 ++cursor; 401 511 this.setLexCondition(this._lexConditions.SSTRING); 402 512 { return this._stringToken(cursor); } 403 case 65:513 case 79: 404 514 ++cursor; 405 515 { return this._stringToken(cursor, true); } 406 case 67:407 ++cursor; 408 yych = this._charAt(cursor); 409 case 68:410 if (yych <= '\f') { 411 if (yych != '\n') { gotoCase = 67; continue; };412 } else { 413 if (yych <= '\r') { gotoCase = 69; continue; };414 if (yych == '"') { gotoCase = 65; continue; };415 { gotoCase = 67; continue; };416 } 417 case 69:516 case 81: 517 ++cursor; 518 yych = this._charAt(cursor); 519 case 82: 520 if (yych <= '\f') { 521 if (yych != '\n') { gotoCase = 81; continue; }; 522 } else { 523 if (yych <= '\r') { gotoCase = 83; continue; }; 524 if (yych == '"') { gotoCase = 79; continue; }; 525 { gotoCase = 81; continue; }; 526 } 527 case 83: 418 528 ++cursor; 419 529 this.setLexCondition(this._lexConditions.DSTRING); … … 423 533 yych = this._charAt(cursor); 424 534 if (yych <= '\f') { 425 if (yych == '\n') { gotoCase = 75; continue; };426 { gotoCase = 74; continue; };427 } else { 428 if (yych <= '\r') { gotoCase = 75; continue; };429 if (yych == '\'') { gotoCase = 77; continue; };430 { gotoCase = 74; continue; };431 } 432 case 73:535 if (yych == '\n') { gotoCase = 89; continue; }; 536 { gotoCase = 88; continue; }; 537 } else { 538 if (yych <= '\r') { gotoCase = 89; continue; }; 539 if (yych == '\'') { gotoCase = 91; continue; }; 540 { gotoCase = 88; continue; }; 541 } 542 case 87: 433 543 { return this._stringToken(cursor); } 434 case 74:435 yych = this._charAt(++cursor); 436 { gotoCase = 81; continue; };437 case 75:544 case 88: 545 yych = this._charAt(++cursor); 546 { gotoCase = 95; continue; }; 547 case 89: 438 548 ++cursor; 439 549 { this.tokenType = null; return cursor; } 440 case 77:441 ++cursor; 442 case 78:550 case 91: 551 ++cursor; 552 case 92: 443 553 this.setLexCondition(this._lexConditions.INITIAL); 444 554 { return this._stringToken(cursor, true); } 445 case 79:446 yych = this._charAt(++cursor); 447 { gotoCase = 78; continue; };448 case 80:449 ++cursor; 450 yych = this._charAt(cursor); 451 case 81:452 if (yych <= '\f') { 453 if (yych == '\n') { gotoCase = 73; continue; };454 { gotoCase = 80; continue; };455 } else { 456 if (yych <= '\r') { gotoCase = 73; continue; };457 if (yych == '\'') { gotoCase = 79; continue; };458 { gotoCase = 80; continue; };555 case 93: 556 yych = this._charAt(++cursor); 557 { gotoCase = 92; continue; }; 558 case 94: 559 ++cursor; 560 yych = this._charAt(cursor); 561 case 95: 562 if (yych <= '\f') { 563 if (yych == '\n') { gotoCase = 87; continue; }; 564 { gotoCase = 94; continue; }; 565 } else { 566 if (yych <= '\r') { gotoCase = 87; continue; }; 567 if (yych == '\'') { gotoCase = 93; continue; }; 568 { gotoCase = 94; continue; }; 459 569 } 460 570 } -
trunk/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js
r53846 r53916 57 57 ATTRIBUTE: 2, 58 58 ATTRIBUTE_VALUE: 3, 59 DOCTYPE: 4 59 SCRIPT: 4, 60 SCRIPT_ATTRIBUTE: 5, 61 SCRIPT_ATTRIBUTE_VALUE: 6, 62 DOCTYPE: 7 60 63 }; 61 64 … … 69 72 70 73 WebInspector.SourceHTMLTokenizer.prototype = { 74 _isAttribute: function() 75 { 76 return this._parseCondition === this._parseConditions.ATTRIBUTE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE; 77 }, 78 79 _isAttributeValue: function() 80 { 81 return this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE; 82 }, 83 84 _setAttributeValue: function() 85 { 86 if (this._parseCondition === this._parseConditions.ATTRIBUTE) 87 this._parseCondition = this._parseConditions.ATTRIBUTE_VALUE; 88 else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE) 89 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE_VALUE; 90 }, 91 92 _setAttribute: function() 93 { 94 if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE) 95 this._parseCondition = this._parseConditions.ATTRIBUTE; 96 else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE) 97 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE; 98 }, 99 71 100 _stringToken: function(cursor, stringEnds) 72 101 { 73 if (this._ parseCondition === this._parseConditions.ATTRIBUTE_VALUE) {102 if (this._isAttributeValue()) { 74 103 this.tokenType = "html-attr-value"; 75 104 if (stringEnds) 76 this._ parseCondition = this._parseConditions.ATTRIBUTE;105 this._setAttribute(); 77 106 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 78 107 this.tokenType = "html-doctype"; … … 106 135 CommentEnd = CommentContent "-->"; 107 136 137 DocTypeLT = "<!" [Dd] [Oo] [Cc] [Tt] [Yy] [Pp] [Ee]; 138 ScriptStart = "<" [Ss] [Cc] [Rr] [Ii] [Pp] [Tt]; 139 ScriptEnd = "</" [Ss] [Cc] [Rr] [Ii] [Pp] [Tt]; 140 108 141 LT = "<" | "</"; 109 DocTypeLT = "<!" [Dd] [Oo] [Cc] [Tt] [Yy] [Pp] [Ee];110 142 GT = ">"; 111 143 EqualSign = "="; 112 113 Letter = [_a-zA-Z\x80-\xFF];114 144 115 145 DoubleStringContent = [^\r\n\"]*; … … 121 151 SingleStringEnd = SingleStringContent "'"; 122 152 123 Identifier = Letter+;153 Identifier = [_a-zA-Z\x80-\xFF]+; 124 154 125 155 <INITIAL> Comment { this.tokenType = "html-comment"; return cursor; } … … 130 160 <INITIAL> DocTypeLT => INITIAL 131 161 { 132 var token = this._line.substring(cursorOnEnter, cursor);133 162 this.tokenType = "html-doctype"; 134 163 this._parseCondition = this._parseConditions.DOCTYPE; … … 136 165 } 137 166 167 <INITIAL> ScriptStart => INITIAL 168 { 169 this.tokenType = "html-tag"; 170 this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE; 171 return cursor; 172 } 173 174 <INITIAL> ScriptEnd => INITIAL 175 { 176 this.tokenType = "html-tag"; 177 this._parseCondition = this._parseConditions.INITIAL; 178 return cursor; 179 } 180 138 181 <INITIAL> LT => INITIAL 139 182 { 183 if (this._parseCondition === this._parseConditions.SCRIPT) { 184 this.tokenType = null; 185 return cursor; 186 } 187 140 188 this.tokenType = "html-tag"; 141 189 this._parseCondition = this._parseConditions.TAG; … … 145 193 <INITIAL> GT => INITIAL 146 194 { 195 if (this._parseCondition === this._parseConditions.SCRIPT) { 196 this.tokenType = null; 197 return cursor; 198 } 199 147 200 if (this._parseCondition === this._parseConditions.DOCTYPE) 148 201 this.tokenType = "html-doctype"; 149 202 else 150 203 this.tokenType = "html-tag"; 151 this._parseCondition = this._parseConditions.INITIAL; 204 205 if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE) 206 this._parseCondition = this._parseConditions.SCRIPT; 207 else 208 this._parseCondition = this._parseConditions.INITIAL; 152 209 return cursor; 153 210 } … … 163 220 <INITIAL> EqualSign => INITIAL 164 221 { 165 if (this._ parseCondition === this._parseConditions.ATTRIBUTE) {166 this.tokenType = null; 167 this._ parseCondition = this._parseConditions.ATTRIBUTE_VALUE;222 if (this._isAttribute()) { 223 this.tokenType = null; 224 this._setAttributeValue(); 168 225 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 169 226 this.tokenType = "html-doctype"; … … 175 232 <INITIAL> Identifier 176 233 { 234 if (this._parseCondition === this._parseConditions.SCRIPT) { 235 this.tokenType = null; 236 return cursor; 237 } 238 177 239 if (this._parseCondition === this._parseConditions.TAG) { 178 240 this.tokenType = "html-tag"; 179 241 this._parseCondition = this._parseConditions.ATTRIBUTE; 180 } else if (this._ parseCondition === this._parseConditions.ATTRIBUTE) {242 } else if (this._isAttribute()) 181 243 this.tokenType = "html-attr-name"; 182 this._parseCondition = this._parseConditions.ATTRIBUTE; 183 } else if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE) { 244 else if (this._isAttributeValue()) 184 245 this.tokenType = "html-attr-value"; 185 this._parseCondition = this._parseConditions.ATTRIBUTE; 186 } else if (this._parseCondition === this._parseConditions.DOCTYPE) 246 else if (this._parseCondition === this._parseConditions.DOCTYPE) 187 247 this.tokenType = "html-doctype"; 188 248 else
Note: See TracChangeset
for help on using the changeset viewer.