///|
test {
let r = @parser.parse_text(
(
#|$version: "2"
#|namespace com.foo
#|
#|string Name
#|
),
)
inspect(r.has_errors(), content="false")
guard r.ast is Some(f) else { fail("no ast") }
inspect(f.shapes()[0].shape.name().value, content="Name")
}Install
Download zipSmithy syntax for MoonBit: lossless IDL parser, traversal, diagnostics and typed JSON AST codec