docs(design): add larger source example
This commit is contained in:
parent
92fe4c51a3
commit
a93c16da5c
3 changed files with 22 additions and 3 deletions
|
@ -66,6 +66,7 @@
|
||||||
#let stages-overview = canvas({
|
#let stages-overview = canvas({
|
||||||
nodes(
|
nodes(
|
||||||
[Source],
|
[Source],
|
||||||
|
[AST],
|
||||||
[Graph IR],
|
[Graph IR],
|
||||||
[Runtime],
|
[Runtime],
|
||||||
)
|
)
|
||||||
|
|
|
@ -25,9 +25,14 @@
|
||||||
clusters.insert(1, "\u{FEFF}")
|
clusters.insert(1, "\u{FEFF}")
|
||||||
clusters.join()
|
clusters.join()
|
||||||
}
|
}
|
||||||
// TODO: could make this just look over headings in section "Execution stages" tbh
|
// even though it looks like this could be automated with a `query`,
|
||||||
|
// this'd require wrapping the whole document in a show rule
|
||||||
|
// at which point `query` doesn't find anything anymore
|
||||||
#let terms = (
|
#let terms = (
|
||||||
"source",
|
"source",
|
||||||
|
"ast",
|
||||||
|
"abstract syntax tree",
|
||||||
|
"Abstract Syntax Tree",
|
||||||
"graph IR",
|
"graph IR",
|
||||||
"runtime",
|
"runtime",
|
||||||
|
|
||||||
|
@ -86,7 +91,15 @@
|
||||||
|
|
||||||
#graphics.stages-overview
|
#graphics.stages-overview
|
||||||
|
|
||||||
== Source
|
== Source <source>
|
||||||
|
|
||||||
|
```iowo
|
||||||
|
open base.png >|
|
||||||
|
open stencil.png >|
|
||||||
|
mask
|
||||||
|
|> (invert | show)
|
||||||
|
|> show
|
||||||
|
```
|
||||||
|
|
||||||
Functional and pipeline-based.
|
Functional and pipeline-based.
|
||||||
However, in contrast to classic shell commands,
|
However, in contrast to classic shell commands,
|
||||||
|
@ -180,6 +193,10 @@ Done with any of `--` or `//`.
|
||||||
- Outputs of streamers are spliced into the contained list.
|
- Outputs of streamers are spliced into the contained list.
|
||||||
- In effect, they are automatically flattened.
|
- In effect, they are automatically flattened.
|
||||||
|
|
||||||
|
== Abstract Syntax Tree
|
||||||
|
|
||||||
|
Essentially just the source lexed and parsed.
|
||||||
|
|
||||||
== Graph IR
|
== Graph IR
|
||||||
|
|
||||||
=== Optimizer
|
=== Optimizer
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
)
|
)
|
||||||
show raw.where(block: false): box.with(
|
show raw.where(block: false): box.with(
|
||||||
fill: luma(95%),
|
fill: luma(95%),
|
||||||
outset: 0.25em,
|
outset: (y: 0.25em),
|
||||||
|
inset: (x: 0.15em),
|
||||||
radius: 0.25em,
|
radius: 0.25em,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue