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

TyRoXx / NonlocalityOS / 15532211159

09 Jun 2025 10:16AM UTC coverage: 76.046% (+0.4%) from 75.667%
15532211159

Pull #289

github

web-flow
Merge 95a86e2cb into 1c6ef0cf3
Pull Request #289: GH-288: make code formatter good enough for the examples

92 of 96 new or added lines in 7 files covered. (95.83%)

1 existing line in 1 file now uncovered.

3962 of 5210 relevant lines covered (76.05%)

2261.95 hits per line

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

28.57
/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(
100✔
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
    TypeOf(Box<Expression>),
46
    Comment(String, Box<Expression>, SourceLocation),
47
}
48

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