Skip to content

Commit 6985788

Browse files
doc: add @ to help (#33824)
Co-authored-by: jaideep-seth <jaideepnseth@gmail.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent bb5b98e commit 6985788

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

base/docs/basedocs.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,18 @@ For other purposes, `:( ... )` and `quote .. end` blocks are treated identically
452452
"""
453453
kw"quote"
454454

455+
"""
456+
@
457+
458+
The at sign followed by a macro name marks a macro call. Macros provide the
459+
ability to include generated code in the final body of a program. A macro maps
460+
a tuple of arguments, expressed as space-separated expressions or a
461+
function-call-like argument list, to a returned *expression*. The resulting
462+
expression is compiled directly into the surrounding code. See
463+
[Metaprogramming](@ref man-macros) for more details and examples.
464+
"""
465+
kw"@"
466+
455467
"""
456468
{}
457469

doc/src/base/punctuation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
Extended documentation for mathematical symbols & functions is [here](@ref math-ops).
44

5-
| symbol | meaning |
6-
|:----------- |:----------------------------------------------------------------------------------------------------------------------------------------------- |
7-
| `@m` | the at-symbol invokes [macro](@ref man-macros) `m`; followed by space-separated expressions or a function-call-like argument list |
5+
| symbol | meaning |
6+
|:----------- |:--------------------------------------------------------------------------------------------|
7+
| `@` | the at-sign marks a [macro](@ref man-macros) invocation; optionally followed by an argument list |
88
| [`!`](@ref) | an exclamation mark is a prefix operator for logical negation ("not") |
99
| `a!` | function names that end with an exclamation mark modify one or more of their arguments by convention |
1010
| `#` | the number sign (or hash or pound) character begins single line comments |
11-
| `#=` | when followed by an equals sign, it begins a multi-line comment (these are nestable) |
11+
| `#=` | when followed by an equals sign, it begins a multi-line comment (these are nestable) |
1212
| `=#` | end a multi-line comment by immediately preceding the number sign with an equals sign |
1313
| `$` | the dollar sign is used for [string](@ref string-interpolation) and [expression](@ref man-expression-interpolation) interpolation |
1414
| [`%`](@ref rem) | the percent symbol is the remainder operator |
15-
| [`^`](@ref) | the caret is the exponentiation operator |
15+
| [`^`](@ref) | the caret is the exponentiation operator |
1616
| [`&`](@ref) | single ampersand is bitwise and |
1717
| [`&&`](@ref)| double ampersands is short-circuiting boolean and |
1818
| [`\|`](@ref)| single pipe character is bitwise or |
@@ -31,7 +31,7 @@ Extended documentation for mathematical symbols & functions is [here](@ref math-
3131
| `[,]` | [vector literal constructor](@ref man-array-literals) (calling [`vect`](@ref Base.vect)) |
3232
| `[;]` | [vertical concatenation](@ref man-array-concatenation) (calling [`vcat`](@ref) or [`hvcat`](@ref)) |
3333
| `[   ]` | with space-separated expressions, [horizontal concatenation](@ref man-concatenation) (calling [`hcat`](@ref) or [`hvcat`](@ref)) |
34-
| `T{ }` | curly braces following a type list that type's [parameters](@ref Parametric-Types) |
34+
| `T{ }` | curly braces following a type list that type's [parameters](@ref Parametric-Types) |
3535
| `{}` | curly braces can also be used to group multiple [`where`](@ref) expressions in function declarations |
3636
| `;` | semicolons separate statements, begin a list of keyword arguments in function declarations or calls, or are used to separate array literals for vertical concatenation |
3737
| `,` | commas separate function arguments or tuple or array components |
@@ -55,6 +55,6 @@ Extended documentation for mathematical symbols & functions is [here](@ref math-
5555
| [`==`](@ref)| double equals sign is value equality comparison |
5656
| [`===`](@ref) | triple equals sign is programmatically identical equality comparison |
5757
| [`=>`](@ref Pair) | right arrow using an equals sign defines a [`Pair`](@ref) typically used to populate [dictionaries](@ref Dictionaries) |
58-
| `->` | right arrow using a hyphen defines an [anonymous function](@ref man-anonymous-functions) on a single line |
59-
| `|>` | pipe operator passes output from the left argument to input of the right argument, usually a [function](@ref Function-composition-and-piping) |
60-
| `` | function composition operator (typed with \circ{tab}) combines two functions as though they are a single larger [function](@ref Function-composition-and-piping) |
58+
| `->` | right arrow using a hyphen defines an [anonymous function](@ref man-anonymous-functions) on a single line |
59+
| `|>` | pipe operator passes output from the left argument to input of the right argument, usually a [function](@ref Function-composition-and-piping) |
60+
| `` | function composition operator (typed with \circ{tab}) combines two functions as though they are a single larger [function](@ref Function-composition-and-piping) |

doc/src/manual/metaprogramming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ julia> eval(ex)
466466

467467
## [Macros](@id man-macros)
468468

469-
Macros provide a method to include generated code in the final body of a program. A macro maps
469+
Macros provide a mechanism to include generated code in the final body of a program. A macro maps
470470
a tuple of arguments to a returned *expression*, and the resulting expression is compiled directly
471471
rather than requiring a runtime [`eval`](@ref) call. Macro arguments may include expressions,
472472
literal values, and symbols.

0 commit comments

Comments
 (0)