summaryrefslogtreecommitdiffstats
path: root/third_party/rust/jsparagus-stencil/src/result.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/rust/jsparagus-stencil/src/result.rs35
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,
+ }
+ }
+}