package wax-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wax_wasm.LexerSource

Lexer for Wasm Text Format (WAT).

token 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.

Sourceval is_valid_identifier : string -> bool
Sourceval keywords : unit -> string list

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.