removed unused members
diff --git a/lib/dom.dart b/lib/dom.dart
index 3c5b332..7b14422 100644
--- a/lib/dom.dart
+++ b/lib/dom.dart
@@ -272,46 +272,6 @@
bool contains(Node node) => nodes.contains(node);
- /// Checks if this is a type selector.
- /// See <http://www.w3.org/TR/CSS2/grammar.html>.
- /// Note: this doesn't support '*', the universal selector, non-ascii chars or
- /// escape chars.
- bool _isTypeSelector(String selector) {
- // Parser:
-
- // element_name
- // : IDENT | '*'
- // ;
-
- // Lexer:
-
- // nmstart [_a-z]|{nonascii}|{escape}
- // nmchar [_a-z0-9-]|{nonascii}|{escape}
- // ident -?{nmstart}{nmchar}*
- // nonascii [\240-\377]
- // unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
- // escape {unicode}|\\[^\r\n\f0-9a-f]
-
- // As mentioned above, no nonascii or escape support yet.
- int len = selector.length;
- if (len == 0) return false;
-
- int i = 0;
- const int DASH = 45;
- if (selector.codeUnitAt(i) == DASH) i++;
-
- if (i >= len || !isLetter(selector[i])) return false;
- i++;
-
- for (; i < len; i++) {
- if (!isLetterOrDigit(selector[i]) && selector.codeUnitAt(i) != DASH) {
- return false;
- }
- }
-
- return true;
- }
-
/// Initialize [attributeSpans] using [sourceSpan].
void _ensureAttributeSpans() {
if (_attributeSpans != null) return;
diff --git a/lib/parser.dart b/lib/parser.dart
index ded6a74..23f62a7 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -534,7 +534,7 @@
void parseRCDataRawtext(Token token, String contentType) {
assert(contentType == "RAWTEXT" || contentType == "RCDATA");
- var element = tree.insertElement(token);
+ tree.insertElement(token);
if (contentType == "RAWTEXT") {
tokenizer.state = tokenizer.rawtextState;
@@ -1973,7 +1973,7 @@
}
void endTagOther(EndTagToken token) {
- var node = tree.openElements.removeLast();
+ tree.openElements.removeLast();
parser.phase = parser.originalPhase;
}
}
diff --git a/lib/src/css_class_set.dart b/lib/src/css_class_set.dart
index 03136a7..ea0152d 100644
--- a/lib/src/css_class_set.dart
+++ b/lib/src/css_class_set.dart
@@ -28,7 +28,6 @@
}
void writeClasses(Set<String> s) {
- List list = new List.from(s);
_element.className = s.join(' ');
}
}
diff --git a/test/parser_test.dart b/test/parser_test.dart
index 821eb2d..aa45493 100644
--- a/test/parser_test.dart
+++ b/test/parser_test.dart
@@ -84,7 +84,6 @@
var testName = pathos.basenameWithoutExtension(path);
group(testName, () {
- int index = 0;
for (var testData in tests) {
var input = testData['data'];
var errors = testData['errors'];
@@ -102,8 +101,6 @@
});
}
}
-
- index++;
}
});
}
diff --git a/test/support.dart b/test/support.dart
index 0118ecf..3a99593 100644
--- a/test/support.dart
+++ b/test/support.dart
@@ -45,7 +45,6 @@
var key = null;
var result = <Map>[];
var lines = _text.split('\n');
- int numLines = lines.length;
// Remove trailing newline to match Python
if (lines.last == '') {
lines.removeLast();