Wax_wasm.LexerSourceLexer 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.