oxc/crates/oxc_syntax/src/lib.rs
Andrew McClenaghan 6b3b260dcc
feat(Codegen): Improve codegen (#2460)
This gets all the new TS types working to the same level TS output was
before and fixes a bunch of other codegen

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-02-21 14:41:57 +08:00

43 lines
727 B
Rust

//! Common code for JavaScript Syntax
pub mod assumptions;
pub mod class;
pub mod identifier;
pub mod keyword;
pub mod module_record;
pub mod node;
pub mod operator;
pub mod precedence;
pub mod reference;
pub mod scope;
pub mod symbol;
pub mod xml_entities;
#[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)
}
}
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum BigintBase {
Decimal,
Binary,
Octal,
Hex,
}
impl BigintBase {
pub fn is_base_10(&self) -> bool {
self == &Self::Decimal
}
}