Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/html.dart

Issue 18612009: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.html; 3 library engine.html;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'source.dart'; 7 import 'source.dart';
8 import 'error.dart'; 8 import 'error.dart';
9 import 'instrumentation.dart'; 9 import 'instrumentation.dart';
10 import 'element.dart' show HtmlElementImpl; 10 import 'element.dart' show HtmlElementImpl;
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } else if (c == 0xA) { 527 } else if (c == 0xA) {
528 c = advance(); 528 c = advance();
529 recordStartOfLine(); 529 recordStartOfLine();
530 } else { 530 } else {
531 c = advance(); 531 c = advance();
532 } 532 }
533 return c; 533 return c;
534 } 534 }
535 void scan() { 535 void scan() {
536 bool inBrackets = false; 536 bool inBrackets = false;
537 bool passThrough = false; 537 String endPassThrough = null;
538 int c = advance(); 538 int c = advance();
539 while (c >= 0) { 539 while (c >= 0) {
540 int start = offset; 540 int start = offset;
541 if (c == 0x3C) { 541 if (c == 0x3C) {
542 c = advance(); 542 c = advance();
543 if (c == 0x21) { 543 if (c == 0x21) {
544 c = advance(); 544 c = advance();
545 if (c == 0x2D && peek() == 0x2D) { 545 if (c == 0x2D && peek() == 0x2D) {
546 c = advance(); 546 c = advance();
547 int dashCount = 1; 547 int dashCount = 1;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (Character.isLetterOrDigit(c)) { 599 if (Character.isLetterOrDigit(c)) {
600 int tagStart = offset; 600 int tagStart = offset;
601 c = advance(); 601 c = advance();
602 while (Character.isLetterOrDigit(c) || c == 0x2D || c == 0x5F) { 602 while (Character.isLetterOrDigit(c) || c == 0x2D || c == 0x5F) {
603 c = advance(); 603 c = advance();
604 } 604 }
605 emit3(TokenType.TAG, tagStart, -1); 605 emit3(TokenType.TAG, tagStart, -1);
606 String tag = _tail.lexeme; 606 String tag = _tail.lexeme;
607 for (String str in _passThroughElements) { 607 for (String str in _passThroughElements) {
608 if (str == tag) { 608 if (str == tag) {
609 passThrough = true; 609 endPassThrough = "</${str}>";
610 break; 610 break;
611 } 611 }
612 } 612 }
613 } 613 }
614 } 614 }
615 } else if (c == 0x3E) { 615 } else if (c == 0x3E) {
616 emit2(TokenType.GT, start); 616 emit2(TokenType.GT, start);
617 inBrackets = false; 617 inBrackets = false;
618 c = advance(); 618 c = advance();
619 if (passThrough) { 619 if (endPassThrough != null) {
620 while (c >= 0 && (c != 0x3C || peek() != 0x2F)) { 620 bool endFound = false;
621 int len = endPassThrough.length;
622 int firstC = endPassThrough.codeUnitAt(0);
623 int index = 0;
624 int nextC = firstC;
625 while (c >= 0) {
626 if (c == nextC) {
627 index++;
628 if (index == len) {
629 endFound = true;
630 break;
631 }
632 nextC = endPassThrough.codeUnitAt(index);
633 } else if (c == firstC) {
634 index = 1;
635 nextC = endPassThrough.codeUnitAt(1);
636 } else {
637 index = 0;
638 nextC = firstC;
639 }
621 c = recordStartOfLineAndAdvance(c); 640 c = recordStartOfLineAndAdvance(c);
622 } 641 }
623 if (start + 1 < offset) { 642 if (start + 1 < offset) {
624 emit3(TokenType.TEXT, start + 1, -1); 643 if (endFound) {
644 emit3(TokenType.TEXT, start + 1, -len);
645 emit2(TokenType.LT_SLASH, offset - len + 1);
646 emit3(TokenType.TAG, offset - len + 3, -1);
647 } else {
648 emit3(TokenType.TEXT, start + 1, -1);
649 }
625 } 650 }
626 passThrough = false; 651 endPassThrough = null;
627 } 652 }
628 } else if (c == 0x2F && peek() == 0x3E) { 653 } else if (c == 0x2F && peek() == 0x3E) {
629 advance(); 654 advance();
630 emit2(TokenType.SLASH_GT, start); 655 emit2(TokenType.SLASH_GT, start);
631 inBrackets = false; 656 inBrackets = false;
632 c = advance(); 657 c = advance();
633 } else if (!inBrackets) { 658 } else if (!inBrackets) {
634 c = recordStartOfLineAndAdvance(c); 659 c = recordStartOfLineAndAdvance(c);
635 while (c != 0x3C && c >= 0) { 660 while (c != 0x3C && c >= 0) {
636 c = recordStartOfLineAndAdvance(c); 661 c = recordStartOfLineAndAdvance(c);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 static final TokenType GT = new TokenType('GT', 2, ">"); 934 static final TokenType GT = new TokenType('GT', 2, ">");
910 static final TokenType LT_SLASH = new TokenType('LT_SLASH', 3, "</"); 935 static final TokenType LT_SLASH = new TokenType('LT_SLASH', 3, "</");
911 static final TokenType LT = new TokenType('LT', 4, "<"); 936 static final TokenType LT = new TokenType('LT', 4, "<");
912 static final TokenType SLASH_GT = new TokenType('SLASH_GT', 5, "/>"); 937 static final TokenType SLASH_GT = new TokenType('SLASH_GT', 5, "/>");
913 static final TokenType COMMENT = new TokenType('COMMENT', 6, null); 938 static final TokenType COMMENT = new TokenType('COMMENT', 6, null);
914 static final TokenType DECLARATION = new TokenType('DECLARATION', 7, null); 939 static final TokenType DECLARATION = new TokenType('DECLARATION', 7, null);
915 static final TokenType DIRECTIVE = new TokenType('DIRECTIVE', 8, null); 940 static final TokenType DIRECTIVE = new TokenType('DIRECTIVE', 8, null);
916 static final TokenType STRING = new TokenType('STRING', 9, null); 941 static final TokenType STRING = new TokenType('STRING', 9, null);
917 static final TokenType TAG = new TokenType('TAG', 10, null); 942 static final TokenType TAG = new TokenType('TAG', 10, null);
918 static final TokenType TEXT = new TokenType('TEXT', 11, null); 943 static final TokenType TEXT = new TokenType('TEXT', 11, null);
919 static final List<TokenType> values = [EOF, EQ, GT, LT_SLASH, LT, SLASH_GT, CO MMENT, DECLARATION, DIRECTIVE, STRING, TAG, TEXT]; 944 static final List<TokenType> values = [
945 EOF,
946 EQ,
947 GT,
948 LT_SLASH,
949 LT,
950 SLASH_GT,
951 COMMENT,
952 DECLARATION,
953 DIRECTIVE,
954 STRING,
955 TAG,
956 TEXT];
920 957
921 /// The name of this enum constant, as declared in the enum declaration. 958 /// The name of this enum constant, as declared in the enum declaration.
922 final String name; 959 final String name;
923 960
924 /// The position in the enum declaration. 961 /// The position in the enum declaration.
925 final int ordinal; 962 final int ordinal;
926 963
927 /** 964 /**
928 * The lexeme that defines this type of token, or `null` if there is more than one possible 965 * The lexeme that defines this type of token, or `null` if there is more than one possible
929 * lexeme for this type of token. 966 * lexeme for this type of token.
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 */ 1754 */
1718 void set element(HtmlElementImpl element2) { 1755 void set element(HtmlElementImpl element2) {
1719 this._element = element2; 1756 this._element = element2;
1720 } 1757 }
1721 void visitChildren(XmlVisitor<Object> visitor) { 1758 void visitChildren(XmlVisitor<Object> visitor) {
1722 for (XmlTagNode node in _tagNodes) { 1759 for (XmlTagNode node in _tagNodes) {
1723 node.accept(visitor); 1760 node.accept(visitor);
1724 } 1761 }
1725 } 1762 }
1726 } 1763 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/error.dart ('k') | pkg/analyzer_experimental/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698