Summary
A record declares a named product type with typed fields. Field labels may contain spaces; semantic refs preserve the author spelling (field.unit price).
Syntax
record Cart Item
name: Text
unit price: Int
quantity: IntSemantics
Records are structural types. Other blocks reference them by name (Cart Item, Launch Signals). Property access in expressions uses the same spelling as in source (item.unit price).
Compiler note
Field names with spaces are normalized internally for host interop. Diagnostics and point index always use the semantic spelling from source.
Example
From examples/cart-total.point:
record Cart Item
name: Text
unit price: Int
quantity: IntCommon mistakes
- Referencing a field name that does not exist on the record (diagnostic
unknown-field) - Forgetting that record literals need a known record type in context
Agent diagnostic notes
unknown-fieldandmissing-fieldincludeexpectedfield lists andrepairhints- Use
point://semantic/<Module>/record.<Name>/field.<label>refs frompoint index
