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
32
33
34
35
|
use crate::regexp::RegExpItem;
use crate::scope::ScopeData;
use crate::script::{ImmutableScriptData, ScriptStencil};
/// The result of emitter.
#[derive(Debug)]
pub struct EmitResult<'alloc> {
pub atoms: Vec<&'alloc str>,
pub slices: Vec<&'alloc str>,
pub scopes: Vec<ScopeData>,
pub regexps: Vec<RegExpItem>,
pub scripts: Vec<ScriptStencil>,
pub script_data_list: Vec<ImmutableScriptData>,
}
impl<'alloc> EmitResult<'alloc> {
pub fn new(
atoms: Vec<&'alloc str>,
slices: Vec<&'alloc str>,
scopes: Vec<ScopeData>,
regexps: Vec<RegExpItem>,
scripts: Vec<ScriptStencil>,
script_data_list: Vec<ImmutableScriptData>,
) -> Self {
Self {
atoms,
slices,
scopes,
regexps,
scripts,
script_data_list,
}
}
}
|