A MoonBit library for handling and manipulating quotations and quoted text
///|
test {
let s = quote(x => x + 1)
inspect(s.path.to_string().contains("README.mbt.md"), content="true")
inspect(s.start, content="{row: 12, column: 11}")
inspect(s.end, content="{row: 12, column: 28}")
let s = current_source_location()
inspect(s.path.to_string().contains("README.mbt.md"), content="true")
inspect(s.start, content="{row: 16, column: 11}")
inspect(s.end, content="{row: 16, column: 36}")
}pub suberror ParseSourceLocationError {
ParseError(String)
}impl Show for ParseSourceLocationErrorimpl ToJson for ParseSourceLocationErrorpub(all) struct Position {
row : Int
column : Int
}impl Show for SourceLocationimpl ToJson for SourceLocation#callsite(autofill(loc))
fn current_source_location(loc~ : SourceLoc) -> SourceLocation raise ParseSourceLocationError#callsite(autofill(loc))
fn[Code] quote(code : Code, loc~ : SourceLoc) -> SourceLocation raise ParseSourceLocationErrorInstall
Download zipA MoonBit library for handling and manipulating quotations and quoted text