mirror of
https://github.com/nushell/nushell
synced 2025-01-06 18:29:02 +00:00
e4104d0792
# Description First part of SpanID refactoring series. This PR adds a `SpanId` type and a corresponding `span_id` field to `Expression`. Parser creating expressions will now add them to an array in `StateWorkingSet`, generates a corresponding ID and saves the ID to the Expression. The IDs are not used anywhere yet. For the rough overall plan, see https://github.com/nushell/nushell/issues/12963. # User-Facing Changes Hopefully none. This is only a refactor of Nushell's internals that shouldn't have visible side effects. # Tests + Formatting # After Submitting
11 lines
388 B
Rust
11 lines
388 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
pub type VarId = usize;
|
|
pub type DeclId = usize;
|
|
pub type BlockId = usize;
|
|
pub type ModuleId = usize;
|
|
pub type OverlayId = usize;
|
|
pub type FileId = usize;
|
|
pub type VirtualPathId = usize;
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
|
pub struct SpanId(pub usize); // more robust ID style used in the new parser
|