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

Function test_expr_functions_nested

core/src/parser.rs:3398–3469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3396
3397 #[test]
3398 fn test_expr_functions_nested() {
3399 use Expr::*;
3400 do_expr_ok_test(
3401 "consecutive(parenthesis())",
3402 Call(CallSpan {
3403 vref: VarRef::new("consecutive", None),
3404 vref_pos: lc(1, 7),
3405 args: vec![ArgSpan {
3406 expr: Some(Call(CallSpan {
3407 vref: VarRef::new("parenthesis", None),
3408 vref_pos: lc(1, 19),
3409 args: vec![],
3410 })),
3411 sep: ArgSep::End,
3412 sep_pos: lc(1, 32),
3413 }],
3414 }),
3415 );
3416 do_expr_ok_test(
3417 "outer?(1, inner1(2, 3), 4, inner2(), 5)",
3418 Call(CallSpan {
3419 vref: VarRef::new("outer", Some(ExprType::Boolean)),
3420 vref_pos: lc(1, 7),
3421 args: vec![
3422 ArgSpan {
3423 expr: Some(expr_integer(1, 1, 14)),
3424 sep: ArgSep::Long,
3425 sep_pos: lc(1, 15),
3426 },
3427 ArgSpan {
3428 expr: Some(Call(CallSpan {
3429 vref: VarRef::new("inner1", None),
3430 vref_pos: lc(1, 17),
3431 args: vec![
3432 ArgSpan {
3433 expr: Some(expr_integer(2, 1, 24)),
3434 sep: ArgSep::Long,
3435 sep_pos: lc(1, 25),
3436 },
3437 ArgSpan {
3438 expr: Some(expr_integer(3, 1, 27)),
3439 sep: ArgSep::End,
3440 sep_pos: lc(1, 28),
3441 },
3442 ],
3443 })),
3444 sep: ArgSep::Long,
3445 sep_pos: lc(1, 29),
3446 },
3447 ArgSpan {
3448 expr: Some(expr_integer(4, 1, 31)),
3449 sep: ArgSep::Long,
3450 sep_pos: lc(1, 32),
3451 },
3452 ArgSpan {
3453 expr: Some(Call(CallSpan {
3454 vref: VarRef::new("inner2", None),
3455 vref_pos: lc(1, 34),

Callers

nothing calls this directly

Calls 2

do_expr_ok_testFunction · 0.85
lcFunction · 0.85

Tested by

no test coverage detected