MCPcopy Create free account
hub / github.com/Glyphack/enderpy / parse_call

Function parse_call

parser/src/parser/parser.rs:3730–3753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3728
3729 #[test]
3730 fn parse_call() {
3731 for test_case in &[
3732 "a()",
3733 "a(b)",
3734 "a(b, c)",
3735 "func(b=c)",
3736 "func(a, b=c, d=e)",
3737 "func(a, b=c, d=e, *f)",
3738 "func(a, b=c, d=e, *f, **g)",
3739 "func(a,)",
3740 "eval(' '.join(map(chr, [105, 110, 116])))",
3741 ] {
3742 let mut parser = Parser::new(test_case);
3743 let program = parser.parse().expect("parsing failed");
3744
3745 insta::with_settings!({
3746 description => test_case.to_string(), // the template source code
3747 snapshot_path => "../../test_data/output/",
3748 omit_expression => true // do not include the default expression
3749 }, {
3750 assert_debug_snapshot!(program);
3751 });
3752 }
3753 }
3754
3755 #[test]
3756 fn test_lambda() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected