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

Side by Side Diff: pkg/analysis_server/tool/spec/codegen_dart_protocol.dart

Issue 2738313002: rename fasta.Token.value --> lexeme (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library codegen.protocol; 5 library codegen.protocol;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/src/codegen/tools.dart'; 9 import 'package:analyzer/src/codegen/tools.dart';
10 import 'package:html/dom.dart' as dom; 10 import 'package:html/dom.dart' as dom;
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 @override 1220 @override
1221 bool get isIdentity => true; 1221 bool get isIdentity => true;
1222 } 1222 }
1223 1223
1224 /** 1224 /**
1225 * Representation of ToJsonCode for a snippet of inline code. 1225 * Representation of ToJsonCode for a snippet of inline code.
1226 */ 1226 */
1227 class ToJsonSnippet extends ToJsonCode { 1227 class ToJsonSnippet extends ToJsonCode {
1228 /** 1228 /**
1229 * Callback that can be used to generate the code snippet, once the name 1229 * Callback that can be used to generate the code snippet, once the name
1230 * of the [value] variable is known. 1230 * of the [lexeme] variable is known.
ahe 2017/03/10 07:26:10 Are you sure about the changes to this file?
danrubel 2017/03/11 22:10:37 Good catch. This file should not be changed. Fixed
1231 */ 1231 */
1232 final ToJsonSnippetCallback callback; 1232 final ToJsonSnippetCallback callback;
1233 1233
1234 /** 1234 /**
1235 * Dart type of the [value] variable. 1235 * Dart type of the [lexeme] variable.
1236 */ 1236 */
1237 final String type; 1237 final String type;
1238 1238
1239 ToJsonSnippet(this.type, this.callback); 1239 ToJsonSnippet(this.type, this.callback);
1240 1240
1241 @override 1241 @override
1242 String get asClosure => '($type value) => ${callback('value')}'; 1242 String get asClosure => '($type value) => ${callback('value')}';
1243 1243
1244 @override 1244 @override
1245 bool get isIdentity => false; 1245 bool get isIdentity => false;
1246 1246
1247 @override 1247 @override
1248 String asSnippet(String value) => callback(value); 1248 String asSnippet(String value) => callback(value);
1249 } 1249 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/constant/value.dart » ('j') | pkg/analyzer/lib/src/dart/constant/value.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698