================================================================================
union
================================================================================

library this_is_library;

type Union = union : uint64 {
  1: One int32;
  2: reserved;
  3: reserved bool;
};

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

(source_file
  (library
    (compound_identifier
      (identifier)))
  (declaration
    (layout_declaration
      (identifier)
      (inline_layout
        (layout_kind)
        (layout_subtype
          (type_constructor
            (primitives_type)))
        (layout_body
          (ordinal_layout
            (ordinal_layout_member
              (numeric_literal)
              (member_field
                (identifier)
                (type_constructor
                  (primitives_type))))
            (ordinal_layout_member
              (numeric_literal))
            (ordinal_layout_member
              (numeric_literal)
              (type_constructor
                (primitives_type)))))))))


================================================================================
table
================================================================================

library this_is_library;

type Table = table {
  1: One int32;
};

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

(source_file
  (library
    (compound_identifier
      (identifier)))
  (declaration
    (layout_declaration
      (identifier)
      (inline_layout
        (layout_kind)
        (layout_body
          (ordinal_layout
            (ordinal_layout_member
              (numeric_literal)
              (member_field
                (identifier)
                (type_constructor
                  (primitives_type))))))))))

================================================================================
struct in table
================================================================================

library this_is_library;

type Table = table {
  1: One struct{
    field1 int32;
  };
};

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

(source_file
  (library
    (compound_identifier
      (identifier)))
  (declaration
    (layout_declaration
      (identifier)
      (inline_layout
        (layout_kind)
        (layout_body
          (ordinal_layout
            (ordinal_layout_member
              (numeric_literal)
              (member_field
                (identifier)
                (type_constructor
                  (layout
                    (inline_layout
                      (layout_kind)
                      (layout_body
                        (struct_layout
                          (struct_layout_member
                            (member_field
                              (identifier)
                              (type_constructor
                                (primitives_type)))))))))))))))))

================================================================================
overlay
================================================================================

library this_is_library;

type Table = overlay {
  1: One int32;
};

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

(source_file
  (library
    (compound_identifier
      (identifier)))
  (declaration
    (layout_declaration
      (identifier)
      (inline_layout
        (layout_kind)
        (layout_body
          (ordinal_layout
            (ordinal_layout_member
              (numeric_literal)
              (member_field
                (identifier)
                (type_constructor
                  (primitives_type))))))))))
