Skip to content

Commit d73dbd4

Browse files
authored
Add a Macros chapter (#137)
Pitch thread: https://forums.swift.org/t/64339 Fixes: rdar://107494884
2 parents d0bae5b + 499ede7 commit d73dbd4

21 files changed

+976
-187
lines changed

Style.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ which means it’s not always suitable for generating a parser for Swift code.
9898

9999
# Terms and Rules
100100

101+
## attribute names
102+
103+
In the guide, write `@` before attribute names;
104+
in the reference, omit it.
105+
101106
## back deploy
102107

103108
Spelled as two words, not closed up or hyphenated.
@@ -122,6 +127,13 @@ you should generally try to avoid them.
122127
Deeply nested headings often indicate
123128
that there’s a better way to organize the content.
124129

130+
## macro names
131+
132+
In the guide,
133+
write `@` before the name when referring to attached macros
134+
and `#` before the name when referring to freestanding macros.
135+
In the reference, omit it.
136+
125137
## memberwise initializer
126138

127139
Not hyphenated as “member-wise”.
20.6 KB
Loading
20.4 KB
Loading
37.6 KB
Loading
37.4 KB
Loading
6.12 KB
Loading
6.02 KB
Loading
21 KB
Loading
20.8 KB
Loading
42.4 KB
Loading

0 commit comments

Comments
 (0)