MCPcopy Index your code
hub / github.com/endbasic/endbasic / do_expr_error_test

Function do_expr_error_test

core/src/parser.rs:2983–2985  ·  view source on GitHub ↗

Wrapper around `do_error_test` to parse an expression. Given that expressions alone are not valid statements, we have to put them in a statement to parse them. In doing so, we can also put an extra statement after them to ensure we detect their end properly.

(input: &str, msg: &str)

Source from the content-addressed store, hash-verified

2981 /// valid statements, we have to put them in a statement to parse them. In doing so, we can
2982 /// also put an extra statement after them to ensure we detect their end properly.
2983 fn do_expr_error_test(input: &str, msg: &str) {
2984 do_error_test(&format!("PRINT {}, 1", input), msg)
2985 }
2986
2987 #[test]
2988 fn test_expr_literals() {

Callers 2

test_expr_errorsFunction · 0.85

Calls 1

do_error_testFunction · 0.85

Tested by 2

test_expr_errorsFunction · 0.68