@@ -1649,6 +1649,7 @@ namespace JSC {
1649
1649
void append (StatementNode*);
1650
1650
1651
1651
StatementNode* singleStatement () const ;
1652
+ StatementNode* firstStatement () const ;
1652
1653
StatementNode* lastStatement () const ;
1653
1654
1654
1655
bool hasCompletionValue () const ;
@@ -1989,6 +1990,7 @@ namespace JSC {
1989
1990
return m_numConstants + 2 ;
1990
1991
}
1991
1992
1993
+ SourceElements* statements () const { return m_statements; }
1992
1994
StatementNode* singleStatement () const ;
1993
1995
1994
1996
bool hasCompletionValue () const override ;
@@ -2121,6 +2123,8 @@ namespace JSC {
2121
2123
class ModuleDeclarationNode : public StatementNode {
2122
2124
public:
2123
2125
virtual bool analyzeModule (ModuleAnalyzer&) = 0;
2126
+ virtual bool isImportDeclarationNode () const { return false ; }
2127
+ virtual bool hasAttributesList () const { return false ; }
2124
2128
bool hasCompletionValue () const override { return false ; }
2125
2129
bool isModuleDeclarationNode () const override { return true ; }
2126
2130
@@ -2136,6 +2140,9 @@ namespace JSC {
2136
2140
};
2137
2141
ImportDeclarationNode (const JSTokenLocation&, ImportType, ImportSpecifierListNode*, ModuleNameNode*, ImportAttributesListNode*);
2138
2142
2143
+ bool isImportDeclarationNode () const override { return true ; }
2144
+ bool hasAttributesList () const override { return true ; }
2145
+
2139
2146
ImportSpecifierListNode* specifierList () const { return m_specifierList; }
2140
2147
ModuleNameNode* moduleName () const { return m_moduleName; }
2141
2148
ImportAttributesListNode* attributesList () const { return m_attributesList; }
@@ -2154,6 +2161,8 @@ namespace JSC {
2154
2161
public:
2155
2162
ExportAllDeclarationNode (const JSTokenLocation&, ModuleNameNode*, ImportAttributesListNode*);
2156
2163
2164
+ bool hasAttributesList () const override { return true ; }
2165
+
2157
2166
ModuleNameNode* moduleName () const { return m_moduleName; }
2158
2167
ImportAttributesListNode* attributesList () const { return m_attributesList; }
2159
2168
@@ -2222,6 +2231,8 @@ namespace JSC {
2222
2231
public:
2223
2232
ExportNamedDeclarationNode (const JSTokenLocation&, ExportSpecifierListNode*, ModuleNameNode*, ImportAttributesListNode*);
2224
2233
2234
+ bool hasAttributesList () const override { return true ; }
2235
+
2225
2236
ExportSpecifierListNode* specifierList () const { return m_specifierList; }
2226
2237
ModuleNameNode* moduleName () const { return m_moduleName; }
2227
2238
ImportAttributesListNode* attributesList () const { return m_attributesList; }
0 commit comments