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

Side by Side Diff: lib/src/token.dart

Issue 11265012: Changed UnsupportedOperationException to UnsupportedError (Closed) Base URL: https://github.com/dart-lang/html5lib.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « lib/dom_parsing.dart ('k') | test/tokenizer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** This library contains token types used by the html5 tokenizer. */ 1 /** This library contains token types used by the html5 tokenizer. */
2 library token; 2 library token;
3 3
4 import 'package:html5lib/dom_parsing.dart' show SourceSpan; 4 import 'package:html5lib/dom_parsing.dart' show SourceSpan;
5 5
6 /** An html5 token. */ 6 /** An html5 token. */
7 abstract class Token { 7 abstract class Token {
8 SourceSpan span; 8 SourceSpan span;
9 9
10 abstract int get kind; 10 abstract int get kind;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 String systemId; 85 String systemId;
86 String name; 86 String name;
87 bool correct; 87 bool correct;
88 88
89 DoctypeToken({this.publicId, this.systemId, this.correct: false}) 89 DoctypeToken({this.publicId, this.systemId, this.correct: false})
90 : name = ""; 90 : name = "";
91 91
92 int get kind => TokenKind.doctype; 92 int get kind => TokenKind.doctype;
93 93
94 // TODO(jmesserly): remove. These are only here because of Token.data 94 // TODO(jmesserly): remove. These are only here because of Token.data
95 String get data { throw const UnsupportedOperationException("data"); } 95 String get data { throw new UnsupportedError("data"); }
96 set data(value) { throw const UnsupportedOperationException("data"); } 96 set data(value) { throw new UnsupportedError("data"); }
97 } 97 }
98 98
99 99
100 class TokenKind { 100 class TokenKind {
101 static const int spaceCharacters = 0; 101 static const int spaceCharacters = 0;
102 static const int characters = 1; 102 static const int characters = 1;
103 static const int startTag = 2; 103 static const int startTag = 2;
104 static const int endTag = 3; 104 static const int endTag = 3;
105 static const int comment = 4; 105 static const int comment = 4;
106 static const int doctype = 5; 106 static const int doctype = 5;
107 static const int parseError = 6; 107 static const int parseError = 6;
108 } 108 }
OLDNEW
« no previous file with comments | « lib/dom_parsing.dart ('k') | test/tokenizer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698