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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 10910279: Issue 5075. Remove support for 'negate' and 'equals' operators (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | compiler/javatests/com/google/dart/compiler/type/class_with_operators.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index b9ae4314f141b9e87a293749ebabaee9a015224e..b31dce175fc7401b6dc7be72a70fec4b33b33c40 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -142,7 +142,6 @@ public class DartParser extends CompletionHooksParserBase {
private static final String ASSERT_KEYWORD = "assert";
private static final String CALL_KEYWORD = "call";
private static final String DYNAMIC_KEYWORD = "Dynamic";
- private static final String EQUALS_KEYWORD = "equals";
private static final String EXPORT_KEYWORD = "export";
private static final String EXTERNAL_KEYWORD = "external";
private static final String FACTORY_KEYWORD = "factory";
@@ -153,7 +152,6 @@ public class DartParser extends CompletionHooksParserBase {
private static final String INTERFACE_KEYWORD = "interface";
private static final String LIBRARY_KEYWORD = "library";
private static final String NATIVE_KEYWORD = "native";
- private static final String NEGATE_KEYWORD = "negate";
private static final String OF_KEYWORD = "of";
private static final String ON_KEYWORD = "on";
private static final String OPERATOR_KEYWORD = "operator";
@@ -1438,14 +1436,6 @@ public class DartParser extends CompletionHooksParserBase {
if (peekPseudoKeyword(0, CALL_KEYWORD) && peek(1).equals(Token.LPAREN)) {
return true;
}
- // operator equals (
- if (peekPseudoKeyword(0, EQUALS_KEYWORD) && peek(1).equals(Token.LPAREN)) {
- return true;
- }
- // operator negate (
- if (peekPseudoKeyword(0, NEGATE_KEYWORD) && peek(1).equals(Token.LPAREN)) {
- return true;
- }
// TODO(zundel): Look for valid operator overload tokens. For now just assuming
// non-idents are good enough
// operator ??? (
@@ -1606,14 +1596,6 @@ public class DartParser extends CompletionHooksParserBase {
name = done(new DartIdentifier(CALL_KEYWORD));
arity = -1;
} else if (operation == Token.IDENTIFIER
- && ctx.getTokenString().equals(EQUALS_KEYWORD)) {
- name = done(new DartIdentifier(EQUALS_KEYWORD));
- arity = 1;
- } else if (operation == Token.IDENTIFIER
- && ctx.getTokenString().equals(NEGATE_KEYWORD)) {
- name = done(new DartIdentifier(NEGATE_KEYWORD));
- arity = 0;
- } else if (operation == Token.IDENTIFIER
&& ctx.getTokenString().equals(CALL_KEYWORD)) {
name = done(new DartIdentifier(CALL_KEYWORD));
} else {
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/type/class_with_operators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698