///|
test {
let s = @scanner.tokenize_text("string Foo\n")
let st = @cst.StatementCst::new(
kind=Shape(Simple(String)),
name=Some("Foo"),
tokens=s.tokens,
)
inspect(@cst.IdlCst::new(s, [st]).to_source(), content="string Foo\n")
}fn StatementCst::new(kind~ : StatementKind, name~ : String?, tokens~ : ArrayView[Token]) -> StatementCstimpl Show for StatementKindInstall
Download zipSmithy IDL syntax for MoonBit: lossless scanner, typed AST, CST, parser and diagnostics
Dependencies