UserParserDef
User-facing parser definition: every field optional; type may be a plain string.
Properties
Section titled “Properties”examples?
Section titled “examples?”
optionalexamples?:unknown[] | ((props,ctx) =>unknown[])
Sample values for the version matrix’s parser probe.
optionaltype?:string| ((props,ctx) =>string)
The TypeScript type in generated signatures (re-run mspacker gen after changing it).
Methods
Section titled “Methods”macro()?
Section titled “macro()?”
optionalmacro(text,props,ctx):string
How a macro argument (text is $(name)) is written; as-is when missing.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
serialize()?
Section titled “serialize()?”
optionalserialize(value,props,ctx):string
The command text for a value.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”string
test()?
Section titled “test()?”
optionaltest(value,props,ctx):boolean
Whether a value fits this argument.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean