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({
|
||||
nodes(
|
||||
[Source],
|
||||
[AST],
|
||||
[Graph IR],
|
||||
[Runtime],
|
||||
)
|
||||
|
|
|
@ -25,9 +25,14 @@
|
|||
clusters.insert(1, "\u{FEFF}")
|
||||
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 = (
|
||||
"source",
|
||||
"ast",
|
||||
"abstract syntax tree",
|
||||
"Abstract Syntax Tree",
|
||||
"graph IR",
|
||||
"runtime",
|
||||
|
||||
|
@ -86,7 +91,15 @@
|
|||
|
||||
#graphics.stages-overview
|
||||
|
||||
== Source
|
||||
== Source <source>
|
||||
|
||||
```iowo
|
||||
open base.png >|
|
||||
open stencil.png >|
|
||||
mask
|
||||
|> (invert | show)
|
||||
|> show
|
||||
```
|
||||
|
||||
Functional and pipeline-based.
|
||||
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.
|
||||
- In effect, they are automatically flattened.
|
||||
|
||||
== Abstract Syntax Tree
|
||||
|
||||
Essentially just the source lexed and parsed.
|
||||
|
||||
== Graph IR
|
||||
|
||||
=== Optimizer
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
)
|
||||
show raw.where(block: false): box.with(
|
||||
fill: luma(95%),
|
||||
outset: 0.25em,
|
||||
outset: (y: 0.25em),
|
||||
inset: (x: 0.15em),
|
||||
radius: 0.25em,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue