-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathdebug_info.rs
More file actions
31 lines (28 loc) · 766 Bytes
/
debug_info.rs
File metadata and controls
31 lines (28 loc) · 766 Bytes
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
27
28
29
30
31
use fxhash::FxHashMap;
use logos::Span;
use serde::{
Deserialize,
Serialize,
};
use tsify::Tsify;
use crate::{
ast::Project,
diagnostic::SpriteDiagnostics,
misc::SmolStr,
};
#[derive(Tsify, Serialize, Deserialize, Default)]
#[tsify(into_wasm_abi, from_wasm_abi)]
pub struct DebugInfo {
pub blocks: FxHashMap<String, Span>,
pub variables: FxHashMap<String, Span>,
pub lists: FxHashMap<String, Span>,
pub procs: FxHashMap<String, Span>,
pub funcs: FxHashMap<String, Span>,
}
#[derive(Tsify, Serialize)]
#[tsify(into_wasm_abi, from_wasm_abi)]
pub struct ArtifactRef<'a> {
pub project: &'a Project,
pub stage_diagnostics: &'a SpriteDiagnostics,
pub sprites_diagnostics: &'a FxHashMap<SmolStr, SpriteDiagnostics>,
}