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

Unified Diff: packages/csslib/lib/src/tree.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/csslib/lib/src/tokenkind.dart ('k') | packages/csslib/lib/src/tree_printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/csslib/lib/src/tree.dart
diff --git a/packages/csslib/lib/src/tree.dart b/packages/csslib/lib/src/tree.dart
index 5dad435b48467053e18de2c236227ace717117fb..ba8370e96b1b1a65acb8fcca5de95fb3a2d047ac 100644
--- a/packages/csslib/lib/src/tree.dart
+++ b/packages/csslib/lib/src/tree.dart
@@ -44,6 +44,21 @@ class Negation extends TreeNode {
String get name => 'not';
}
+// calc(...)
+// TODO(terry): Hack to handle calc however the expressions should be fully
+// parsed and in the AST.
+class CalcTerm extends LiteralTerm {
+ final LiteralTerm expr;
+
+ CalcTerm(var value, String t, this.expr, SourceSpan span)
+ : super(value, t, span);
+
+ CalcTerm clone() => new CalcTerm(value, text, expr.clone(), span);
+ visit(VisitorBase visitor) => visitor.visitCalcTerm(this);
+
+ String toString() => "$text($expr)";
+}
+
// /* .... */
class CssComment extends TreeNode {
final String comment;
@@ -197,6 +212,7 @@ class AttributeSelector extends SimpleSelector {
case TokenKind.NO_MATCH:
return '';
}
+ return null;
}
// Return the TokenKind for operator used by visitAttributeSelector.
@@ -215,6 +231,7 @@ class AttributeSelector extends SimpleSelector {
case TokenKind.SUBSTRING_MATCH:
return 'SUBSTRING_MATCH';
}
+ return null;
}
String valueToString() {
@@ -572,6 +589,7 @@ class KeyFrameDirective extends Directive {
case TokenKind.DIRECTIVE_O_KEYFRAMES:
return '@-o-keyframes';
}
+ return null;
}
KeyFrameDirective clone() {
@@ -676,7 +694,7 @@ class MixinDefinition extends Directive {
/** Support a Sass @mixin. See http://sass-lang.com for description. */
class MixinRulesetDirective extends MixinDefinition {
- final List<RuleSet> rulesets;
+ final List rulesets;
MixinRulesetDirective(String name, List<VarDefinitionDirective> args,
bool varArgs, this.rulesets, SourceSpan span)
« no previous file with comments | « packages/csslib/lib/src/tokenkind.dart ('k') | packages/csslib/lib/src/tree_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698