From ea5e1204a493ccfa400c87134cba6262137ccbe2 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 22 Dec 2020 19:22:00 -0700 Subject: half-assedly define structs --- language/type-definition.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/language/type-definition.rst b/language/type-definition.rst index 04cc858..9940e3b 100644 --- a/language/type-definition.rst +++ b/language/type-definition.rst @@ -17,10 +17,11 @@ Defining Types NormalStructDefinition <- 'struct' identifier '{' VariableDeclaration+ '}' A ``struct`` defines a composite type with several members. + Its members are stored in the order in which they are defined, and they each take up the space they normally would. .. todo:: - define struct layout in memory + figure out alignment & padding .. crowbar:element:: OpaqueStructDefinition <- 'opaque' 'struct' identifier ';' -- cgit v1.2.3