2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
9 #include "StatementListVisitor.h"
11 void StatementListVisitor::Visit(StatementList
* list
)
13 if (list
== NULL
) return;
15 const int32 n
= list
->Size();
16 for (int32 i
= 0; i
< n
; i
++) {
17 Statement
* statement
= list
->StatementAt(i
);
18 GroupStatement
group(statement
);
19 if (group
.IsOpenGroup()) {
22 } else if (statement
->IsValueStatement()) {
24 } else if (statement
->IsDefaultStatement()) {
26 } else if (statement
->IsQueryStatement()) {
28 } else if (statement
->IsParamStatement()) {
32 StatementList
* children
= statement
->GetChildren();
33 if (children
!= NULL
) {
37 // Close statements have been removed
38 if (group
.IsOpenGroup()) {