Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parsing

Future

Flat AST storage

Some random idea of representation

type Foo { id: u32 }

lexes as this stream with token length

IDENT(4) IDENT(3) LBRA(1) IDENT(2) COLON(1) IDENT(3) RBRA(1)

which parses as this tree stream (braces are not represented in the stream)

{ NAME { NAME TY } FIELDS_END } ITEM_END