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

Unified Diff: pkg/front_end/lib/src/fasta/analyzer/token_utils.dart

Issue 2738313002: rename fasta.Token.value --> lexeme (Closed)
Patch Set: merge Created 3 years, 9 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
Index: pkg/front_end/lib/src/fasta/analyzer/token_utils.dart
diff --git a/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart b/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart
index 302accc17ceb11103a17604727f8e1d462fb6236..a599c23c51e1b8e0e3053592a5cc803b6d955d52 100644
--- a/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart
+++ b/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart
@@ -216,10 +216,10 @@ class ToAnalyzerTokenStreamConverter {
analyzer.CommentToken toAnalyzerCommentToken(Token token) {
// TODO(paulberry,ahe): It would be nice if the scanner gave us an
// easier way to distinguish between the two types of comment.
- var type = token.value.startsWith('/*')
+ var type = token.lexeme.startsWith('/*')
? TokenType.MULTI_LINE_COMMENT
: TokenType.SINGLE_LINE_COMMENT;
- return new analyzer.CommentToken(type, token.value, token.charOffset);
+ return new analyzer.CommentToken(type, token.lexeme, token.charOffset);
}
/// Converts a stream of Analyzer tokens (starting with [token] and continuing
@@ -506,10 +506,10 @@ analyzer.Token toAnalyzerToken(Token token,
if (token == null) return null;
analyzer.Token makeStringToken(TokenType tokenType) {
if (commentToken == null) {
- return new analyzer.StringToken(tokenType, token.value, token.charOffset);
+ return new analyzer.StringToken(tokenType, token.lexeme, token.charOffset);
} else {
return new analyzer.StringTokenWithComment(
- tokenType, token.value, token.charOffset, commentToken);
+ tokenType, token.lexeme, token.charOffset, commentToken);
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698