Skip to content

Commit e3cb81e

Browse files
committed
added docstrings for quoteof() and tile()
1 parent 920c610 commit e3cb81e

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

doc/src/api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
```@docs
44
PrettyPrinting.pprint
55
PrettyPrinting.pprintln
6+
PrettyPrinting.quoteof
7+
PrettyPrinting.tile
68
```

doc/src/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ implementing function `tile()`, which should map an object to the corresponding
281281
layout expression.
282282

283283
Continuing with the type `Node` defined in section [Extending
284-
PrettyPrinting](#Extending-PrettyPrinting), let us give it a custom layout
285-
generated with `list_layout()`.
284+
PrettyPrinting](@ref), let us give it a custom layout generated with
285+
`list_layout()`.
286286

287287
import PrettyPrinting: tile
288288

src/PrettyPrinting.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,24 @@ function pprintln(io::IO, data)
5353
println(io)
5454
end
5555

56+
"""
57+
quoteof(obj)
58+
59+
Convert an object to its representation in Julia AST.
60+
61+
Implement this method to customize [`pprint`](@ref) on a user-defined type.
62+
"""
63+
function quoteof
64+
end
65+
66+
"""
67+
tile(obj)
68+
69+
Convert an object to the corresponding layout expression.
70+
71+
Implement this method to customize [`pprint`](@ref) on a user-defined type.
72+
"""
73+
function tile
74+
end
75+
5676
end

0 commit comments

Comments
 (0)