18 lines
542 B
Plaintext
18 lines
542 B
Plaintext
|
|
// tools/hako_parser/parser_core.hako — HakoParserCoreBox (MVP skeleton)
|
||
|
|
using selfhost.shared.common.string_helpers as Str
|
||
|
|
using selfhost.tools.hako_parser.tokenizer as HakoTokenizerBox
|
||
|
|
|
||
|
|
static box HakoParserCoreBox {
|
||
|
|
parse(text) {
|
||
|
|
local toks = HakoTokenizerBox.tokenize(text)
|
||
|
|
// TODO: implement real parser; MVP returns a minimal AST map
|
||
|
|
local ast = new MapBox()
|
||
|
|
ast.set("boxes", new ArrayBox())
|
||
|
|
ast.set("uses", new ArrayBox())
|
||
|
|
return ast
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static box HakoParserCoreMain { method main(args) { return 0 } }
|
||
|
|
|