mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
I've tried too hard to make it into a full-fledged depth first iterator, But had no success with it; It is the next best thing that I could've thought of. Provides a way to visit the module graph from a ModuleRecord as its entry point.
43 lines
736 B
Rust
43 lines
736 B
Rust
//! Common code for JavaScript Syntax
|
|
|
|
pub mod class;
|
|
pub mod identifier;
|
|
pub mod keyword;
|
|
pub mod module_graph_visitor;
|
|
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, PartialEq, Eq, 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, PartialEq, Eq, Hash)]
|
|
pub enum BigintBase {
|
|
Decimal,
|
|
Binary,
|
|
Octal,
|
|
Hex,
|
|
}
|
|
|
|
impl BigintBase {
|
|
pub fn is_base_10(&self) -> bool {
|
|
self == &Self::Decimal
|
|
}
|
|
}
|