aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-12-22 19:22:00 -0700
committerMelody Horn <melody@boringcactus.com>2020-12-22 19:22:00 -0700
commitea5e1204a493ccfa400c87134cba6262137ccbe2 (patch)
tree6323c167b3c46031290f6fdec9c1ca862f638a1f
parent3acb75147668942c535fb34c6335a18c2ca7c5c9 (diff)
downloadspec-ea5e1204a493ccfa400c87134cba6262137ccbe2.tar.gz
spec-ea5e1204a493ccfa400c87134cba6262137ccbe2.zip
half-assedly define structs
-rw-r--r--language/type-definition.rst3
1 files changed, 2 insertions, 1 deletions
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 ';'