package wax-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b
doc/wax-lib.wasm/Wax_wasm/Lexer/index.html
Module Wax_wasm.LexerSource
Lexer for Wasm Text Format (WAT).
val token :
Wax_utils.Trivia.context ->
(Sedlexing.lexbuf -> Tokens.token) * Lexing.position option reftoken ctx returns the tokenizer closure and a start_override ref. After each call to the closure the ref holds Some p when the token just returned should start at p rather than at the lexbuf's reported start — used for the compound openers ((param, (then, …), whose ( is lexed before the keyword. The supplier (see Wax_utils.Parsing) consults it.
Every keyword and instruction mnemonic this lexer recognizes (the keyword table's keys — the atomic and vector registries included), sorted. This is the ground truth the fuzz harness's generated opcode grid derives its operation list from (fuzz/op-width.sh, via the dump_mnemonics developer executable), so a new proposal's mnemonics enter that grid — or its acknowledged-exemption ratchet — the moment the lexer learns them, rather than waiting for a hand-maintained list to be updated.