Skip to content

Commit 6e29361

Browse files
committed
Document usage of the Kind tag byte
1 parent 2330aaa commit 6e29361

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/syntax.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ Defined groups are:
3737
- `"#+"` (elements that start with `#+...`)
3838
3939
See also: `K""`, `isbegin`, `isend`, `tag`, `plain`.
40+
41+
# Extended help
42+
43+
The `tag` byte were specifically motivated by headings and items, but are
44+
available for all kinds and so have been employed for a wide range of purposes
45+
whenever there is some sort of useful information that can be stored.
46+
47+
These syntax types use the `tag` byte like so:
48+
- `heading`: the level of the heading
49+
- `block`: a small hash of the block name
50+
- `dynamic_block`: a small hash of the block name
51+
- `keyword`: a small hash of the keyword
52+
- `item`: the indentation level of the item
53+
- `planning`: three bits are used to indicate exitance of each kind of planning.
54+
- `entity`: a small hash of the entity name
55+
- `export_snippet`: a small hash of the snippet format
56+
- `footnote_reference`: the type of footnote reference
57+
- `1` is a label-only reference
58+
- `2` is a definition-only reference
59+
- `3` is a label and definition reference
4060
"""
4161
primitive type Kind 64 end
4262
# 53 kinds + 1 special + 2 flags + 8-bit tag = 64 bits

0 commit comments

Comments
 (0)