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

vcfxb / wright-lang / 21089575804

17 Jan 2026 05:59AM UTC coverage: 76.301% (-0.3%) from 76.633%
21089575804

push

github

vcfxb
Add expressing optimizations design notes

0 of 6 new or added lines in 1 file covered. (0.0%)

1056 of 1384 relevant lines covered (76.3%)

38.27 hits per line

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

0.0
/wright/src/ast/expr.rs
1
use crate::ast::identifier::Identifier;
2
use crate::ast::literal::{BooleanLiteral, IntegerLiteral};
3
use crate::source_tracking::fragment::Fragment;
4

5
/// Atoms of an expression -- these are individual tokens from the lexer that are valid as an
6
/// expression all on their own.
7
#[derive(Debug)]
8
#[allow(missing_docs)]
9
pub enum Atom {
10
    Identifier(Identifier),
11
    IntegerLiteral(IntegerLiteral),
12
    BooleanLiteral(BooleanLiteral),
13
}
14

15
impl Atom {
16
    /// Get the matching fragment of source code.
NEW
17
    pub fn fragment(&self) -> &Fragment {
×
NEW
18
        match self {
×
NEW
19
            Atom::Identifier(i) => &i.fragment,
×
NEW
20
            Atom::IntegerLiteral(lit) => &lit.fragment,
×
NEW
21
            Atom::BooleanLiteral(lit) => &lit.fragment,
×
22
        }
NEW
23
    }
×
24
}
25

26
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
27
#[allow(missing_docs)]
28
pub enum UnaryOperation {
29
    Reference,
30
    Dereference,
31
    Negate,
32
    BooleanNot,
33
    BitwiseNot,
34
}
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