Skip to content

Commit dbbf3b8

Browse files
committed
Remove a number of unused members, prepare for release
[email protected] Review URL: https://codereview.chromium.org//1138823002
1 parent 3900962 commit dbbf3b8

File tree

8 files changed

+6
-69
lines changed

8 files changed

+6
-69
lines changed

pkgs/csslib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.12.0+1
2+
3+
* Allow the lastest version of `logging` package.
4+
15
## 0.12.0
26

37
* Top-level methods in `parser.dart` now take `PreprocessorOptions` instead of

pkgs/csslib/lib/parser.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,6 @@ class _Parser {
300300
}
301301
}
302302

303-
void _eatSemicolon() {
304-
_eat(TokenKind.SEMICOLON);
305-
}
306-
307303
void _errorExpected(String expected) {
308304
var tok = _next();
309305
var message;

pkgs/csslib/lib/src/polyfill.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PolyFill {
5252

5353
// Resolve all definitions to a non-VarUsage (terminal expression).
5454
mainStyleSheetVarDefs.forEach((key, value) {
55-
for (Expression expr in (value.expression as Expressions).expressions) {
55+
for (var _ in (value.expression as Expressions).expressions) {
5656
mainStyleSheetVarDefs[key] =
5757
_findTerminalVarDefinition(_allVarDefinitions, value);
5858
}

pkgs/csslib/lib/src/tokenizer_base.dart

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ abstract class TokenizerBase {
5555
int _index = 0;
5656
int _startIndex = 0;
5757

58-
static const String _CDATA_START = '<![CDATA[';
59-
static const String _CDATA_END = ']]>';
60-
6158
TokenizerBase(this._file, this._text, this._skipWhitespace,
6259
[this._index = 0]);
6360

@@ -104,14 +101,6 @@ abstract class TokenizerBase {
104101
}
105102
}
106103

107-
String _tokenText() {
108-
if (_index < _text.length) {
109-
return _text.substring(_startIndex, _index);
110-
} else {
111-
return _text.substring(_startIndex, _text.length);
112-
}
113-
}
114-
115104
Token _finishToken(int kind) {
116105
return new Token(kind, _file.span(_startIndex, _index));
117106
}
@@ -306,14 +295,6 @@ abstract class TokenizerBase {
306295
}
307296
}
308297

309-
Token _finishOpenBrace() {
310-
return _finishToken(TokenKind.LBRACE);
311-
}
312-
313-
Token _finishCloseBrace() {
314-
return _finishToken(TokenKind.RBRACE);
315-
}
316-
317298
Token finishString(int quote) {
318299
if (_maybeEatChar(quote)) {
319300
if (_maybeEatChar(quote)) {

pkgs/csslib/lib/src/tokenkind.dart

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -467,40 +467,6 @@ class TokenKind {
467467
// see http://www.w3schools.com/cssref/pr_list-style-type.asp
468468
// for list of possible values.
469469

470-
// List of valid CSS functions:
471-
static const List<Map<String, Object>> _FUNCTIONS = const [
472-
const {'name': 'counter', 'info': const {'params': 2, 'expr': false}},
473-
const {'name': 'attr', 'info': const {'params': 1, 'expr': false}},
474-
const {'name': 'calc', 'info': const {'params': 1, 'expr': true}},
475-
const {'name': 'min', 'info': const {'params': 2, 'expr': true}},
476-
const {'name': 'max', 'info': const {'params': 2, 'expr': true}},
477-
478-
// 2D functions:
479-
const {'name': 'translateX', 'info': const {'params': 1, 'expr': false}},
480-
const {'name': 'translateY', 'info': const {'params': 1, 'expr': false}},
481-
const {'name': 'translate', 'info': const {'params': 2, 'expr': false}},
482-
const {'name': 'rotate', 'info': const {'params': 1, 'expr': false}},
483-
const {'name': 'scaleX', 'info': const {'params': 1, 'expr': false}},
484-
const {'name': 'scaleY', 'info': const {'params': 1, 'expr': false}},
485-
const {'name': 'scale', 'info': const {'params': 2, 'expr': false}},
486-
const {'name': 'skewX', 'info': const {'params': 1, 'expr': false}},
487-
const {'name': 'skewY', 'info': const {'params': 1, 'expr': false}},
488-
const {'name': 'skew', 'info': const {'params': 2, 'expr': false}},
489-
const {'name': 'matrix', 'info': const {'params': 6, 'expr': false}},
490-
491-
// 3D functions:
492-
const {'name': 'matrix3d', 'info': const {'params': 16, 'expr': false}},
493-
const {'name': 'translate3d', 'info': const {'params': 3, 'expr': false}},
494-
const {'name': 'translateZ', 'info': const {'params': 1, 'expr': false}},
495-
const {'name': 'scale3d', 'info': const {'params': 3, 'expr': false}},
496-
const {'name': 'scaleZ', 'info': const {'params': 1, 'expr': false}},
497-
const {'name': 'rotate3d', 'info': const {'params': 3, 'expr': false}},
498-
const {'name': 'rotateX', 'info': const {'params': 1, 'expr': false}},
499-
const {'name': 'rotateY', 'info': const {'params': 1, 'expr': false}},
500-
const {'name': 'rotateZ', 'info': const {'params': 1, 'expr': false}},
501-
const {'name': 'perspective', 'info': const {'params': 1, 'expr': false}},
502-
];
503-
504470
/**
505471
* Check if name is a pre-defined CSS name. Used by error handler to report
506472
* if name is unknown or used improperly.

pkgs/csslib/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: csslib
2-
version: 0.12.1-dev
2+
version: 0.12.0+1
33
author: Polymer.dart Team <[email protected]>
44
description: A library for parsing CSS.
55
homepage: https://github.com/dart-lang/csslib

pkgs/csslib/test/nested_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,6 @@ span {
341341
}
342342

343343
void mediaNesting() {
344-
var errors = [];
345-
346344
final input = r'''
347345
@media screen and (-webkit-min-device-pixel-ratio:0) {
348346
#toggle-all {
@@ -372,7 +370,6 @@ void mediaNesting() {
372370
}
373371

374372
void simpleThis() {
375-
final errors = [];
376373
final input = '''#header {
377374
h1 {
378375
font-size: 26px;
@@ -406,8 +403,6 @@ void simpleThis() {
406403
}
407404

408405
void complexThis() {
409-
var errors = [];
410-
411406
final input1 = r'''
412407
.light {
413408
.leftCol {
@@ -484,8 +479,6 @@ void complexThis() {
484479
}
485480

486481
variationsThis() {
487-
var errors = [];
488-
489482
final input1 = r'''
490483
.textLink {
491484
a {
@@ -597,7 +590,6 @@ light .leftCol .textLink a {
597590
}
598591

599592
thisCombinator() {
600-
var errors = [];
601593
var input = r'''
602594
.btn {
603595
color: red;

pkgs/csslib/test/var_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ void simpleVar() {
6363
}
6464

6565
void expressionsVar() {
66-
final errors = [];
6766
final input = ''':root {
6867
var-color-background: red;
6968
var-color-foreground: blue;
@@ -222,7 +221,6 @@ void expressionsVar() {
222221
}
223222

224223
void defaultVar() {
225-
final errors = [];
226224
final input = '''
227225
:root {
228226
var-color-background: red;

0 commit comments

Comments
 (0)