================================================================================
Case statement with preprocessor conditional else branch
================================================================================

page 50100 TestPage
{
    procedure TestCase()
    begin
        case RecordType of
            RecordType::Customer:
                ProcessCustomer();
#if not CLEAN25
            else
                ProcessExtension();
#endif
        end;
    end;
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (identifier)
    (procedure
      (procedure_keyword)
      name: (identifier)
      (code_block
        (case_statement
          (case_keyword)
          expression: (identifier)
          (of_keyword)
          (case_branch
            pattern: (qualified_enum_value
              enum_type: (identifier)
              value: (identifier))
            body: (call_expression
              function: (identifier)
              arguments: (argument_list)))
          (preproc_conditional_case
            (preproc_if
              condition: (preproc_not_expression
                (identifier)))
            (case_else_branch
              (else_keyword)
              (call_expression
                function: (identifier)
                arguments: (argument_list)))
            (preproc_endif)))))))

================================================================================
Complex case with multiple branches and preprocessor else
================================================================================

codeunit 50100 TestCodeunit
{
    procedure LookupEntries()
    var
#if not CLEAN25
        SalesLine: Record Microsoft.Sales.Document."Sales Line";
#endif
        IsHandled: Boolean;
    begin
        case TableNo of
            Database::"Item Ledger Entry":
                begin
                    Message('Item');
                end;
            Database::"Customer Ledger Entry":
                Message('Customer');
#if not CLEAN25
            else
                OnLookupExtensionTable(TableNo, SalesLine);
#endif
        end;
    end;
}

--------------------------------------------------------------------------------

(source_file
  (codeunit_declaration
    (codeunit_keyword)
    object_id: (integer)
    object_name: (identifier)
    (procedure
      (procedure_keyword)
      name: (identifier)
      (var_section
        (var_keyword)
        (preproc_conditional_var
          (preproc_if
            condition: (preproc_not_expression
              (identifier)))
          (variable_declaration
            name: (identifier)
            type: (type_specification
              (record_type
                reference: (identifier)
                reference: (identifier)
                reference: (identifier)
                reference: (quoted_identifier))))
          (preproc_endif))
        (variable_declaration
          name: (identifier)
          type: (type_specification
            (basic_type))))
      (code_block
        (case_statement
          (case_keyword)
          expression: (identifier)
          (of_keyword)
          (case_branch
            pattern: (database_reference
              keyword: (object_type_keyword)
              table_name: (quoted_identifier))
            body: (code_block
              (call_expression
                function: (identifier)
                arguments: (argument_list
                  (string_literal)))))
          (case_branch
            pattern: (database_reference
              keyword: (object_type_keyword)
              table_name: (quoted_identifier))
            body: (call_expression
              function: (identifier)
              arguments: (argument_list
                (string_literal))))
          (preproc_conditional_case
            (preproc_if
              condition: (preproc_not_expression
                (identifier)))
            (case_else_branch
              (else_keyword)
              (call_expression
                function: (identifier)
                arguments: (argument_list
                  (identifier)
                  (identifier))))
            (preproc_endif)))))))
