11# Defining macros
22
3- A macro is defined using a ` macro ` clause within a [ module] ( ../modules.md ) 's [ ` macro_table ` clause] ( ../modules.md#macro_table ) .
3+ A macro is defined using a ` macro ` clause within a [ module] ( ../modules.md ) 's [ ` macros ` clause] ( ../modules.md#macros ) .
44
55## Syntax
66``` ion
@@ -204,7 +204,7 @@ When they are invoked, they expand to a stream of a single value: the Ion scalar
204204``` ion
205205$ion::
206206(module _
207- (macro_table
207+ (macros
208208 (macro greeting () "hello")
209209 (macro birthday () 1996-10-11)
210210 // Annotations are also literal
@@ -262,7 +262,7 @@ expression-group ::= '(..' expression* ')'
262262``` ion
263263$ion::
264264(module _
265- (macro_table
265+ (macros
266266 // Calls the system macro `values`, allowing it to produce a stream of three values.
267267 (macro nephews () (.values Huey Dewey Louie))
268268
@@ -283,7 +283,7 @@ $ion::
283283> ``` ion
284284> $ion::
285285> (module _
286- > (macro_table
286+ > (macros
287287> (macro list_of_nephews () [(.nephews)])
288288> // ^^^^^^^^
289289> // ERROR: Calls a macro that has not yet been defined in this module.
@@ -311,7 +311,7 @@ variable-name ::= ion-identifier
311311``` ion
312312$ion::
313313(module _
314- (macro_table
314+ (macros
315315 // Produces a stream that repeats the content of parameter `x` twice.
316316 (macro twice (x*) (.values (%x) (%x)))
317317 )
@@ -342,7 +342,7 @@ If the expansion was empty, no values are spliced into the container.
342342``` ion
343343$ion::
344344(module _
345- (macro_table
345+ (macros
346346 (macro bookend_list (x y*) [(%x), (%y), (%x)])
347347 (macro bookend_sexp (x y*) ((%x) (%y) (%x)))
348348 )
@@ -366,7 +366,7 @@ If the expansion was empty, no fields are spliced into the parent struct.
366366``` ion
367367$ion::
368368(module _
369- (macro_table
369+ (macros
370370 (macro resident (id names*)
371371 {
372372 town: "Riverside",
0 commit comments