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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/listener.dart

Issue 21511003: Support symbol literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 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
Index: sdk/lib/_internal/compiler/implementation/scanner/listener.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 314e8d735a912df3750114e4b6e9d5c4ddcf5107..1e8f36a4a958ff37f0a079ba6898acff20779727 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -311,6 +311,12 @@ class Listener {
void endSwitchBlock(int caseCount, Token beginToken, Token endToken) {
}
+ void beginLiteralSymbol(Token token) {
+ }
+
+ void endLiteralSymbol(Token hashToken, int identifierCount) {
+ }
+
void beginThrowExpression(Token token) {
}
@@ -486,6 +492,9 @@ class Listener {
void handleNoTypeVariables(Token token) {
}
+ void handleOperator(Token token) {
+ }
+
void handleOperatorName(Token operatorKeyword, Token token) {
}
@@ -1351,6 +1360,11 @@ class NodeListener extends ElementListener {
pushNode(new LiteralNull(token));
}
+ void endLiteralSymbol(Token hashToken, int identifierCount) {
+ NodeList identifiers = makeNodeList(identifierCount, null, null, '.');
+ pushNode(new LiteralSymbol(hashToken, identifiers));
+ }
+
void handleBinaryExpression(Token token) {
Node argument = popNode();
Node receiver = popNode();
@@ -1642,6 +1656,10 @@ class NodeListener extends ElementListener {
handleNewExpression(token);
}
+ void handleOperator(Token token) {
+ pushNode(new Operator(token));
+ }
+
void handleOperatorName(Token operatorKeyword, Token token) {
Operator op = new Operator(token);
pushNode(new Send(new Identifier(operatorKeyword), op, null));

Powered by Google App Engine
This is Rietveld 408576698