Skip to main content

Module record_declaration

Module record_declaration 

Source
Expand description

Record (struct) declaration parser (record).

Handles record type declarations in the form:

record Name {
    int field_a,
    string field_b,
}

Field types are parsed via Parser::parse_param_type, so any type usable in a function parameter (including other record names) may be used as a field type. A trailing comma after the last field is allowed.