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

TyRoXx / NonlocalityOS / 15517294876

08 Jun 2025 10:01AM UTC coverage: 74.495% (+0.3%) from 74.179%
15517294876

push

github

TyRoXx
GH-280: clippy

2 of 2 new or added lines in 1 file covered. (100.0%)

26 existing lines in 5 files now uncovered.

3765 of 5054 relevant lines covered (74.5%)

2083.08 hits per line

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

33.33
/lambda_compiler/src/ast.rs
1
use crate::compilation::SourceLocation;
2
use lambda::name::Name;
3

4
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
5
pub struct LambdaParameter {
6
    pub name: Name,
7
    pub source_location: SourceLocation,
8
    pub type_annotation: Option<Expression>,
9
}
10

11
impl LambdaParameter {
12
    pub fn new(
72✔
13
        name: Name,
14
        source_location: SourceLocation,
15
        type_annotation: Option<Expression>,
16
    ) -> Self {
17
        Self {
18
            name,
19
            source_location,
20
            type_annotation,
21
        }
22
    }
23
}
24

25
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
26
pub enum Expression {
27
    Identifier(Name, SourceLocation),
28
    StringLiteral(String, SourceLocation),
29
    Apply {
30
        callee: Box<Expression>,
31
        arguments: Vec<Expression>,
32
    },
33
    Lambda {
34
        parameters: Vec<LambdaParameter>,
35
        body: Box<Expression>,
36
    },
37
    ConstructTree(Vec<Expression>),
38
    Braces(Box<Expression>),
39
    Let {
40
        name: Name,
41
        location: SourceLocation,
42
        value: Box<Expression>,
43
        body: Box<Expression>,
44
    },
45
}
46

47
impl Expression {
48
    pub fn source_location(&self) -> SourceLocation {
1✔
49
        match self {
1✔
50
            Expression::Identifier(_, location) => *location,
1✔
UNCOV
51
            Expression::StringLiteral(_, location) => *location,
×
52
            Expression::Apply { callee, .. } => callee.source_location(),
×
53
            Expression::Lambda { body, .. } => body.source_location(),
×
54
            Expression::ConstructTree(_) => todo!(),
55
            Expression::Braces(expression) => expression.source_location(),
×
56
            Expression::Let {
57
                name: _,
58
                location,
×
59
                value: _,
×
60
                body: _,
×
61
            } => *location,
×
62
        }
63
    }
64
}
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

© 2026 Coveralls, Inc