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

Unified Diff: frog/type.dart

Issue 8763001: Fix names with '$' to not conflict with operators or internal helpers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged again Created 9 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
« no previous file with comments | « frog/token_kind.g.dart ('k') | frog/value.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/type.dart
diff --git a/frog/type.dart b/frog/type.dart
index 3319c96f5fad2a5f21ef00e5a42539ef84996d35..c831355291fdbe7cbead390f85168cc3e9d942a9 100644
--- a/frog/type.dart
+++ b/frog/type.dart
@@ -66,7 +66,7 @@ class Type extends Element {
bool get isVarOrObject() => isVar || isObject;
- /** Gets the $call method for a function type. */
+ /** Gets the :call method for a function type. */
MethodMember getCallMethod() => null;
/** These types may not be implemented or extended by user code. */
@@ -118,12 +118,12 @@ class Type extends Element {
Member _createNotEqualMember() {
// Add a != method just like the == one.
- MethodMember eq = members['\$eq'];
+ MethodMember eq = members[':eq'];
if (eq == null) {
world.internalError('INTERNAL: object does not define ==',
definition.span);
}
- final ne = new MethodMember('\$ne', this, eq.definition);
+ final ne = new MethodMember(':ne', this, eq.definition);
ne.isGenerated = true;
ne.returnType = eq.returnType;
ne.parameters = eq.parameters;
@@ -141,7 +141,7 @@ class Type extends Element {
return parent.getMember(memberName);
} else if (isObject) { // Could also be a top type so need check.
// Create synthetic != method if needed.
- if (memberName == '\$ne') {
+ if (memberName == ':ne') {
var ret = _createNotEqualMember();
members[memberName] = ret;
return ret;
@@ -790,7 +790,7 @@ class DefinedType extends Type {
bool get isInt() => this == world.intType;
bool get isDouble() => this == world.doubleType;
- MethodMember getCallMethod() => members['\$call'];
+ MethodMember getCallMethod() => members[':call'];
Map<String, Member> getAllMembers() => new Map.from(members);
@@ -1013,7 +1013,7 @@ class DefinedType extends Type {
return;
}
- if (methodName.startsWith('get\$') || methodName.startsWith('set\$')) {
+ if (methodName.startsWith('get:') || methodName.startsWith('set:')) {
var propName = methodName.substring(4);
var prop = members[propName];
if (prop == null) {
« no previous file with comments | « frog/token_kind.g.dart ('k') | frog/value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698