diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/jsparagus-stencil/src/result.rs | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/jsparagus-stencil/src/result.rs')
-rw-r--r-- | third_party/rust/jsparagus-stencil/src/result.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/third_party/rust/jsparagus-stencil/src/result.rs b/third_party/rust/jsparagus-stencil/src/result.rs new file mode 100644 index 0000000000..6cb2fb7716 --- /dev/null +++ b/third_party/rust/jsparagus-stencil/src/result.rs @@ -0,0 +1,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, + } + } +} |