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

Unified Diff: pkg/compiler/lib/src/tokens/token.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months 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 | « pkg/compiler/lib/src/tokens/precedence_constants.dart ('k') | pkg/compiler/lib/src/tokens/token_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tokens/token.dart
diff --git a/pkg/compiler/lib/src/tokens/token.dart b/pkg/compiler/lib/src/tokens/token.dart
index d390eb73a819b8b16eb2f28b8bbb79084cf5b853..df66bd9526444e33ea45951e471a90709ab50e0e 100644
--- a/pkg/compiler/lib/src/tokens/token.dart
+++ b/pkg/compiler/lib/src/tokens/token.dart
@@ -4,23 +4,16 @@
library dart2js.tokens;
-import 'dart:convert' show
- UTF8;
-import 'dart:collection' show
- HashSet;
+import 'dart:convert' show UTF8;
+import 'dart:collection' show HashSet;
import '../common.dart';
-import '../util/util.dart' show
- computeHashCode;
-
-import 'keyword.dart' show
- Keyword;
-import 'precedence.dart' show
- PrecedenceInfo;
-import 'precedence_constants.dart' as Precedence show
- BAD_INPUT_INFO;
-import 'token_constants.dart' as Tokens show
- IDENTIFIER_TOKEN;
+import '../util/util.dart' show computeHashCode;
+
+import 'keyword.dart' show Keyword;
+import 'precedence.dart' show PrecedenceInfo;
+import 'precedence_constants.dart' as Precedence show BAD_INPUT_INFO;
+import 'token_constants.dart' as Tokens show IDENTIFIER_TOKEN;
/**
* A token that doubles as a linked list.
@@ -132,7 +125,6 @@ class TokenPair implements Spannable {
* Also used for end of file with EOF_INFO.
*/
class SymbolToken extends Token {
-
final PrecedenceInfo info;
SymbolToken(this.info, int charOffset) : super(charOffset);
@@ -179,8 +171,7 @@ class KeywordToken extends Token {
}
abstract class ErrorToken extends Token {
- ErrorToken(int charOffset)
- : super(charOffset);
+ ErrorToken(int charOffset) : super(charOffset);
PrecedenceInfo get info => Precedence.BAD_INPUT_INFO;
@@ -198,8 +189,7 @@ abstract class ErrorToken extends Token {
class BadInputToken extends ErrorToken {
final int character;
- BadInputToken(this.character, int charOffset)
- : super(charOffset);
+ BadInputToken(this.character, int charOffset) : super(charOffset);
String toString() => "BadInputToken($character)";
@@ -259,7 +249,7 @@ class StringToken extends Token {
* is canonicalized before the token is created.
*/
StringToken.fromString(this.info, String value, int charOffset,
- {bool canonicalize : false})
+ {bool canonicalize: false})
: valueOrLazySubstring = canonicalizedString(value, canonicalize),
super(charOffset);
@@ -267,13 +257,14 @@ class StringToken extends Token {
* Creates a lazy string token. If [canonicalize] is true, the string
* is canonicalized before the token is created.
*/
- StringToken.fromSubstring(this.info, String data, int start, int end,
- int charOffset, {bool canonicalize : false})
+ StringToken.fromSubstring(
+ this.info, String data, int start, int end, int charOffset,
+ {bool canonicalize: false})
: super(charOffset) {
int length = end - start;
if (length <= LAZY_THRESHOLD) {
- valueOrLazySubstring = canonicalizedString(data.substring(start, end),
- canonicalize);
+ valueOrLazySubstring =
+ canonicalizedString(data.substring(start, end), canonicalize);
} else {
valueOrLazySubstring =
new LazySubstring(data, start, length, canonicalize);
@@ -285,7 +276,7 @@ class StringToken extends Token {
* is passed through a UTF-8 decoder.
*/
StringToken.fromUtf8Bytes(this.info, List<int> data, int start, int end,
- bool asciiOnly, int charOffset)
+ bool asciiOnly, int charOffset)
: super(charOffset) {
int length = end - start;
if (length <= LAZY_THRESHOLD) {
@@ -307,8 +298,8 @@ class StringToken extends Token {
valueOrLazySubstring = canonicalizedString(
data.substring(start, end), valueOrLazySubstring.boolValue);
} else {
- valueOrLazySubstring = decodeUtf8(
- data, start, end, valueOrLazySubstring.boolValue);
+ valueOrLazySubstring =
+ decodeUtf8(data, start, end, valueOrLazySubstring.boolValue);
}
return valueOrLazySubstring;
}
@@ -321,8 +312,7 @@ class StringToken extends Token {
String toString() => "StringToken($value)";
- static final HashSet<String> canonicalizedSubstrings =
- new HashSet<String>();
+ static final HashSet<String> canonicalizedSubstrings = new HashSet<String>();
static String canonicalizedString(String s, bool canonicalize) {
if (!canonicalize) return s;
@@ -409,8 +399,7 @@ class FullLazySubstring extends LazySubstring {
}
bool isUserDefinableOperator(String value) {
- return
- isBinaryOperator(value) ||
+ return isBinaryOperator(value) ||
isMinusOperator(value) ||
isTernaryOperator(value) ||
isUnaryOperator(value);
@@ -419,8 +408,7 @@ bool isUserDefinableOperator(String value) {
bool isUnaryOperator(String value) => value == '~';
bool isBinaryOperator(String value) {
- return
- value == '==' ||
+ return value == '==' ||
value == '[]' ||
value == '*' ||
value == '/' ||
« no previous file with comments | « pkg/compiler/lib/src/tokens/precedence_constants.dart ('k') | pkg/compiler/lib/src/tokens/token_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698