1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Common code for JavaScript Syntax

pub mod identifier;
pub mod module_record;
pub mod operator;
pub mod precedence;
pub mod reference;
pub mod scope;
pub mod symbol;

pub use unicode_id_start;

#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum NumberBase {
    Float,
    Decimal,
    Binary,
    Octal,
    Hex,
}

impl NumberBase {
    pub fn is_base_10(&self) -> bool {
        matches!(self, Self::Float | Self::Decimal)
    }
}