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

Unified Diff: pkg/csslib/lib/src/token.dart

Issue 751453004: Improve the speed and memory efficiency of csslib parsing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/csslib/lib/src/token.dart
diff --git a/pkg/csslib/lib/src/token.dart b/pkg/csslib/lib/src/token.dart
index debd30145caf1a9be0bb137c1a9f810465fb488e..b78fbccc4c7b5766f96d9f8a1529c31939aafcd2 100644
--- a/pkg/csslib/lib/src/token.dart
+++ b/pkg/csslib/lib/src/token.dart
@@ -12,7 +12,7 @@ class Token {
final int kind;
/** The location where this token was parsed from. */
- final SourceSpan span;
+ final FileSpan span;
/** The start offset of this token. */
int get start => span.start.offset;
@@ -43,13 +43,13 @@ class Token {
/** A token containing a parsed literal value. */
class LiteralToken extends Token {
var value;
- LiteralToken(int kind, SourceSpan span, this.value) : super(kind, span);
+ LiteralToken(int kind, FileSpan span, this.value) : super(kind, span);
}
/** A token containing error information. */
class ErrorToken extends Token {
String message;
- ErrorToken(int kind, SourceSpan span, this.message) : super(kind, span);
+ ErrorToken(int kind, FileSpan span, this.message) : super(kind, span);
}
/**
@@ -61,6 +61,6 @@ class ErrorToken extends Token {
class IdentifierToken extends Token {
final String text;
- IdentifierToken(this.text, int kind, SourceSpan span)
+ IdentifierToken(this.text, int kind, FileSpan span)
: super(kind, span);
}

Powered by Google App Engine
This is Rietveld 408576698