(boolean allowDeclareSection)
| 3632 | } |
| 3633 | |
| 3634 | private final Block parseBlock(boolean allowDeclareSection) { |
| 3635 | LanguageContext previous = languageContext; |
| 3636 | |
| 3637 | try { |
| 3638 | if (languageContext == LanguageContext.QUERY) |
| 3639 | languageContext = LanguageContext.BLOCK; |
| 3640 | |
| 3641 | List<Statement> statements = new ArrayList<>(); |
| 3642 | |
| 3643 | |
| 3644 | |
| 3645 | |
| 3646 | |
| 3647 | if (allowDeclareSection && parseProKeywordIf("DECLARE")) |
| 3648 | |
| 3649 | |
| 3650 | |
| 3651 | ; |
| 3652 | else |
| 3653 | parseKeywordIf("EXECUTE BLOCK AS"); |
| 3654 | |
| 3655 | parseKeyword("BEGIN"); |
| 3656 | parseKeywordIf("ATOMIC", "NOT ATOMIC"); |
| 3657 | statements.addAll(parseStatementsAndPeek("END")); |
| 3658 | parseKeyword("END"); |
| 3659 | |
| 3660 | |
| 3661 | |
| 3662 | parseIf(';'); |
| 3663 | |
| 3664 | |
| 3665 | |
| 3666 | |
| 3667 | |
| 3668 | return dsl.begin(statements); |
| 3669 | } |
| 3670 | finally { |
| 3671 | languageContext = previous; |
| 3672 | } |
| 3673 | } |
| 3674 | |
| 3675 | private final void parseSemicolonAfterNonBlocks(Statement result) { |
| 3676 | if (!(result instanceof Block)) |
no test coverage detected