[runtime] Better error messages?
(Sometimes.)
This commit is contained in:
parent
0a0f7b3612
commit
063584fb7e
2 changed files with 64 additions and 21 deletions
|
|
@ -298,6 +298,7 @@ fn f() {
|
|||
|
||||
fn g() {}
|
||||
"""
|
||||
# TODO: Error reporting here is wild.
|
||||
tree, errors = runtime.parse(L_PARSE_TABLE, L_LEXER_TABLE, text)
|
||||
assert len(errors) > 0, "We ought to have caught at least one error"
|
||||
assert tree is not None, "Gee we ought to have had *something* from this parse"
|
||||
|
|
@ -359,6 +360,7 @@ fn f() {
|
|||
let y = 2
|
||||
}
|
||||
"""
|
||||
# TODO: Error reporting here is weird.
|
||||
tree, errors = runtime.parse(L_PARSE_TABLE, L_LEXER_TABLE, text)
|
||||
assert len(errors) > 0, "We ought to have caught at least one error"
|
||||
assert tree is not None, "Gee we ought to have had *something* from this parse"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue