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

Unified Diff: dart/frog/leg/scanner/token.dart

Issue 9634008: Introduce element categories and move resolver towards being more compositional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 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
« no previous file with comments | « dart/frog/leg/scanner/parser.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/token.dart
diff --git a/dart/frog/leg/scanner/token.dart b/dart/frog/leg/scanner/token.dart
index 86428a5afc3859f26c228ac30b150a98d0394e3e..2e4676d2e840c67fad9f6526575b325e3a0f4e53 100644
--- a/dart/frog/leg/scanner/token.dart
+++ b/dart/frog/leg/scanner/token.dart
@@ -198,6 +198,31 @@ class BeginGroupToken extends StringToken {
: super(info, value, charOffset);
}
+bool isUserDefinableOperator(String value) {
+ return
+ (value === '==') ||
+ (value === '~') ||
+ (value === 'negate') ||
+ (value === '[]') ||
+ (value === '[]=') ||
+ (value === '*') ||
+ (value === '/') ||
+ (value === '%') ||
+ (value === '~/') ||
+ (value === '+') ||
+ (value === '-') ||
+ (value === '<<') ||
+ (value === '>>>') ||
+ (value === '>>') ||
+ (value === '>=') ||
+ (value === '>') ||
+ (value === '<=') ||
+ (value === '<') ||
+ (value === '&') ||
+ (value === '^') ||
+ (value === '|');
+}
+
class PrecedenceInfo {
final SourceString value;
final int precedence;
« no previous file with comments | « dart/frog/leg/scanner/parser.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698