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

TyRoXx / NonlocalityOS / 15662762907

15 Jun 2025 11:36AM UTC coverage: 76.549% (+0.2%) from 76.336%
15662762907

push

github

TyRoXx
GH-292: add predefined type Int

8 of 8 new or added lines in 2 files covered. (100.0%)

106 existing lines in 6 files now uncovered.

4139 of 5407 relevant lines covered (76.55%)

2239.69 hits per line

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

37.5
/lambda_compiler/src/ast.rs
1
use crate::{compilation::SourceLocation, tokenization::IntegerBase};
2
use lambda::name::Name;
3

4
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, 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(
107✔
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, 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>, SourceLocation),
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
    IntegerLiteral(i64, IntegerBase, SourceLocation),
48
}
49

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