Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 2a2a49a0fb475e13cb3d213893c64b7ef78fe500..2efd53ef87e1f81e8ab48f2dedc8c094d8ffd037 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -240,6 +240,10 @@ class PreParser { |
return Statement(kUnknownStatement); |
} |
+ static Statement FunctionDeclaration() { |
+ return Statement(kFunctionDeclaration); |
+ } |
+ |
// Creates expression statement from expression. |
// Preserves being an unparenthesized string literal, possibly |
// "use strict". |
@@ -263,11 +267,16 @@ class PreParser { |
return code_ == kUseStrictExpressionStatement; |
} |
+ bool IsFunctionDeclaration() { |
+ return code_ == kFunctionDeclaration; |
+ } |
+ |
private: |
enum Type { |
kUnknownStatement, |
kStringLiteralExpressionStatement, |
- kUseStrictExpressionStatement |
+ kUseStrictExpressionStatement, |
+ kFunctionDeclaration |
}; |
explicit Statement(Type code) : code_(code) {} |