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

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

Issue 9004025: Parse field modifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleaned up for commit Created 9 years 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 | dart/frog/leg/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/listener.dart
diff --git a/dart/frog/leg/scanner/listener.dart b/dart/frog/leg/scanner/listener.dart
index d22dd5bac0f8f13b4427e2c44e59b466178560b3..d439e39d9d01ab5ff83d6e0b5a5388b4bb2552be 100644
--- a/dart/frog/leg/scanner/listener.dart
+++ b/dart/frog/leg/scanner/listener.dart
@@ -278,9 +278,6 @@ class Listener {
void handleConstExpression(Token token, bool named) {
}
- void handleFinalKeyword(Token finalKeyword) {
- }
-
void handleFunctionTypedFormalParameter(Token token) {
}
@@ -383,9 +380,6 @@ class Listener {
void handleValuedFormalParameter(Token equals, Token token) {
}
- void handleVarKeyword(Token token) {
- }
-
void handleVoidKeyword(Token token) {
}
@@ -686,7 +680,8 @@ class NodeListener extends ElementListener {
void endFormalParameter(Token token, Token thisKeyword) {
NodeList name = new NodeList.singleton(popNode());
TypeAnnotation type = popNode();
- pushNode(new VariableDefinitions(type, null, name, token));
+ Modifiers modifiers = popNode();
+ pushNode(new VariableDefinitions(type, modifiers, name, token));
if (thisKeyword !== null) {
canceler.cancel('field formal parameters not implemented',
token: thisKeyword);
@@ -822,20 +817,13 @@ class NodeListener extends ElementListener {
modifiers, initializers));
}
- void handleVarKeyword(Token token) {
- pushNode(new TypeAnnotation(new Identifier(token), null));
- }
-
- void handleFinalKeyword(Token token) {
- canceler.cancel('Final not implemented yet', token: token);
- }
-
void endVariablesDeclaration(int count, Token endToken) {
// TODO(ahe): Pick one name for this concept, either
// VariablesDeclaration or VariableDefinitions.
NodeList variables = makeNodeList(count, null, null, ",");
TypeAnnotation type = popNode();
- pushNode(new VariableDefinitions(type, null, variables, endToken));
+ Modifiers modifiers = popNode();
+ pushNode(new VariableDefinitions(type, modifiers, variables, endToken));
}
void endInitializer(Token assignmentOperator) {
« no previous file with comments | « no previous file | dart/frog/leg/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698