wright/ast/
ty.rs

1//! AST models for type signatures in wright source.
2
3use crate::source_tracking::fragment::Fragment;
4
5/// The atomic types of wright -- primitive numeric types, boolean, char, etc.
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[allow(missing_docs)]
8pub enum AtomicTyVariant {
9    Bool,
10    U8,
11    I8,
12    U16,
13    I16,
14    U32,
15    I32,
16    U64,
17    I64,
18    F32,
19    F64,
20    Char,
21}
22
23/// An atomic type signature in wright source code.
24#[derive(Clone, Debug)]
25#[allow(missing_docs)]
26pub struct AtomicTy {
27    pub variant: AtomicTyVariant,
28    pub matching_source: Fragment,
29}