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

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

Issue 9502002: Add FunctionDeclaration node. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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: frog/leg/scanner/listener.dart
diff --git a/frog/leg/scanner/listener.dart b/frog/leg/scanner/listener.dart
index 5461ff5023fab04b519502b54d21d59896adb912..36898d5941f56993c79abc376dae0b9e63648406 100644
--- a/frog/leg/scanner/listener.dart
+++ b/frog/leg/scanner/listener.dart
@@ -91,6 +91,12 @@ class Listener {
void endFunction(Token getOrSet, Token endToken) {
}
+ void beginFunctionDeclaration(Token token) {
+ }
+
+ void endFunctionDeclaration(Token token) {
+ }
+
void beginFunctionBody(Token token) {
}
@@ -1034,6 +1040,10 @@ class NodeListener extends ElementListener {
modifiers, initializers, getOrSet));
}
+ void endFunctionDeclaration(Token endToken) {
+ pushNode(new FunctionDeclaration(popNode()));
+ }
+
void endVariablesDeclaration(int count, Token endToken) {
// TODO(ahe): Pick one name for this concept, either
// VariablesDeclaration or VariableDefinitions.
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/scanner/parser.dart » ('j') | frog/leg/typechecker.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698