···
526
526
}
527
527
}
528
528
529
529
-
Some((start, Token::Todo, mut end)) => {
529
529
+
Some((start, Token::Todo, end)) => {
530
530
self.advance();
531
531
-
let mut message = None;
532
532
-
if self.maybe_one(&Token::As).is_some() {
533
533
-
let msg_expr = self.expect_expression_unit(ExpressionUnitContext::Other)?;
534
534
-
end = msg_expr.location().end;
535
535
-
message = Some(Box::new(msg_expr));
536
536
-
}
531
531
+
let message = self.maybe_parse_as_message()?;
532
532
+
let end = message.as_ref().map_or(end, |m| m.location().end);
537
533
UntypedExpr::Todo {
538
534
location: SrcSpan { start, end },
539
535
kind: TodoKind::Keyword,
···
541
537
}
542
538
}
543
539
544
544
-
Some((start, Token::Panic, mut end)) => {
540
540
+
Some((start, Token::Panic, end)) => {
545
541
self.advance();
546
546
-
let mut label = None;
547
547
-
if self.maybe_one(&Token::As).is_some() {
548
548
-
let msg_expr = self.expect_expression_unit(ExpressionUnitContext::Other)?;
549
549
-
end = msg_expr.location().end;
550
550
-
label = Some(Box::new(msg_expr));
551
551
-
}
542
542
+
let message = self.maybe_parse_as_message()?;
543
543
+
let end = message.as_ref().map_or(end, |m| m.location().end);
552
544
UntypedExpr::Panic {
553
545
location: SrcSpan { start, end },
554
554
-
message: label,
546
546
+
message,
555
547
}
556
548
}
557
549
···
560
552
if context == ExpressionUnitContext::FollowingPipe {
561
553
// If an echo is used as a step in a pipeline (`|> echo`)
562
554
// then it cannot be followed by an expression.
555
555
+
let message = self.maybe_parse_as_message()?;
556
556
+
let end = message.as_ref().map_or(end, |m| m.location().end);
563
557
UntypedExpr::Echo {
564
558
location: SrcSpan { start, end },
565
559
expression: None,
566
566
-
message: todo!(),
560
560
+
message,
567
561
}
568
562
} else {
569
563
// Otherwise it must be followed by an expression.
···
574
568
// tolerant like everything else.
575
569
let expression = self.parse_expression()?;
576
570
let end = expression.as_ref().map_or(end, |e| e.location().end);
571
571
+
572
572
+
let message = self.maybe_parse_as_message()?;
573
573
+
let end = message.as_ref().map_or(end, |m| m.location().end);
574
574
+
577
575
UntypedExpr::Echo {
578
576
location: SrcSpan { start, end },
579
577
expression: expression.map(Box::new),
580
580
-
message: todo!(),
578
578
+
message,
581
579
}
582
580
}
583
581
}
···
1032
1030
pattern,
1033
1031
annotation,
1034
1032
}))
1033
1033
+
}
1034
1034
+
1035
1035
+
fn maybe_parse_as_message(&mut self) -> Result<Option<Box<UntypedExpr>>, ParseError> {
1036
1036
+
let message = if self.maybe_one(&Token::As).is_some() {
1037
1037
+
let expression = self.expect_expression_unit(ExpressionUnitContext::Other)?;
1038
1038
+
Some(Box::new(expression))
1039
1039
+
} else {
1040
1040
+
None
1041
1041
+
};
1042
1042
+
1043
1043
+
Ok(message)
1035
1044
}
1036
1045
1037
1046
// An assignment, with `Let` already consumed
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: assert 1 == echo 2 as this_belongs_to_echo
4
4
+
---
5
5
+
[
6
6
+
Assert(
7
7
+
Assert {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 42,
11
11
+
},
12
12
+
value: BinOp {
13
13
+
location: SrcSpan {
14
14
+
start: 7,
15
15
+
end: 42,
16
16
+
},
17
17
+
name: Eq,
18
18
+
name_location: SrcSpan {
19
19
+
start: 9,
20
20
+
end: 11,
21
21
+
},
22
22
+
left: Int {
23
23
+
location: SrcSpan {
24
24
+
start: 7,
25
25
+
end: 8,
26
26
+
},
27
27
+
value: "1",
28
28
+
int_value: 1,
29
29
+
},
30
30
+
right: Echo {
31
31
+
location: SrcSpan {
32
32
+
start: 12,
33
33
+
end: 42,
34
34
+
},
35
35
+
expression: Some(
36
36
+
Int {
37
37
+
location: SrcSpan {
38
38
+
start: 17,
39
39
+
end: 18,
40
40
+
},
41
41
+
value: "2",
42
42
+
int_value: 2,
43
43
+
},
44
44
+
),
45
45
+
message: Some(
46
46
+
Var {
47
47
+
location: SrcSpan {
48
48
+
start: 22,
49
49
+
end: 42,
50
50
+
},
51
51
+
name: "this_belongs_to_echo",
52
52
+
},
53
53
+
),
54
54
+
},
55
55
+
},
56
56
+
message: None,
57
57
+
},
58
58
+
),
59
59
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: assert echo True as this_belongs_to_echo
4
4
+
---
5
5
+
[
6
6
+
Assert(
7
7
+
Assert {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 40,
11
11
+
},
12
12
+
value: Echo {
13
13
+
location: SrcSpan {
14
14
+
start: 7,
15
15
+
end: 40,
16
16
+
},
17
17
+
expression: Some(
18
18
+
Var {
19
19
+
location: SrcSpan {
20
20
+
start: 12,
21
21
+
end: 16,
22
22
+
},
23
23
+
name: "True",
24
24
+
},
25
25
+
),
26
26
+
message: Some(
27
27
+
Var {
28
28
+
location: SrcSpan {
29
29
+
start: 20,
30
30
+
end: 40,
31
31
+
},
32
32
+
name: "this_belongs_to_echo",
33
33
+
},
34
34
+
),
35
35
+
},
36
36
+
message: None,
37
37
+
},
38
38
+
),
39
39
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: assert 1 == echo 2 as this_belongs_to_echo as this_belongs_to_assert
4
4
+
---
5
5
+
[
6
6
+
Assert(
7
7
+
Assert {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 68,
11
11
+
},
12
12
+
value: BinOp {
13
13
+
location: SrcSpan {
14
14
+
start: 7,
15
15
+
end: 42,
16
16
+
},
17
17
+
name: Eq,
18
18
+
name_location: SrcSpan {
19
19
+
start: 9,
20
20
+
end: 11,
21
21
+
},
22
22
+
left: Int {
23
23
+
location: SrcSpan {
24
24
+
start: 7,
25
25
+
end: 8,
26
26
+
},
27
27
+
value: "1",
28
28
+
int_value: 1,
29
29
+
},
30
30
+
right: Echo {
31
31
+
location: SrcSpan {
32
32
+
start: 12,
33
33
+
end: 42,
34
34
+
},
35
35
+
expression: Some(
36
36
+
Int {
37
37
+
location: SrcSpan {
38
38
+
start: 17,
39
39
+
end: 18,
40
40
+
},
41
41
+
value: "2",
42
42
+
int_value: 2,
43
43
+
},
44
44
+
),
45
45
+
message: Some(
46
46
+
Var {
47
47
+
location: SrcSpan {
48
48
+
start: 22,
49
49
+
end: 42,
50
50
+
},
51
51
+
name: "this_belongs_to_echo",
52
52
+
},
53
53
+
),
54
54
+
},
55
55
+
},
56
56
+
message: Some(
57
57
+
Var {
58
58
+
location: SrcSpan {
59
59
+
start: 46,
60
60
+
end: 68,
61
61
+
},
62
62
+
name: "this_belongs_to_assert",
63
63
+
},
64
64
+
),
65
65
+
},
66
66
+
),
67
67
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: assert echo True as this_belongs_to_echo as this_belongs_to_assert
4
4
+
---
5
5
+
[
6
6
+
Assert(
7
7
+
Assert {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 66,
11
11
+
},
12
12
+
value: Echo {
13
13
+
location: SrcSpan {
14
14
+
start: 7,
15
15
+
end: 40,
16
16
+
},
17
17
+
expression: Some(
18
18
+
Var {
19
19
+
location: SrcSpan {
20
20
+
start: 12,
21
21
+
end: 16,
22
22
+
},
23
23
+
name: "True",
24
24
+
},
25
25
+
),
26
26
+
message: Some(
27
27
+
Var {
28
28
+
location: SrcSpan {
29
29
+
start: 20,
30
30
+
end: 40,
31
31
+
},
32
32
+
name: "this_belongs_to_echo",
33
33
+
},
34
34
+
),
35
35
+
},
36
36
+
message: Some(
37
37
+
Var {
38
38
+
location: SrcSpan {
39
39
+
start: 44,
40
40
+
end: 66,
41
41
+
},
42
42
+
name: "this_belongs_to_assert",
43
43
+
},
44
44
+
),
45
45
+
},
46
46
+
),
47
47
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: assert echo 1 == 2 as this_belongs_to_echo as this_belongs_to_assert
4
4
+
---
5
5
+
[
6
6
+
Assert(
7
7
+
Assert {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 68,
11
11
+
},
12
12
+
value: Echo {
13
13
+
location: SrcSpan {
14
14
+
start: 7,
15
15
+
end: 42,
16
16
+
},
17
17
+
expression: Some(
18
18
+
BinOp {
19
19
+
location: SrcSpan {
20
20
+
start: 12,
21
21
+
end: 18,
22
22
+
},
23
23
+
name: Eq,
24
24
+
name_location: SrcSpan {
25
25
+
start: 14,
26
26
+
end: 16,
27
27
+
},
28
28
+
left: Int {
29
29
+
location: SrcSpan {
30
30
+
start: 12,
31
31
+
end: 13,
32
32
+
},
33
33
+
value: "1",
34
34
+
int_value: 1,
35
35
+
},
36
36
+
right: Int {
37
37
+
location: SrcSpan {
38
38
+
start: 17,
39
39
+
end: 18,
40
40
+
},
41
41
+
value: "2",
42
42
+
int_value: 2,
43
43
+
},
44
44
+
},
45
45
+
),
46
46
+
message: Some(
47
47
+
Var {
48
48
+
location: SrcSpan {
49
49
+
start: 22,
50
50
+
end: 42,
51
51
+
},
52
52
+
name: "this_belongs_to_echo",
53
53
+
},
54
54
+
),
55
55
+
},
56
56
+
message: Some(
57
57
+
Var {
58
58
+
location: SrcSpan {
59
59
+
start: 46,
60
60
+
end: 68,
61
61
+
},
62
62
+
name: "this_belongs_to_assert",
63
63
+
},
64
64
+
),
65
65
+
},
66
66
+
),
67
67
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: "echo wibble as { this <> complex }"
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 34,
11
11
+
},
12
12
+
expression: Some(
13
13
+
Var {
14
14
+
location: SrcSpan {
15
15
+
start: 5,
16
16
+
end: 11,
17
17
+
},
18
18
+
name: "wibble",
19
19
+
},
20
20
+
),
21
21
+
message: Some(
22
22
+
Block {
23
23
+
location: SrcSpan {
24
24
+
start: 15,
25
25
+
end: 34,
26
26
+
},
27
27
+
statements: [
28
28
+
Expression(
29
29
+
BinOp {
30
30
+
location: SrcSpan {
31
31
+
start: 17,
32
32
+
end: 32,
33
33
+
},
34
34
+
name: Concatenate,
35
35
+
name_location: SrcSpan {
36
36
+
start: 22,
37
37
+
end: 24,
38
38
+
},
39
39
+
left: Var {
40
40
+
location: SrcSpan {
41
41
+
start: 17,
42
42
+
end: 21,
43
43
+
},
44
44
+
name: "this",
45
45
+
},
46
46
+
right: Var {
47
47
+
location: SrcSpan {
48
48
+
start: 25,
49
49
+
end: 32,
50
50
+
},
51
51
+
name: "complex",
52
52
+
},
53
53
+
},
54
54
+
),
55
55
+
],
56
56
+
},
57
57
+
),
58
58
+
},
59
59
+
),
60
60
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: let assert 1 = echo 2 as this_belongs_to_echo
4
4
+
---
5
5
+
[
6
6
+
Assignment(
7
7
+
Assignment {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 45,
11
11
+
},
12
12
+
value: Echo {
13
13
+
location: SrcSpan {
14
14
+
start: 15,
15
15
+
end: 45,
16
16
+
},
17
17
+
expression: Some(
18
18
+
Int {
19
19
+
location: SrcSpan {
20
20
+
start: 20,
21
21
+
end: 21,
22
22
+
},
23
23
+
value: "2",
24
24
+
int_value: 2,
25
25
+
},
26
26
+
),
27
27
+
message: Some(
28
28
+
Var {
29
29
+
location: SrcSpan {
30
30
+
start: 25,
31
31
+
end: 45,
32
32
+
},
33
33
+
name: "this_belongs_to_echo",
34
34
+
},
35
35
+
),
36
36
+
},
37
37
+
pattern: Int {
38
38
+
location: SrcSpan {
39
39
+
start: 11,
40
40
+
end: 12,
41
41
+
},
42
42
+
value: "1",
43
43
+
int_value: 1,
44
44
+
},
45
45
+
kind: Assert {
46
46
+
location: SrcSpan {
47
47
+
start: 0,
48
48
+
end: 10,
49
49
+
},
50
50
+
assert_keyword_start: 4,
51
51
+
message: None,
52
52
+
},
53
53
+
compiled_case: CompiledCase {
54
54
+
tree: Fail,
55
55
+
subject_variables: [],
56
56
+
},
57
57
+
annotation: None,
58
58
+
},
59
59
+
),
60
60
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: let assert 1 = echo 1 as this_belongs_to_echo as this_belongs_to_assert
4
4
+
---
5
5
+
[
6
6
+
Assignment(
7
7
+
Assignment {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 71,
11
11
+
},
12
12
+
value: Echo {
13
13
+
location: SrcSpan {
14
14
+
start: 15,
15
15
+
end: 45,
16
16
+
},
17
17
+
expression: Some(
18
18
+
Int {
19
19
+
location: SrcSpan {
20
20
+
start: 20,
21
21
+
end: 21,
22
22
+
},
23
23
+
value: "1",
24
24
+
int_value: 1,
25
25
+
},
26
26
+
),
27
27
+
message: Some(
28
28
+
Var {
29
29
+
location: SrcSpan {
30
30
+
start: 25,
31
31
+
end: 45,
32
32
+
},
33
33
+
name: "this_belongs_to_echo",
34
34
+
},
35
35
+
),
36
36
+
},
37
37
+
pattern: Int {
38
38
+
location: SrcSpan {
39
39
+
start: 11,
40
40
+
end: 12,
41
41
+
},
42
42
+
value: "1",
43
43
+
int_value: 1,
44
44
+
},
45
45
+
kind: Assert {
46
46
+
location: SrcSpan {
47
47
+
start: 0,
48
48
+
end: 10,
49
49
+
},
50
50
+
assert_keyword_start: 4,
51
51
+
message: Some(
52
52
+
Var {
53
53
+
location: SrcSpan {
54
54
+
start: 49,
55
55
+
end: 71,
56
56
+
},
57
57
+
name: "this_belongs_to_assert",
58
58
+
},
59
59
+
),
60
60
+
},
61
61
+
compiled_case: CompiledCase {
62
62
+
tree: Fail,
63
63
+
subject_variables: [],
64
64
+
},
65
65
+
annotation: None,
66
66
+
},
67
67
+
),
68
68
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: echo as message
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 15,
11
11
+
},
12
12
+
expression: None,
13
13
+
message: Some(
14
14
+
Var {
15
15
+
location: SrcSpan {
16
16
+
start: 8,
17
17
+
end: 15,
18
18
+
},
19
19
+
name: "message",
20
20
+
},
21
21
+
),
22
22
+
},
23
23
+
),
24
24
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: "echo panic as \"a\""
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 17,
11
11
+
},
12
12
+
expression: Some(
13
13
+
Panic {
14
14
+
location: SrcSpan {
15
15
+
start: 5,
16
16
+
end: 17,
17
17
+
},
18
18
+
message: Some(
19
19
+
String {
20
20
+
location: SrcSpan {
21
21
+
start: 14,
22
22
+
end: 17,
23
23
+
},
24
24
+
value: "a",
25
25
+
},
26
26
+
),
27
27
+
},
28
28
+
),
29
29
+
message: None,
30
30
+
},
31
31
+
),
32
32
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: "echo panic as \"a\" as \"b\""
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 24,
11
11
+
},
12
12
+
expression: Some(
13
13
+
Panic {
14
14
+
location: SrcSpan {
15
15
+
start: 5,
16
16
+
end: 17,
17
17
+
},
18
18
+
message: Some(
19
19
+
String {
20
20
+
location: SrcSpan {
21
21
+
start: 14,
22
22
+
end: 17,
23
23
+
},
24
24
+
value: "a",
25
25
+
},
26
26
+
),
27
27
+
},
28
28
+
),
29
29
+
message: Some(
30
30
+
String {
31
31
+
location: SrcSpan {
32
32
+
start: 21,
33
33
+
end: 24,
34
34
+
},
35
35
+
value: "b",
36
36
+
},
37
37
+
),
38
38
+
},
39
39
+
),
40
40
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: echo wibble as message
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 22,
11
11
+
},
12
12
+
expression: Some(
13
13
+
Var {
14
14
+
location: SrcSpan {
15
15
+
start: 5,
16
16
+
end: 11,
17
17
+
},
18
18
+
name: "wibble",
19
19
+
},
20
20
+
),
21
21
+
message: Some(
22
22
+
Var {
23
23
+
location: SrcSpan {
24
24
+
start: 15,
25
25
+
end: 22,
26
26
+
},
27
27
+
name: "message",
28
28
+
},
29
29
+
),
30
30
+
},
31
31
+
),
32
32
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: "echo wibble as \"message\""
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Echo {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 24,
11
11
+
},
12
12
+
expression: Some(
13
13
+
Var {
14
14
+
location: SrcSpan {
15
15
+
start: 5,
16
16
+
end: 11,
17
17
+
},
18
18
+
name: "wibble",
19
19
+
},
20
20
+
),
21
21
+
message: Some(
22
22
+
String {
23
23
+
location: SrcSpan {
24
24
+
start: 15,
25
25
+
end: 24,
26
26
+
},
27
27
+
value: "message",
28
28
+
},
29
29
+
),
30
30
+
},
31
31
+
),
32
32
+
]
···
1
1
+
---
2
2
+
source: compiler-core/src/parse/tests.rs
3
3
+
expression: panic as echo wibble as message
4
4
+
---
5
5
+
[
6
6
+
Expression(
7
7
+
Panic {
8
8
+
location: SrcSpan {
9
9
+
start: 0,
10
10
+
end: 31,
11
11
+
},
12
12
+
message: Some(
13
13
+
Echo {
14
14
+
location: SrcSpan {
15
15
+
start: 9,
16
16
+
end: 31,
17
17
+
},
18
18
+
expression: Some(
19
19
+
Var {
20
20
+
location: SrcSpan {
21
21
+
start: 14,
22
22
+
end: 20,
23
23
+
},
24
24
+
name: "wibble",
25
25
+
},
26
26
+
),
27
27
+
message: Some(
28
28
+
Var {
29
29
+
location: SrcSpan {
30
30
+
start: 24,
31
31
+
end: 31,
32
32
+
},
33
33
+
name: "message",
34
34
+
},
35
35
+
),
36
36
+
},
37
37
+
),
38
38
+
},
39
39
+
),
40
40
+
]
···
474
474
}
475
475
476
476
#[test]
477
477
+
fn echo_with_simple_expression_1() {
478
478
+
assert_parse!("echo wibble as message");
479
479
+
}
480
480
+
481
481
+
#[test]
482
482
+
fn echo_with_simple_expression_2() {
483
483
+
assert_parse!("echo wibble as \"message\"");
484
484
+
}
485
485
+
486
486
+
#[test]
487
487
+
fn echo_with_complex_expression() {
488
488
+
assert_parse!("echo wibble as { this <> complex }");
489
489
+
}
490
490
+
491
491
+
#[test]
477
492
fn echo_with_no_expressions_after_it() {
478
493
assert_parse!("echo");
479
494
}
480
495
481
496
#[test]
497
497
+
fn echo_with_no_expressions_after_it_but_a_message() {
498
498
+
assert_parse!("echo as message");
499
499
+
}
500
500
+
501
501
+
#[test]
482
502
fn echo_with_block() {
483
503
assert_parse!("echo { 1 + 1 }");
484
504
}
···
510
530
}
511
531
512
532
#[test]
533
533
+
fn panic_with_echo_and_message() {
534
534
+
assert_parse!("panic as echo wibble as message");
535
535
+
}
536
536
+
537
537
+
#[test]
513
538
fn echo_with_panic() {
514
539
assert_parse!("echo panic as \"a\"");
540
540
+
}
541
541
+
542
542
+
#[test]
543
543
+
fn echo_with_panic_and_message() {
544
544
+
assert_parse!("echo panic as \"a\"");
545
545
+
}
546
546
+
547
547
+
#[test]
548
548
+
fn echo_with_panic_and_messages() {
549
549
+
assert_parse!("echo panic as \"a\" as \"b\"");
550
550
+
}
551
551
+
552
552
+
#[test]
553
553
+
fn echo_with_assert_and_message_1() {
554
554
+
assert_parse!("assert 1 == echo 2 as this_belongs_to_echo");
555
555
+
}
556
556
+
557
557
+
#[test]
558
558
+
fn echo_with_assert_and_message_2() {
559
559
+
assert_parse!("assert echo True as this_belongs_to_echo");
560
560
+
}
561
561
+
562
562
+
#[test]
563
563
+
fn echo_with_assert_and_messages_1() {
564
564
+
assert_parse!("assert 1 == echo 2 as this_belongs_to_echo as this_belongs_to_assert");
565
565
+
}
566
566
+
567
567
+
#[test]
568
568
+
fn echo_with_assert_and_messages_2() {
569
569
+
assert_parse!("assert echo True as this_belongs_to_echo as this_belongs_to_assert");
570
570
+
}
571
571
+
572
572
+
#[test]
573
573
+
fn echo_with_assert_and_messages_3() {
574
574
+
assert_parse!("assert echo 1 == 2 as this_belongs_to_echo as this_belongs_to_assert");
575
575
+
}
576
576
+
577
577
+
#[test]
578
578
+
fn echo_with_let_assert_and_message() {
579
579
+
assert_parse!("let assert 1 = echo 2 as this_belongs_to_echo");
580
580
+
}
581
581
+
582
582
+
#[test]
583
583
+
fn echo_with_let_assert_and_messages() {
584
584
+
assert_parse!("let assert 1 = echo 1 as this_belongs_to_echo as this_belongs_to_assert");
515
585
}
516
586
517
587
#[test]