MCPcopy Create free account
hub / github.com/ControlCplusControlV/Scribe / parse_switch_statement

Function parse_switch_statement

crates/papyrus/src/parser.rs:487–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

485
486 #[test]
487 fn parse_switch_statement() {
488 insta::assert_snapshot!(parse_to_tree(
489 "
490 let x := 5
491 let y := 8
492 switch x
493 case 3 {
494 y := 5
495 }
496 case 5 {
497 y := 12
498 let z := 15
499 }
500 case 8 {
501 y := 15
502 }
503 y"
504 ));
505 }
506
507 //TODO: add test for default
508}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected