• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ergoplatform / sigma-rust / 19957094785

05 Dec 2025 08:23AM UTC coverage: 86.918% (+8.5%) from 78.463%
19957094785

Pull #837

github

web-flow
Merge dec08367a into 2f840d387
Pull Request #837: Split TransactionHintsBag hints properly

44 of 53 new or added lines in 13 files covered. (83.02%)

1621 existing lines in 221 files now uncovered.

27453 of 31585 relevant lines covered (86.92%)

253204.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.3
/ergoscript-compiler/src/parser/marker.rs
1
use crate::parser::event::Event;
2
use crate::syntax::SyntaxKind;
3

4
use super::Parser;
5
use drop_bomb::DropBomb;
6

7
pub struct Marker {
8
    pos: usize,
9
    bomb: DropBomb,
10
}
11

12
impl Marker {
13
    pub fn new(pos: usize) -> Self {
109✔
14
        Self {
109✔
15
            pos,
109✔
16
            bomb: DropBomb::new("Markers need to be completed"),
109✔
17
        }
109✔
18
    }
109✔
19

20
    pub fn complete(mut self, p: &mut Parser, kind: SyntaxKind) -> CompletedMarker {
109✔
21
        self.bomb.defuse();
109✔
22

23
        let event_at_pos = &mut p.events[self.pos];
109✔
24
        assert_eq!(*event_at_pos, Event::Placeholder);
109✔
25

26
        *event_at_pos = Event::StartNode {
109✔
27
            kind,
109✔
28
            forward_parent: None,
109✔
29
        };
109✔
30

31
        p.events.push(Event::FinishNode);
109✔
32

33
        CompletedMarker { pos: self.pos }
109✔
34
    }
109✔
35
}
36

37
pub struct CompletedMarker {
38
    pos: usize,
39
}
40

41
impl CompletedMarker {
42
    pub fn precede(self, p: &mut Parser) -> Marker {
18✔
43
        let new_m = p.start();
18✔
44

45
        if let Event::StartNode {
46
            ref mut forward_parent,
18✔
47
            ..
48
        } = p.events[self.pos]
18✔
49
        {
18✔
50
            *forward_parent = Some(new_m.pos - self.pos);
18✔
51
        } else {
18✔
UNCOV
52
            unreachable!();
×
53
        }
54

55
        new_m
18✔
56
    }
18✔
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc