diff --git a/Cargo.toml b/Cargo.toml index eb53301..b53c961 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ressa" -version = "0.8.2" +version = "0.9.0-alpha.3" authors = ["Robert Masen "] repository = "https://github.com/rusty-ecma/RESSA" description = "An ECMAscript parser" @@ -14,7 +14,7 @@ edition = "2021" hash-chain = "0.3" log = "0.4" ress = "0.11" -resast = "0.5" +resast = "0.6.0-alpha.5" res-regex = "0.1" tracing = "0.1" diff --git a/scripts/run_moz_central_test.sh b/scripts/run_moz_central_test.sh index 1739a66..b4500f2 100755 --- a/scripts/run_moz_central_test.sh +++ b/scripts/run_moz_central_test.sh @@ -1 +1 @@ -RUST_MIN_STACK=9999999 cargo test moz_central --test all --features moz_central -- --nocapture +cargo test moz_central --test spider_monkey --features moz_central -- --nocapture diff --git a/src/error.rs b/src/error.rs index e82e8fe..b62a596 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,5 +1,6 @@ use ress::{tokens::Keyword, Position}; use std::fmt::{Display, Formatter, Result}; + #[derive(Debug)] pub enum Error { UnexpectedEoF, @@ -43,7 +44,8 @@ pub enum Error { UndefinedExports(Vec), ContinueOfNotIterationLabel(Position, String), Scanner(ress::error::Error), - Other(Box), + Regex(res_regex::Error), + Io(std::io::Error), Misc(String), } @@ -91,7 +93,8 @@ impl Display for Error { Error::UndefinedExports(ref names) => write!(f, "Undefined exports in module: {}", names.join(", ")), Error::ContinueOfNotIterationLabel(ref pos, ref token) => write!(f, "Label `{}` is does not label a loop, continue is invalid at {}", token, pos), Error::Scanner(ref e) => write!(f, "Error when tokenizing {}", e), - Error::Other(ref e) => write!(f, "{}", e), + Error::Regex(ref e) => write!(f, "{}", e), + Error::Io(ref e) => write!(f, "{}", e), Error::Misc(ref e) => write!(f, "{}", e), } } @@ -153,7 +156,7 @@ impl Error { impl From<::std::io::Error> for Error { fn from(other: ::std::io::Error) -> Self { - Error::Other(Box::new(other)) + Error::Io(other) } } impl ::std::error::Error for Error {} @@ -163,3 +166,25 @@ impl From for Error { Error::Scanner(other) } } + +impl From for Error { + fn from(value: res_regex::Error) -> Self { + Self::Regex(value) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn error_is_send_and_sync() { + fn print_error(arg: E) + where + E: std::error::Error + Send + Sync, + { + println!("{arg}"); + } + print_error(Error::Misc("some misc error".to_string())) + } +} diff --git a/src/formal_params.rs b/src/formal_params.rs index 3973ff7..4b5a0e3 100644 --- a/src/formal_params.rs +++ b/src/formal_params.rs @@ -1,28 +1,29 @@ use resast::spanned::expr::{Lit, ObjProp, Prop, PropKey, PropValue}; use resast::spanned::pat::{ArrayPatPart, ObjPatPart, Pat}; -use resast::spanned::{FuncArg, ListEntry, Slice}; +use resast::spanned::tokens::{Async, CloseParen, OpenParen}; +use resast::spanned::{FuncArg, ListEntry}; use std::borrow::Cow; use std::collections::HashSet; -type Param<'a> = ListEntry<'a, FuncArg<'a>>; +type Param = ListEntry>; pub struct FormalParams<'a> { pub simple: bool, - pub open_paren: Slice<'a>, - pub params: Vec>, - pub close_paren: Slice<'a>, + pub open_paren: OpenParen, + pub params: Vec>>, + pub close_paren: CloseParen, pub strict: bool, pub found_restricted: bool, } pub struct FormalsList<'a> { - pub keyword_async: Option>, - pub open_paren: Option>, - pub params: Vec>, - pub close_paren: Option>, + pub keyword_async: Option, + pub open_paren: Option, + pub params: Vec>>, + pub close_paren: Option, } -pub fn have_duplicates<'a>(params: &[Param<'a>]) -> bool { +pub fn have_duplicates<'a>(params: &[Param>]) -> bool { if let Err(first_dupe) = find_duplicate(params) { log::error!("Found duplicate parameter: {}", first_dupe); true @@ -30,7 +31,7 @@ pub fn have_duplicates<'a>(params: &[Param<'a>]) -> bool { false } } -pub fn find_duplicate<'a>(params: &[Param<'a>]) -> Result<(), Cow<'a, str>> { +pub fn find_duplicate<'a>(params: &[Param>]) -> Result<(), Cow<'a, str>> { let mut set = HashSet::new(); for param in params.iter() { match ¶m.item { @@ -48,14 +49,14 @@ pub fn find_duplicate<'a>(params: &[Param<'a>]) -> Result<(), Cow<'a, str>> { Ok(()) } pub fn update_with_expr<'a>( - expr: &resast::spanned::expr::Expr<'a>, + expr: &resast::spanned::expr::Expr>, set: &mut HashSet>, ) -> Result<(), Cow<'a, str>> { use resast::spanned::expr::{AssignExpr, AssignLeft}; log::trace!("update_with_expr {:?} {:?}", expr, set); match expr { resast::spanned::expr::Expr::Ident(id) => { - if !set.insert(id.slice.source.clone()) { + if !set.insert(id.slice.source.clone().into()) { return Err(id.slice.source.clone()); } } @@ -84,7 +85,7 @@ pub fn update_with_expr<'a>( Ok(()) } pub fn update_with_pat<'a>( - pat: &resast::spanned::pat::Pat<'a>, + pat: &resast::spanned::pat::Pat>, set: &mut HashSet>, ) -> Result<(), Cow<'a, str>> { log::trace!("update_with_pat {:?} {:?}", pat, set); @@ -129,7 +130,7 @@ pub fn update_with_pat<'a>( } fn update_with_prop<'a>( - prop: &Prop<'a>, + prop: &Prop>, set: &mut HashSet>, ) -> Result<(), Cow<'a, str>> { match prop { @@ -148,7 +149,7 @@ fn update_with_prop<'a>( } fn update_with_prop_value<'a>( - prop: &PropValue<'a>, + prop: &PropValue>, set: &mut HashSet>, ) -> Result<(), Cow<'a, str>> { log::trace!("update_with_prop {:?}, {:?}", prop, set); @@ -165,7 +166,7 @@ fn update_with_prop_value<'a>( } fn update_with_prop_key<'a>( - key: &PropKey<'a>, + key: &PropKey>, set: &mut HashSet>, ) -> Result<(), Cow<'a, str>> { match key { @@ -175,7 +176,10 @@ fn update_with_prop_key<'a>( } } -fn update_with_lit<'a>(lit: &Lit<'a>, set: &mut HashSet>) -> Result<(), Cow<'a, str>> { +fn update_with_lit<'a>( + lit: &Lit>, + set: &mut HashSet>, +) -> Result<(), Cow<'a, str>> { log::trace!("update_with_lit {:?}, {:?}", lit, set); if let Lit::String(s) = lit { if !set.insert(s.content.source.clone()) { diff --git a/src/lexical_names.rs b/src/lexical_names.rs index 87ce162..cafc1c0 100644 --- a/src/lexical_names.rs +++ b/src/lexical_names.rs @@ -163,7 +163,12 @@ impl<'a> DuplicateNameDetector<'a> { } } } - pub fn declare_pat(&mut self, pat: &Pat<'a>, kind: DeclKind, pos: Position) -> Res<()> { + pub fn declare_pat( + &mut self, + pat: &Pat>, + kind: DeclKind, + pos: Position, + ) -> Res<()> { log::trace!("declare_pat {:?} {:?} {:?}", pat, kind, pos); match pat { Pat::Ident(ref i) => { @@ -195,7 +200,12 @@ impl<'a> DuplicateNameDetector<'a> { } } - fn declare_prop(&mut self, prop: &Prop<'a>, kind: DeclKind, pos: Position) -> Res<()> { + fn declare_prop( + &mut self, + prop: &Prop>, + kind: DeclKind, + pos: Position, + ) -> Res<()> { log::trace!("declare_prop {:?} {:?} {:?}", prop, kind, pos); match &prop { Prop::Init(prop) => match &prop.value { @@ -213,14 +223,24 @@ impl<'a> DuplicateNameDetector<'a> { _ => Ok(()), } } - fn declare_literal_ident(&mut self, lit: &Lit<'a>, kind: DeclKind, pos: Position) -> Res<()> { + fn declare_literal_ident( + &mut self, + lit: &Lit>, + kind: DeclKind, + pos: Position, + ) -> Res<()> { log::trace!("declare_literal_ident {:?} {:?} {:?}", lit, kind, pos); match lit { Lit::String(s) => self.declare(s.content.source.clone(), kind, pos), _ => Err(Error::RestrictedIdent(pos)), } } - pub fn declare_expr(&mut self, expr: &Expr<'a>, kind: DeclKind, pos: Position) -> Res<()> { + pub fn declare_expr( + &mut self, + expr: &Expr>, + kind: DeclKind, + pos: Position, + ) -> Res<()> { log::trace!("declare_expr {:?} {:?} {:?}", expr, kind, pos); if let Expr::Ident(ref i) = expr { log::trace!("add_expr ident {:?}", i.slice.source); @@ -305,14 +325,18 @@ impl<'a> DuplicateNameDetector<'a> { } } - pub fn add_export_spec(&mut self, spec: &ExportSpecifier<'a>, pos: Position) -> Res<()> { + pub fn add_export_spec( + &mut self, + spec: &ExportSpecifier>, + pos: Position, + ) -> Res<()> { log::trace!("add_export_spec {:?} {:?}", spec, pos); - self.add_export_ident(&spec.local.slice.source, pos)?; + self.add_export_ident(&spec.local.slice.source.clone(), pos)?; self.undefined_module_export_guard(spec.local.slice.source.clone()); Ok(()) } - pub fn removed_undefined_export(&mut self, id: &Ident<'a>) { + pub fn removed_undefined_export(&mut self, id: &Ident>) { log::trace!("removed_undefined_export {:?}", id); self.undefined_module_exports.remove(&id.slice.source); } diff --git a/src/lhs.rs b/src/lhs.rs index 1c5db6b..2eac9ce 100644 --- a/src/lhs.rs +++ b/src/lhs.rs @@ -12,7 +12,7 @@ use resast::spanned::{ use std::{borrow::Cow, collections::HashSet}; type Res = Result<(), Error>; -pub fn is_simple_expr<'a>(expr: &Expr<'a>) -> bool { +pub fn is_simple_expr<'a>(expr: &Expr>) -> bool { log::trace!("is_simple_expr {:?}", expr); match expr { Expr::This(_) => false, @@ -20,17 +20,22 @@ pub fn is_simple_expr<'a>(expr: &Expr<'a>) -> bool { } } -pub fn is_simple_pat<'a>(pat: &Pat<'a>) -> bool { +pub fn is_simple_pat<'a>(pat: &Pat>) -> bool { log::trace!("is_simple_pat {:?}", pat); match pat { - Pat::Ident(ref id) => match &*id.slice.source { + Pat::Ident(ref id) => match id.slice.source.as_ref() { "this" => false, _ => true, }, _ => true, } } -pub fn check_lhs_expr<'a>(expr: &Expr<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +pub fn check_lhs_expr<'a>( + expr: &Expr>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { match expr { Expr::Ident(ref id) => check_ident(id, allow_let, pos, strict), Expr::Obj(ref obj) => check_obj_expr(obj, allow_let, pos, strict), @@ -41,7 +46,12 @@ pub fn check_lhs_expr<'a>(expr: &Expr<'a>, allow_let: bool, pos: Position, stric } } -pub fn check_lhs_pat<'a>(pat: &Pat<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +pub fn check_lhs_pat<'a>( + pat: &Pat>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { match pat { Pat::Ident(ref id) => check_ident(id, allow_let, pos, strict), Pat::Obj(ref obj) => check_obj_pat(&obj.props, allow_let, pos, strict), @@ -50,8 +60,8 @@ pub fn check_lhs_pat<'a>(pat: &Pat<'a>, allow_let: bool, pos: Position, strict: } } -fn check_ident<'a>(id: &Ident<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { - if !allow_let && &id.slice.source == "let" { +fn check_ident<'a>(id: &Ident>, allow_let: bool, pos: Position, strict: bool) -> Res { + if !allow_let && id.slice.source.as_ref() == "let" { Err(Error::InvalidUseOfContextualKeyword(pos, "let".to_string())) } else if strict && is_strict_reserved(&id) || is_restricted_word(&id) { Err(Error::RestrictedIdent(pos)) @@ -60,7 +70,12 @@ fn check_ident<'a>(id: &Ident<'a>, allow_let: bool, pos: Position, strict: bool) } } -fn check_obj_expr<'a>(obj: &ObjExpr<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +fn check_obj_expr<'a>( + obj: &ObjExpr>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { for part in &obj.props { check_obj_prop(&part.item, allow_let, pos, strict)?; } @@ -68,7 +83,7 @@ fn check_obj_expr<'a>(obj: &ObjExpr<'a>, allow_let: bool, pos: Position, strict: } fn check_obj_pat<'a>( - obj: &[ListEntry<'a, ObjPatPart<'a>>], + obj: &[ListEntry>>], allow_let: bool, pos: Position, strict: bool, @@ -80,7 +95,7 @@ fn check_obj_pat<'a>( } fn check_assign_expr<'a>( - assign: &AssignExpr<'a>, + assign: &AssignExpr>, allow_let: bool, pos: Position, strict: bool, @@ -92,7 +107,7 @@ fn check_assign_expr<'a>( } fn check_assign_pat<'a>( - assign: &resast::spanned::pat::AssignPat<'a>, + assign: &resast::spanned::pat::AssignPat>, allow_let: bool, pos: Position, strict: bool, @@ -100,7 +115,12 @@ fn check_assign_pat<'a>( check_lhs_pat(&*assign.left, allow_let, pos, strict) } -fn check_array_expr<'a>(array: &ArrayExpr, allow_let: bool, pos: Position, strict: bool) -> Res { +fn check_array_expr<'a>( + array: &ArrayExpr>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { for part in &array.elements { if let Some(expr) = &part.item { check_lhs_expr(expr, allow_let, pos, strict)?; @@ -110,7 +130,7 @@ fn check_array_expr<'a>(array: &ArrayExpr, allow_let: bool, pos: Position, stric } fn check_array_pat<'a>( - array: &[ListEntry<'a, Option>>], + array: &[ListEntry>>>], allow_let: bool, pos: Position, strict: bool, @@ -129,7 +149,12 @@ fn check_array_pat<'a>( Ok(()) } -fn check_obj_prop<'a>(prop: &ObjProp<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +fn check_obj_prop<'a>( + prop: &ObjProp>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { match prop { ObjProp::Prop(ref p) => check_prop(p, allow_let, pos, strict), ObjProp::Spread(ref p) => check_lhs_expr(&p.expr, allow_let, pos, strict), @@ -137,7 +162,7 @@ fn check_obj_prop<'a>(prop: &ObjProp<'a>, allow_let: bool, pos: Position, strict } fn check_obj_pat_part<'a>( - part: &ObjPatPart<'a>, + part: &ObjPatPart>, allow_let: bool, pos: Position, strict: bool, @@ -148,14 +173,19 @@ fn check_obj_pat_part<'a>( } } -fn check_prop<'a>(prop: &Prop<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +fn check_prop<'a>(prop: &Prop>, allow_let: bool, pos: Position, strict: bool) -> Res { match prop { Prop::Init(value) => check_prop_key(&value.key.value, allow_let, pos, strict), _ => Err(Error::InvalidLHS(pos)), } } -pub fn check_prop_key<'a>(key: &PropKey<'a>, allow_let: bool, pos: Position, strict: bool) -> Res { +pub fn check_prop_key<'a>( + key: &PropKey>, + allow_let: bool, + pos: Position, + strict: bool, +) -> Res { match &key { PropKey::Lit(_value) => Err(Error::InvalidLHS(pos)), PropKey::Expr(value) => check_lhs_expr(value, allow_let, pos, strict), @@ -163,7 +193,7 @@ pub fn check_prop_key<'a>(key: &PropKey<'a>, allow_let: bool, pos: Position, str } } -pub fn check_loop_left<'a>(left: &LoopLeft<'a>, pos: Position) -> Res { +pub fn check_loop_left<'a>(left: &LoopLeft>, pos: Position) -> Res { let mut set = HashSet::new(); match left { LoopLeft::Expr(expr) => check_loop_left_expr(expr, pos, &mut set), @@ -178,7 +208,7 @@ pub fn check_loop_left<'a>(left: &LoopLeft<'a>, pos: Position) -> Res { } } -pub fn check_loop_head_expr<'a>(left: &Expr<'a>, pos: Position) -> Res { +pub fn check_loop_head_expr<'a>(left: &Expr>, pos: Position) -> Res { log::debug!("check_loop_head_expr"); let mut set = HashSet::new(); match left { @@ -190,7 +220,7 @@ pub fn check_loop_head_expr<'a>(left: &Expr<'a>, pos: Position) -> Res { } fn check_binding_obj<'a>( - obj: &[ListEntry<'a, ObjProp<'a>>], + obj: &[ListEntry>>], pos: Position, set: &mut HashSet>, ) -> Res { @@ -209,7 +239,7 @@ fn check_binding_obj<'a>( } pub fn check_binding_array<'a>( - a: &[ListEntry<'a, Option>>], + a: &[ListEntry>>>], pos: Position, set: &mut HashSet>, ) -> Res { @@ -226,7 +256,7 @@ pub fn check_binding_array<'a>( } fn check_loop_left_prop_key<'a>( - prop: &PropKey<'a>, + prop: &PropKey>, pos: Position, set: &mut HashSet>, ) -> Res { @@ -239,7 +269,7 @@ fn check_loop_left_prop_key<'a>( } fn check_loop_left_expr<'a>( - expr: &Expr<'a>, + expr: &Expr>, pos: Position, set: &mut HashSet>, ) -> Res { @@ -256,7 +286,11 @@ fn check_loop_left_expr<'a>( } } -fn check_loop_left_pat<'a>(pat: &Pat<'a>, pos: Position, set: &mut HashSet>) -> Res { +fn check_loop_left_pat<'a>( + pat: &Pat>, + pos: Position, + set: &mut HashSet>, +) -> Res { log::debug!("check_loop_left_pat"); match pat { Pat::Ident(ident) => { @@ -285,20 +319,20 @@ fn check_loop_left_pat<'a>(pat: &Pat<'a>, pos: Position, set: &mut HashSet bool { - &word.slice.source == "eval" || &word.slice.source == "arguments" +fn is_restricted_word<'a>(word: &Ident>) -> bool { + word.slice.source.as_ref() == "eval" || word.slice.source.as_ref() == "arguments" } /// Check if this &str is in the list of reserved /// words in the context of 'use strict' #[inline] -fn is_strict_reserved(word: &Ident) -> bool { - word.slice.source == "implements" - || word.slice.source == "interface" - || word.slice.source == "package" - || word.slice.source == "private" - || word.slice.source == "protected" - || word.slice.source == "public" - || word.slice.source == "static" - || word.slice.source == "yield" - || word.slice.source == "let" +fn is_strict_reserved<'a>(word: &Ident>) -> bool { + word.slice.source.as_ref() == "implements" + || word.slice.source.as_ref() == "interface" + || word.slice.source.as_ref() == "package" + || word.slice.source.as_ref() == "private" + || word.slice.source.as_ref() == "protected" + || word.slice.source.as_ref() == "public" + || word.slice.source.as_ref() == "static" + || word.slice.source.as_ref() == "yield" + || word.slice.source.as_ref() == "let" } diff --git a/src/lib.rs b/src/lib.rs index cf62a84..5357273 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,7 @@ pub use crate::error::Error; use resast::prelude::*; +use std::borrow::Cow; use std::collections::HashMap; /// The current configuration options. @@ -333,7 +334,7 @@ where /// //assert_eq!(program, expectation); /// } /// ``` - pub fn parse(&mut self) -> Res { + pub fn parse(&mut self) -> Res>> { let ret = self.inner.parse()?; Ok(ret.into()) } @@ -354,7 +355,7 @@ impl<'b, CH> Iterator for Parser<'b, CH> where CH: CommentHandler<'b> + Sized, { - type Item = Res>; + type Item = Res>>; fn next(&mut self) -> Option { let ret = self.inner.next()?; Some(ret.map(Into::into)) diff --git a/src/regex.rs b/src/regex.rs index e5eaeb9..6f94b0e 100644 --- a/src/regex.rs +++ b/src/regex.rs @@ -1,12 +1,9 @@ -use super::{Error, Res}; +use super::Res; use res_regex::RegexParser; /// Validate that an already parsed regular expression /// literal does not contain any illegal constructs /// like a duplicate flag or invalid class range pub fn validate_regex<'a>(regex: &'a str) -> Res<()> { - RegexParser::new(®ex) - .map_err(|e| Error::Other(Box::new(e)))? - .validate() - .map_err(|e| Error::Other(Box::new(e)))?; + RegexParser::new(®ex)?.validate()?; Ok(()) } diff --git a/src/spanned/mod.rs b/src/spanned/mod.rs index 6516a19..4f6e808 100644 --- a/src/spanned/mod.rs +++ b/src/spanned/mod.rs @@ -77,8 +77,13 @@ use resast::spanned::{ ForOfStmt, ForStmt, IfStmt, LabeledStmt, LoopInit, LoopLeft, Stmt, SwitchCase, SwitchStmt, TryStmt, WhileStmt, WithStmt, }, - AssignOp, BinaryOp, Class, ClassBody, Dir, Func, FuncArg, FuncBody, Ident, ListEntry, - LogicalOp, Node, Program, ProgramPart, Slice, SuperClass, UnaryOp, UpdateOp, VarKind, + tokens::{ + AssignOp, Asterisk, Async, BinaryOp, Break, CloseParen, Comma, Continue, FatArrow, For, + Function, Get, LogicalOp, OpenParen, QuasiQuote, Return, Semicolon, Set, Static, + SwitchCaseKeyword, Throw, Token as _, UnaryOp, UpdateOp, + }, + Class, ClassBody, Dir, Func, FuncArg, FuncBody, Ident, ListEntry, Node, Program, ProgramPart, + Slice, SuperClass, VarKind, }; use ress::prelude::*; use ress::Span; @@ -350,7 +355,7 @@ where /// } /// ``` #[tracing::instrument(level = "trace", skip(self))] - pub fn parse(&mut self) -> Res { + pub fn parse(&mut self) -> Res>> { log::debug!( "{}: parse_script {:?}", self.look_ahead.span.start, @@ -359,7 +364,7 @@ where if self.context.is_module { self.context.strict = true; } - let body: Res> = self.collect(); + let body: Res>>> = self.collect(); Ok(if self.context.is_module { Program::Mod(body?) } else { @@ -369,7 +374,7 @@ where /// Parse all of the directives into a single prologue #[tracing::instrument(level = "trace", skip(self))] - fn parse_directive_prologues(&mut self) -> Res>> { + fn parse_directive_prologues(&mut self) -> Res>>> { log::debug!( "{}: parse_directive_prologues {:?}", self.look_ahead.span.start, @@ -387,7 +392,7 @@ where /// Parse a single directive #[tracing::instrument(level = "trace", skip(self))] - fn parse_directive(&mut self) -> Res> { + fn parse_directive(&mut self) -> Res>> { log::debug!( "{}: parse_directive {:?}", self.look_ahead.span.start, @@ -442,7 +447,10 @@ where /// statement or declaration (import/export/function/const/let/class) /// otherwise we move on to `Parser::parse_statement` #[tracing::instrument(level = "trace", skip(self))] - fn parse_statement_list_item(&mut self, ctx: Option>) -> Res> { + fn parse_statement_list_item( + &mut self, + ctx: Option>, + ) -> Res>> { log::debug!("{}: parse_statement_list_item", self.look_ahead.span.start); self.context.set_is_assignment_target(true); self.context.set_is_binding_element(true); @@ -539,7 +547,7 @@ where /// import 'place'; /// ``` #[tracing::instrument(level = "trace", skip(self))] - fn parse_import_decl(&mut self) -> Res<(ModImport<'b>, Option>)> { + fn parse_import_decl(&mut self) -> Res<(ModImport>, Option)> { if let Some(scope) = self.context.lexical_names.last_scope() { if !scope.is_top() { return Err(Error::InvalidImportError(self.current_position)); @@ -601,7 +609,7 @@ where } } let keyword_from = self.next_item()?; - let keyword_from = self.get_slice(&keyword_from)?; + let keyword_from = self.position_from(&keyword_from).into(); // capture the source string for where this import // comes from let source = self.parse_module_specifier()?; @@ -621,7 +629,7 @@ where /// import {Thing} from 'place'; /// ``` #[tracing::instrument(level = "trace", skip(self))] - fn parse_named_imports(&mut self) -> Res> { + fn parse_named_imports(&mut self) -> Res>> { let open_brace = self.expect_punct(Punct::OpenBrace)?; let mut ret = Vec::new(); while !self.at_punct(Punct::CloseBrace) { @@ -643,19 +651,19 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_import_specifier(&mut self) -> Res> { + fn parse_import_specifier(&mut self) -> Res>> { let start = self.look_ahead_position; let imported = self.parse_ident_name()?; let alias = if self.at_contextual_keyword("as") { let keyword = self.next_item()?; - let keyword = self.get_slice(&keyword)?; + let keyword = self.position_from(&keyword).into(); let alias = self.parse_var_ident(false)?; self.context.lexical_names.declare( alias.slice.source.clone(), DeclKind::Lex(true), start, )?; - if alias.slice.source == "arguments" || alias.slice.source == "eval" { + if alias.slice.source.as_ref() == "arguments" || alias.slice.source.as_ref() == "eval" { return Err(Error::StrictModeArgumentsOrEval(start)); } Some(Alias { @@ -668,7 +676,9 @@ where DeclKind::Lex(true), start, )?; - if imported.slice.source == "arguments" || imported.slice.source == "eval" { + if imported.slice.source.as_ref() == "arguments" + || imported.slice.source.as_ref() == "eval" + { return Err(Error::StrictModeArgumentsOrEval(start)); } None @@ -677,13 +687,13 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_import_namespace_specifier(&mut self) -> Res> { + fn parse_import_namespace_specifier(&mut self) -> Res>> { let star = self.expect_punct(Punct::Asterisk)?; if !self.at_contextual_keyword("as") { return self.expected_token_error(&self.look_ahead, &["as"]); } let keyword_as = self.next_item()?; - let keyword = self.get_slice(&keyword_as)?; + let keyword = self.position_from(&keyword_as).into(); let start = self.look_ahead_position; let ident = self.parse_ident_name()?; self.context.lexical_names.declare( @@ -699,17 +709,19 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_import_default_specifier(&mut self) -> Res> { + fn parse_import_default_specifier(&mut self) -> Res>> { let start = self.look_ahead_position; let id = self.parse_ident_name()?; - self.context - .lexical_names - .declare(id.slice.source.clone(), DeclKind::Lex(true), start)?; + self.context.lexical_names.declare( + id.slice.source.clone(), + DeclKind::Lex(true), + start, + )?; Ok(DefaultImportSpec { id }) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_export_decl(&mut self) -> Res<(ModExport<'b>, Option>)> { + fn parse_export_decl(&mut self) -> Res<(ModExport>, Option)> { log::debug!("{} parse_export_decl", self.look_ahead_position); let mut semi = None; if let Some(scope) = self.context.lexical_names.last_scope() { @@ -853,7 +865,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_default_export(&mut self) -> Res> { + fn parse_default_export(&mut self) -> Res>> { let keyword_default = self.next_item()?; if let Token::Keyword(k) = &keyword_default.token { if k.has_unicode_escape() { @@ -863,7 +875,7 @@ where ); } } - let keyword = self.get_slice(&keyword_default)?; + let keyword = self.position_from(&keyword_default).into(); let value = if self.at_keyword(Keyword::Function(())) { let decl = self.parse_export_decl_func()?; DefaultExportDeclValue::Decl(decl) @@ -894,43 +906,51 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_all_export(&mut self) -> Res> { + fn parse_all_export(&mut self) -> Res>> { let star = self.expect_punct(Punct::Asterisk)?; + let alias = if self.at_contextual_keyword("as") { + let keyword = self.expect_contextual_keyword("as")?; + let ident = self.parse_ident_name()?; + Some(Alias { keyword, ident }) + } else { + None + }; let keyword = self.expect_contextual_keyword("from")?; let name = self.parse_module_specifier()?; Ok(ModExportSpecifier::All { star, + alias, keyword, name, }) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_export_decl_func(&mut self) -> Res> { + fn parse_export_decl_func(&mut self) -> Res>> { let start = self.look_ahead_position; let func = self.parse_function_decl(true)?; if let Some(id) = &func.id { self.context .lexical_names - .add_export_ident(&id.slice.source, start)?; + .add_export_ident(&id.slice.source.clone(), start)?; } Ok(Decl::Func(func)) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_export_decl_class(&mut self) -> Res> { + fn parse_export_decl_class(&mut self) -> Res>> { let start = self.look_ahead_position; let class = self.parse_class_decl(true, true)?; if let Some(id) = &class.id { self.context .lexical_names - .add_export_ident(&id.slice.source, start)?; + .add_export_ident(&id.slice.source.clone(), start)?; } Ok(Decl::Class(class)) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_async_export(&mut self) -> Res> { + fn parse_async_export(&mut self) -> Res>> { let exp = if self.at_async_function() { let _start = self.look_ahead_position; let func = self.parse_function_decl(true)?; @@ -946,15 +966,13 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_export_specifier(&mut self) -> Res> { + fn parse_export_specifier(&mut self) -> Res>> { let local = self.parse_ident_name()?; let alias = if self.at_contextual_keyword("as") { let keyword = self.next_item()?; + let keyword = self.position_from(&keyword).into(); let ident = self.parse_ident_name()?; - Some(Alias { - keyword: self.get_slice(&keyword)?, - ident, - }) + Some(Alias { keyword, ident }) } else { None }; @@ -962,7 +980,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_module_specifier(&mut self) -> Res> { + fn parse_module_specifier(&mut self) -> Res>> { let item = self.next_item()?; match &item.token { Token::String(_) => { @@ -973,7 +991,7 @@ where } } #[tracing::instrument(level = "trace", skip(self))] - fn parse_statement(&mut self, ctx: Option>) -> Res> { + fn parse_statement(&mut self, ctx: Option>) -> Res>> { log::debug!( "{}: parse_statement {:?}", self.look_ahead.span.start, @@ -1001,7 +1019,7 @@ where } Punct::SemiColon => { let semi = self.next_item()?; - let slice = self.get_slice(&semi)?; + let slice = self.position_from(&semi).into(); Stmt::Empty(slice) } _ => { @@ -1116,7 +1134,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_with_stmt(&mut self) -> Res> { + fn parse_with_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_with_stmt {:?}", self.look_ahead.span.start, @@ -1129,7 +1147,7 @@ where ))?; } let keyword = self.expect_keyword(Keyword::With(()))?; - let open_paren = self.expect_punct(Punct::OpenParen)?; + let open_paren: resast::spanned::Position = self.expect_punct(Punct::OpenParen)?; let object = self.parse_expression()?; Ok(if !self.at_punct(Punct::CloseParen) { if !self.config.tolerant { @@ -1137,10 +1155,10 @@ where } WithStmt { keyword, - open_paren: open_paren.clone(), + open_paren: open_paren.clone().into(), object, - close_paren: open_paren.clone(), - body: Box::new(Stmt::Empty(open_paren)), + close_paren: open_paren.clone().into(), + body: Box::new(Stmt::Empty(open_paren.into())), } } else { let close_paren = self.expect_punct(Punct::CloseParen)?; @@ -1155,7 +1173,7 @@ where } WithStmt { keyword, - open_paren, + open_paren: open_paren.into(), object, close_paren, body: Box::new(body), @@ -1164,7 +1182,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_while_stmt(&mut self) -> Res> { + fn parse_while_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_while_stmt {:?}", self.look_ahead.span.start, @@ -1202,7 +1220,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_var_stmt(&mut self) -> Res> { + fn parse_var_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_var_stmt {:?}", self.look_ahead.span.start, @@ -1222,7 +1240,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_var_decl_list(&mut self, in_for: bool) -> Res>>> { + fn parse_var_decl_list(&mut self, in_for: bool) -> Res>>>> { log::debug!( "{} parse_var_decl_list {:?}", self.look_ahead.span.start, @@ -1238,7 +1256,7 @@ where let mut ret = vec![ListEntry::no_comma(first)]; while self.at_punct(Punct::Comma) { let comma = self.next_item()?; - let comma = self.get_slice(&comma)?; + let comma = self.position_from(&comma).into(); if let Some(last) = ret.last_mut() { last.comma = Some(comma); } @@ -1255,7 +1273,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_var_decl(&mut self, in_for: bool) -> Res> { + fn parse_var_decl(&mut self, in_for: bool) -> Res>> { log::debug!( "{} parse_variable_decl_list in_for: {}", self.look_ahead.span.start, @@ -1277,7 +1295,7 @@ where let (init, eq) = if self.at_punct(Punct::Equal) { let eq = self.next_item()?; let init = isolate_cover_grammar!(self, parse_assignment_expr)?; - (Some(init), self.slice_from(&eq)) + (Some(init), Some(self.position_from(&eq).into())) } else if !Self::is_pat_ident(&patt) && !in_for { return self.expected_token_error(&self.look_ahead, &["="]); } else { @@ -1287,7 +1305,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_try_stmt(&mut self) -> Res> { + fn parse_try_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_try_stmt {:?}", self.look_ahead.span.start, @@ -1333,7 +1351,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_catch_clause(&mut self) -> Res> { + fn parse_catch_clause(&mut self) -> Res>> { log::debug!( "{}: parse_catch_clause {:?}", self.look_ahead.span.start, @@ -1401,7 +1419,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_finally_clause(&mut self) -> Res> { + fn parse_finally_clause(&mut self) -> Res>> { log::debug!( "{}: parse_finally_clause {:?}", self.look_ahead.span.start, @@ -1413,7 +1431,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_throw_stmt(&mut self) -> Res<(Slice<'b>, Expr<'b>, Option>)> { + fn parse_throw_stmt(&mut self) -> Res<(Throw, Expr>, Option)> { log::debug!( "{}: parse_throw_stmt {:?}", self.look_ahead.span.start, @@ -1429,7 +1447,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_switch_stmt(&mut self) -> Res> { + fn parse_switch_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_switch_stmt {:?}", self.look_ahead.span.start, @@ -1473,19 +1491,18 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_switch_case(&mut self) -> Res> { + fn parse_switch_case(&mut self) -> Res>> { log::debug!( "{}: parse_switch_case {:?}", self.look_ahead.span.start, self.look_ahead.token ); let (keyword, test) = if self.at_keyword(Keyword::Default(())) { - (self.expect_keyword(Keyword::Default(()))?, None) + let tok = self.expect_keyword(Keyword::Default(()))?; + (SwitchCaseKeyword::Default(tok), None) } else { - ( - self.expect_keyword(Keyword::Case(()))?, - Some(self.parse_expression()?), - ) + let tok = self.expect_keyword(Keyword::Case(()))?; + (SwitchCaseKeyword::Case(tok), Some(self.parse_expression()?)) }; let colon = self.expect_punct(Punct::Colon)?; let mut consequent = Vec::new(); @@ -1507,7 +1524,9 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_return_stmt(&mut self) -> Res<(Slice<'b>, Option>, Option>)> { + fn parse_return_stmt( + &mut self, + ) -> Res<(Return, Option>>, Option)> { log::debug!( "{}: parse_return_stmt {:?}", self.look_ahead.span.start, @@ -1534,7 +1553,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_if_stmt(&mut self) -> Res> { + fn parse_if_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_if_stmt {:?}", self.look_ahead.span.start, @@ -1584,7 +1603,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_if_clause(&mut self) -> Res> { + fn parse_if_clause(&mut self) -> Res>> { log::debug!( "{}: parse_if_clause {:?}", self.look_ahead.span.start, @@ -1596,7 +1615,7 @@ where self.parse_statement(Some(StmtCtx::If)) } - fn parse_fn_stmt(&mut self, decl_pos: bool) -> Res> { + fn parse_fn_stmt(&mut self, decl_pos: bool) -> Res>> { log::debug!( "{}: parse_fn_stmt {:?} {}", self.look_ahead.span.start, @@ -1605,7 +1624,7 @@ where ); let async_keyword = if self.at_contextual_keyword("async") { let keyword = self.next_item()?; - self.slice_from(&keyword) + Some(self.position_from(&keyword).into()) } else { None }; @@ -1615,7 +1634,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_for_stmt(&mut self) -> Res> { + fn parse_for_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_for_stmt {:?}", self.look_ahead.span.start, @@ -1698,10 +1717,11 @@ where } } } - let var_kind = match &kind.token { + match &kind.token { Token::Keyword(ref k) => match k { - Keyword::Const(_) => VarKind::Const(self.get_slice(&kind)?), - Keyword::Let(_) => VarKind::Let(self.get_slice(&kind)?), + Keyword::Const(_) | Keyword::Let(_) => { + VarKind::Const(self.position_from(&kind).into()) + } _ => return self.expected_token_error(&kind, &["const", "let"]), }, _ => return self.expected_token_error(&kind, &["const", "let"]), @@ -1709,10 +1729,11 @@ where if !self.context.strict && self.look_ahead.token.matches_keyword(Keyword::In(())) { let keyword_in = self.expect_keyword(Keyword::In(()))?; //const or let becomes an ident - let k = match var_kind { - VarKind::Var(Some(slice)) => slice, - VarKind::Let(slice) => slice, - VarKind::Const(slice) => slice, + let k = match kind.token { + Token::Keyword(ref k) => match k { + Keyword::Const(_) | Keyword::Let(_) => self.get_slice(&kind)?, + _ => unreachable!(), + }, _ => unreachable!(), }; let left = LoopLeft::Expr(Expr::Ident(Ident { slice: k })); @@ -1738,6 +1759,7 @@ where } else { let prev_in = self.context.allow_in; self.context.allow_in = false; + let var_kind = self.var_kind_from(&kind)?; let mut decls = self.parse_binding_list(&var_kind, true)?; log::debug!("{:?}", decls); self.context.allow_in = prev_in; @@ -1834,7 +1856,7 @@ where } lhs::check_loop_head_expr(&init, init_start)?; let keyword_of = self.next_item()?; - let keyword_of = self.get_slice(&keyword_of)?; + let keyword_of = self.position_from(&keyword_of).into(); let left = LoopLeft::Expr(init); let right = self.parse_assignment_expr()?; let close_paren = self.expect_punct(Punct::CloseParen)?; @@ -1885,10 +1907,10 @@ where fn parse_for_loop( &mut self, - kind: VarKind<'b>, - for_keyword: Slice<'b>, - open_paren: Slice<'b>, - ) -> Res> { + kind: VarKind, + for_keyword: For, + open_paren: OpenParen, + ) -> Res>> { log::debug!( "{}: parse_for_loop {:?}", self.look_ahead.span.start, @@ -1905,10 +1927,10 @@ where fn parse_for_loop_cont( &mut self, - init: Option>, - keyword_for: Slice<'b>, - open_paren: Slice<'b>, - ) -> Res> { + init: Option>>, + keyword_for: For, + open_paren: OpenParen, + ) -> Res>> { log::debug!( "{}: parse_for_loop_cont {:?}", self.look_ahead.span.start, @@ -1947,10 +1969,10 @@ where fn parse_for_in_loop( &mut self, - left: LoopLeft<'b>, - keyword_for: Slice<'b>, - open_paren: Slice<'b>, - ) -> Res> { + left: LoopLeft>, + keyword_for: For, + open_paren: OpenParen, + ) -> Res>> { log::debug!( "{}: parse_for_in_loop {:?}", self.look_ahead.span.start, @@ -2008,11 +2030,11 @@ where fn parse_for_of_loop( &mut self, - left: LoopLeft<'b>, + left: LoopLeft>, is_await: bool, - keyword_for: Slice<'b>, - open_paren: Slice<'b>, - ) -> Res> { + keyword_for: For, + open_paren: OpenParen, + ) -> Res>> { log::debug!( "{}: parse_for_of_loop {:?}", self.look_ahead.span.start, @@ -2025,7 +2047,7 @@ where )); } let keyword_of = self.next_item()?; - let keyword_of = self.get_slice(&keyword_of)?; + let keyword_of = self.position_from(&keyword_of).into(); let right = self.parse_assignment_expr()?; let close_paren = self.expect_punct(Punct::CloseParen)?; let body_start = self.look_ahead_position; @@ -2051,7 +2073,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_loop_body(&mut self) -> Res> { + fn parse_loop_body(&mut self) -> Res>> { log::debug!( "{}: parse_loop_body {:?}", self.look_ahead.span.start, @@ -2065,7 +2087,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_do_while_stmt(&mut self) -> Res> { + fn parse_do_while_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_do_while_stmt {:?}", self.look_ahead.span.start, @@ -2101,29 +2123,38 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_break_stmt(&mut self) -> Res<(Slice<'b>, Option>, Option>)> { + fn parse_break_stmt(&mut self) -> Res<(Break, Option>>, Option)> { log::debug!( "{}: parse_break_stmt {:?}", self.look_ahead.span.start, self.look_ahead.token ); - self.parse_optionally_labeled_statement(Keyword::Break(())) + let (keyword, ident, semi) = self.parse_optionally_labeled_statement(Keyword::Break(()))?; + Ok((keyword.into(), ident, semi)) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_continue_stmt(&mut self) -> Res<(Slice<'b>, Option>, Option>)> { + fn parse_continue_stmt( + &mut self, + ) -> Res<(Continue, Option>>, Option)> { log::debug!( "{}: parse_continue_stmt {:?}", self.look_ahead.span.start, self.look_ahead.token ); - self.parse_optionally_labeled_statement(Keyword::Continue(())) + let (keyword, ident, semi) = + self.parse_optionally_labeled_statement(Keyword::Continue(()))?; + Ok((keyword.into(), ident, semi)) } fn parse_optionally_labeled_statement( &mut self, k: Keyword<()>, - ) -> Res<(Slice<'b>, Option>, Option>)> { + ) -> Res<( + resast::spanned::Position, + Option>>, + Option, + )> { log::debug!( "{}: parse_optionally_labeled_statement", self.look_ahead.span.start @@ -2132,18 +2163,18 @@ where let start = self.look_ahead_position; let label = if self.look_ahead.token.is_ident() && !self.context.has_line_term { let id = self.parse_var_ident(false)?; - if let Some(label_kind) = self.context.label_set.get(&*id.slice.source) { + if let Some(label_kind) = self.context.label_set.get(id.slice.source.as_ref()) { if k == Keyword::Continue(()) && label_kind != &LabelKind::Iteration { return Err(Error::ContinueOfNotIterationLabel( start, - id.slice.source.to_string(), + id.slice.source.as_ref().to_string(), )); } } else { return Err(Error::UnknownOptionalLabel( self.current_position, k, - id.slice.source.to_string(), + id.slice.source.as_ref().to_string(), )); } Some(id) @@ -2162,7 +2193,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_debugger_stmt(&mut self) -> Res> { + fn parse_debugger_stmt(&mut self) -> Res>> { log::debug!( "{}: parse_debugger_stmt {:?}", self.look_ahead.span.start, @@ -2177,7 +2208,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_labelled_statement(&mut self) -> Res> { + fn parse_labelled_statement(&mut self) -> Res>> { log::debug!("parse_labelled_statement, {:?}", self.look_ahead.token); let start = self.look_ahead.span; let pos = self.look_ahead_position; @@ -2199,11 +2230,11 @@ where .insert(label, LabelKind::Unknown) .is_some() { - return Err(self.redecl_error(&ident.slice.source)); + return Err(self.redecl_error(ident.slice.source.as_ref())); } let body = if self.at_keyword(Keyword::Class(())) { let class = self.next_item()?; - let keyword = self.get_slice(&class)?; + let keyword = self.position_from(&class).into(); if !self.config.tolerant { return self.unexpected_token_error(&class, ""); } @@ -2253,7 +2284,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_expression_statement(&mut self) -> Res<(Expr<'b>, Option>)> { + fn parse_expression_statement(&mut self) -> Res<(Expr>, Option)> { log::debug!( "{}: parse_expression_statement {:?}", self.look_ahead.span.start, @@ -2308,7 +2339,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_expression(&mut self) -> Res> { + fn parse_expression(&mut self) -> Res>> { log::debug!( "{}: parse_expression {:?}", self.look_ahead.span.start, @@ -2333,7 +2364,7 @@ where Ok(ret) } - fn parse_block(&mut self, new_scope: bool) -> Res> { + fn parse_block(&mut self, new_scope: bool) -> Res>> { log::debug!( "{}: parse_block {:?}", self.look_ahead.span.start, @@ -2373,7 +2404,7 @@ where }) } - fn parse_lexical_decl(&mut self, in_for: bool) -> Res> { + fn parse_lexical_decl(&mut self, in_for: bool) -> Res>> { log::debug!( "{}: parse_lexical_decl {:?}", self.look_ahead.span.start, @@ -2382,8 +2413,8 @@ where let next = self.next_item()?; let kind = match next.token { Token::Keyword(ref k) => match k { - Keyword::Let(_) => VarKind::Let(self.get_slice(&next)?), - Keyword::Const(_) => VarKind::Const(self.get_slice(&next)?), + Keyword::Let(_) => VarKind::Let(self.position_from(&next).into()), + Keyword::Const(_) => VarKind::Const(self.position_from(&next).into()), _ => return self.expected_token_error(&next, &["let", "const"]), }, _ => return self.expected_token_error(&next, &["let", "const"]), @@ -2401,7 +2432,7 @@ where &mut self, kind: &VarKind, in_for: bool, - ) -> Res>>> { + ) -> Res>>>> { log::debug!( "{}: parse_binding_list {:?}", self.look_ahead.span.start, @@ -2431,7 +2462,10 @@ where Ok(ret) } - fn parse_variable_decl_list(&mut self, in_for: bool) -> Res>>> { + fn parse_variable_decl_list( + &mut self, + in_for: bool, + ) -> Res>>>> { log::debug!( "{} parse_variable_decl_list in_for: {}", self.look_ahead.span.start, @@ -2450,14 +2484,18 @@ where Ok(ret) } - fn is_pat_ident(pat: &Pat) -> bool { + fn is_pat_ident(pat: &Pat>) -> bool { match pat { Pat::Ident(_) => true, _ => false, } } - fn parse_lexical_binding(&mut self, kind: &VarKind, in_for: bool) -> Res> { + fn parse_lexical_binding( + &mut self, + kind: &VarKind, + in_for: bool, + ) -> Res>> { log::debug!( "{}: parse_lexical_binding {:?}", self.look_ahead.span.start, @@ -2491,16 +2529,16 @@ where Ok(VarDecl { id, eq, init }) } - fn is_restricted(id: &Pat) -> bool { + fn is_restricted(id: &Pat>) -> bool { match id { Pat::Ident(ref ident) => { - ident.slice.source == "eval" || ident.slice.source == "arguments" + ident.slice.source.as_ref() == "eval" || ident.slice.source.as_ref() == "arguments" } _ => false, } } - fn parse_function_decl(&mut self, opt_ident: bool) -> Res> { + fn parse_function_decl(&mut self, opt_ident: bool) -> Res>> { log::debug!( "{}: parse_function_decl {:?}", self.look_ahead.span.start, @@ -2509,14 +2547,14 @@ where let start_pos = self.look_ahead_position; let keyword_async = if self.at_contextual_keyword("async") { let keyword_async = self.next_item()?; - self.slice_from(&keyword_async) + Some(self.position_from(&keyword_async).into()) } else { None }; let keyword = self.expect_keyword(Keyword::Function(()))?; let star = if self.at_punct(Punct::Asterisk) { let keyword_async = self.next_item()?; - self.slice_from(&keyword_async) + Some(self.position_from(&keyword_async).into()) } else { None }; @@ -2608,12 +2646,12 @@ where fn parse_func( &mut self, - keyword: Slice<'b>, + keyword: Function, is_stmt: bool, opt_id: bool, is_hanging: bool, - keyword_async: Option>, - ) -> Res> { + keyword_async: Option, + ) -> Res>> { log::debug!( "{} parse_func( is_stmt: {}, opt_id: {}, is_hanging: {}", self.look_ahead.span.start, @@ -2623,7 +2661,7 @@ where ); let star = if self.at_punct(Punct::Asterisk) { let star = self.next_item()?; - self.slice_from(&star) + Some(self.position_from(&star).into()) } else { None }; @@ -2739,7 +2777,7 @@ where log::trace!("{} add_scope {:?}", self.look_ahead.span.start, scope); self.context.lexical_names.new_child(scope); } - fn declare_pat(&mut self, pat: &Pat<'b>, kind: DeclKind, pos: Position) -> Res<()> { + fn declare_pat(&mut self, pat: &Pat>, kind: DeclKind, pos: Position) -> Res<()> { log::info!( "{} declare_pat {:?} {:?}", self.look_ahead.span.start, @@ -2768,7 +2806,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_function_source_el(&mut self) -> Res> { + fn parse_function_source_el(&mut self) -> Res>> { log::debug!( "{}: parse_function_source_el {:?}", self.look_ahead.span.start, @@ -2802,7 +2840,7 @@ where }) } - fn parse_class_decl(&mut self, opt_ident: bool, check_id: bool) -> Res> { + fn parse_class_decl(&mut self, opt_ident: bool, check_id: bool) -> Res>> { log::debug!( "{}: parse_class_decl {:?}", self.look_ahead.span.start, @@ -2870,7 +2908,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_class_body(&mut self) -> Res> { + fn parse_class_body(&mut self) -> Res>> { log::debug!( "{}: parse_class_body {:?}", self.look_ahead.span.start, @@ -2899,7 +2937,7 @@ where /// Parse a single class element returning a (true, Prop) if that property is a constructor /// and (false, Prop) otherwise #[tracing::instrument(level = "trace", skip(self))] - fn parse_class_el(&mut self, has_ctor: bool) -> Res> { + fn parse_class_el(&mut self, has_ctor: bool) -> Res>> { log::debug!( "{}: parse_class_el {:?}", self.look_ahead.span.start, @@ -2916,8 +2954,7 @@ where }; return self.method_def_cont(None, None, None, id); } - let slice = self.slice_from(&keyword_static); - slice + Some(self.position_from(&keyword_static).into()) } else { None }; @@ -2932,7 +2969,7 @@ where }; return self.method_def_cont(keyword_static, None, None, id); } - self.slice_from(&keyword_async) + Some(self.position_from(&keyword_async).into()) } else { None }; @@ -2940,7 +2977,7 @@ where let star = if self.at_punct(Punct::Asterisk) { log::debug!("found leading asterisk"); let star = self.next_item()?; - self.slice_from(&star) + Some(self.position_from(&star).into()) } else { None }; @@ -2995,7 +3032,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn prop_key_from(&self, item: &Item<&'b str>) -> Res> { + fn prop_key_from(&self, item: &Item<&'b str>) -> Res>> { let ret = match &item.token { Token::Boolean(_) => PropKey::Pat(Pat::Ident(self.get_slice(&item)?.into())), Token::EoF => return Err(Error::UnexpectedEoF), @@ -3015,9 +3052,9 @@ where #[tracing::instrument(level = "trace", skip(self))] fn method_def( &mut self, - keyword_static: Option>, - mut star: Option>, - ) -> Res> { + keyword_static: Option, + mut star: Option, + ) -> Res>> { log::debug!( "{}: method_def {:?}", self.look_ahead.span.start, @@ -3048,7 +3085,7 @@ where } else { if self.at_contextual_keyword("async") { let keyword = self.next_item()?; - let keyword = self.get_slice(&keyword)?; + let keyword = self.position_from(&keyword).into(); keyword_async = Some(keyword); } if self.at_punct(Punct::Asterisk) { @@ -3068,15 +3105,15 @@ where #[tracing::instrument(level = "trace", skip(self))] fn get_method_def( &mut self, - keyword_static: Option>, + keyword_static: Option, item_get: Item<&'b str>, - ) -> Res> { + ) -> Res>> { log::debug!( "{}: get_method_def {:?}", self.look_ahead.span.start, self.look_ahead.token ); - let keyword_get = self.get_slice(&item_get)?; + let keyword_get = self.position_from(&item_get).into(); let id = self.parse_object_property_key()?; let open_paren = self.expect_punct(Punct::OpenParen)?; let close_paren = self.expect_punct(Punct::CloseParen)?; @@ -3096,15 +3133,15 @@ where #[tracing::instrument(level = "trace", skip(self))] fn set_method_def( &mut self, - keyword_static: Option>, + keyword_static: Option, item_set: Item<&'b str>, - ) -> Res> { + ) -> Res>> { log::debug!( "{}: set_method_def {:?}", self.look_ahead.span.start, self.look_ahead.token ); - let keyword_set = self.get_slice(&item_set)?; + let keyword_set = self.position_from(&item_set).into(); let id = self.parse_object_property_key()?; self.add_scope(lexical_names::Scope::FuncTop); let mut params = self.parse_formal_params()?; @@ -3115,8 +3152,8 @@ where if Self::is_rest(&arg.item) { let loc = arg.loc(); return Err(Error::InvalidSetterParams(Position { - line: loc.start.line, - column: loc.start.column, + line: loc.start.line as _, + column: loc.start.column as _, })); } @@ -3136,11 +3173,11 @@ where #[tracing::instrument(level = "trace", skip(self))] fn method_def_cont( &mut self, - keyword_static: Option>, - keyword_async: Option>, - star: Option>, - id: PropInitKey<'b>, - ) -> Res> { + keyword_static: Option, + keyword_async: Option, + star: Option, + id: PropInitKey>, + ) -> Res>> { log::debug!( "{}: method_def_cont {:?}", self.look_ahead.span.start, @@ -3187,7 +3224,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_class_ctor(&mut self, id: PropInitKey<'b>) -> Res> { + fn parse_class_ctor(&mut self, id: PropInitKey>) -> Res>> { log::debug!( "{}: parse_class_ctor {:?}", self.look_ahead.span.start, @@ -3214,19 +3251,19 @@ where /// match, this takes into account all of the /// different shapes that `key` could be, including /// identifiers and literals - fn is_key(key: &PropKey, other: &str) -> bool { + fn is_key(key: &PropKey>, other: &str) -> bool { log::trace!("is_key: {:?} <-> {}", key, other); match key { PropKey::Lit(ref l) => match l { - Lit::String(ref s) => s.content.source == other, + Lit::String(ref s) => s.content.source.as_ref() == other, _ => false, }, PropKey::Expr(ref e) => match e { - Expr::Ident(ref s) => s.slice.source == other, + Expr::Ident(ref s) => s.slice.source.as_ref() == other, _ => false, }, PropKey::Pat(ref p) => match p { - Pat::Ident(ref s) => s.slice.source == other, + Pat::Ident(ref s) => s.slice.source.as_ref() == other, _ => false, }, } @@ -3235,9 +3272,9 @@ where #[tracing::instrument(level = "trace", skip(self))] fn parse_async_property_method( &mut self, - keyword_async: Slice<'b>, - id: PropInitKey<'b>, - ) -> Res> { + keyword_async: Async, + id: PropInitKey>, + ) -> Res>> { log::debug!( "{}: parse_property_method_async_fn", self.look_ahead.span.start @@ -3271,7 +3308,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_property_method(&mut self, id: PropInitKey<'b>) -> Res> { + fn parse_property_method( + &mut self, + id: PropInitKey>, + ) -> Res>> { log::debug!( "{}: parse_property_method {:?}", self.look_ahead.span.start, @@ -3308,10 +3348,10 @@ where #[tracing::instrument(level = "trace", skip(self))] fn parse_getter_method( &mut self, - key: PropInitKey<'b>, - keyword_static: Option>, - keyword_get: Slice<'b>, - ) -> Res> { + key: PropInitKey>, + keyword_static: Option, + keyword_get: Get, + ) -> Res>> { log::debug!( "{}: parse_getter_method {:?}", self.look_ahead.span.start, @@ -3345,7 +3385,11 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_method_body(&mut self, simple: bool, found_restricted: bool) -> Res> { + fn parse_method_body( + &mut self, + simple: bool, + found_restricted: bool, + ) -> Res>> { log::debug!( "{}: parse_method_body {:?}", self.look_ahead.span.start, @@ -3371,10 +3415,10 @@ where #[tracing::instrument(level = "trace", skip(self))] fn parse_setter_method( &mut self, - keyword_static: Option>, - keyword_set: Slice<'b>, - key: PropInitKey<'b>, - ) -> Res> { + keyword_static: Option, + keyword_set: Set, + key: PropInitKey>, + ) -> Res>> { log::debug!( "{}: parse_setter_method {:?}", self.look_ahead.span.start, @@ -3411,7 +3455,7 @@ where })) } - fn is_rest(arg: &FuncArg) -> bool { + fn is_rest(arg: &FuncArg>) -> bool { match arg { FuncArg::Expr(ref e) => match e { Expr::Spread(_) => true, @@ -3427,7 +3471,7 @@ where &mut self, simple: bool, found_restricted: bool, - ) -> Res> { + ) -> Res>> { log::debug!( "{}: parse_property_method_fn {:?}", self.look_ahead.span.start, @@ -3463,7 +3507,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_object_property_key(&mut self) -> Res> { + fn parse_object_property_key(&mut self) -> Res>> { log::debug!( "{}: parse_object_property_key {:?}", self.look_ahead.span.start, @@ -3530,7 +3574,7 @@ where } else { PropKey::Expr(key) }; - let open_bracket = self.get_slice(&item)?; + let open_bracket = self.position_from(&item).into(); let close_bracket = self.expect_punct(Punct::CloseBracket)?; let id = PropInitKey { brackets: Some((open_bracket, close_bracket)), @@ -3583,7 +3627,7 @@ where Ok(()) } - fn is_valid_property_key_lit(expr: &Expr) -> bool { + fn is_valid_property_key_lit(expr: &Expr>) -> bool { match expr { Expr::Lit(ref l) => match l { Lit::String(_) | Lit::Number(_) | Lit::Boolean(_) => true, @@ -3594,7 +3638,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_primary_expression(&mut self) -> Res> { + fn parse_primary_expression(&mut self) -> Res>> { log::debug!( "{}: parse_primary_expression {:?}", self.look_ahead.span.start, @@ -3653,7 +3697,12 @@ where self.context.set_is_binding_element(false); let item = self.next_item()?; let lit = match item.token { - Token::Boolean(_) => Lit::Boolean(self.get_slice(&item)?), + Token::Boolean(Boolean::True) => Lit::Boolean( + resast::spanned::expr::Boolean::True(self.position_from(&item).into()), + ), + Token::Boolean(Boolean::False) => Lit::Boolean( + resast::spanned::expr::Boolean::False(self.position_from(&item).into()), + ), _ => unreachable!(), }; Ok(Expr::Lit(lit)) @@ -3661,7 +3710,7 @@ where self.context.set_is_assignment_target(false); self.context.set_is_binding_element(false); let item = self.next_item()?; - Ok(Expr::Lit(Lit::Null(self.get_slice(&item)?))) + Ok(Expr::Lit(Lit::Null(self.position_from(&item).into()))) } else if self.look_ahead.is_template() { let lit = self.parse_template_lit(false)?; Ok(Expr::Lit(Lit::Template(lit))) @@ -3684,7 +3733,7 @@ where let lit = match ®ex.token { Token::RegEx(_) => { let slice = self.get_slice(®ex)?; - crate::regex::validate_regex(&slice.source)?; + crate::regex::validate_regex(slice.source.as_ref())?; self.regex_lit_from(®ex)? } _ => unreachable!(), @@ -3707,7 +3756,7 @@ where self.parse_function_expr() } else if self.at_keyword(Keyword::This(())) { let item = self.next_item()?; - let slice = self.get_slice(&item)?; + let slice = self.position_from(&item).into(); Ok(Expr::This(slice)) } else if self.at_keyword(Keyword::Class(())) { let cls = self.parse_class_decl(true, false)?; @@ -3744,7 +3793,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_group_expr(&mut self) -> Res> { + fn parse_group_expr(&mut self) -> Res>> { log::debug!( "{}: parse_group_expr {:?}", self.look_ahead.span.start, @@ -3754,7 +3803,7 @@ where if self.at_punct(Punct::CloseParen) { let close_paren = self.expect_punct(Punct::CloseParen)?; if !self.at_punct(Punct::EqualGreaterThan) { - self.expect_punct(Punct::EqualGreaterThan)?; + self.expect_punct::(Punct::EqualGreaterThan)?; } let inner = ArrowParamPlaceHolder { keyword: None, @@ -3770,7 +3819,7 @@ where let arg = FuncArg::Rest(Box::new(expr)); let close_paren = self.expect_punct(Punct::CloseParen)?; if !self.at_punct(Punct::EqualGreaterThan) { - self.expect_punct(Punct::EqualGreaterThan)?; + self.expect_punct::(Punct::EqualGreaterThan)?; } let inner = ArrowParamPlaceHolder { keyword: None, @@ -3948,7 +3997,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn convert_expr_to_func_arg_strict(&self, expr: Expr<'b>) -> Res> { + fn convert_expr_to_func_arg_strict( + &self, + expr: Expr>, + ) -> Res>> { if !self.context.strict { return Ok(FuncArg::Expr(expr)); } @@ -3967,7 +4019,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_array_init(&mut self) -> Res> { + fn parse_array_init(&mut self) -> Res>> { log::debug!( "{}: parse_array_init {:?}", self.look_ahead.span.start, @@ -4020,7 +4072,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_obj_init(&mut self) -> Res> { + fn parse_obj_init(&mut self) -> Res>> { log::debug!( "{}: parse_obj_init {:?}", self.look_ahead.span.start, @@ -4068,7 +4120,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_obj_prop(&mut self) -> Res<(bool, ObjProp<'b>)> { + fn parse_obj_prop(&mut self) -> Res<(bool, ObjProp>)> { log::debug!( "{}: parse_obj_prop {:?}", self.look_ahead.span.start, @@ -4127,103 +4179,108 @@ where }; let at_qualified = self.at_qualified_prop_key(); let prev_super = self.context.allow_super; - let prop = - if keyword_get.is_some() && at_qualified && keyword_async.is_none() && star.is_none() { - let keyword_get = keyword_get.unwrap(); - let key = self.parse_object_property_key()?; - self.context.set_allow_super(true); - let value = self.parse_getter_method(key, None, keyword_get)?; - self.context.set_allow_super(prev_super); - ObjProp::Prop(value) - } else if keyword_set.is_some() && at_qualified && keyword_async.is_none() { - let keyword_set = keyword_set.unwrap(); - let key = self.parse_object_property_key()?; + let prop = if keyword_get.is_some() + && at_qualified + && keyword_async.is_none() + && star.is_none() + { + let keyword_get = keyword_get.unwrap(); + let keyword_get = keyword_get.loc.start.into(); + let key = self.parse_object_property_key()?; + self.context.set_allow_super(true); + let value = self.parse_getter_method(key, None, keyword_get)?; + self.context.set_allow_super(prev_super); + ObjProp::Prop(value) + } else if keyword_set.is_some() && at_qualified && keyword_async.is_none() { + let keyword_set = keyword_set.unwrap(); + let keyword_set = keyword_set.loc.start.into(); + let key = self.parse_object_property_key()?; + self.context.set_allow_super(true); + let value = self.parse_setter_method(None, keyword_set, key)?; + self.context.set_allow_super(prev_super); + ObjProp::Prop(value) + } else if star.is_some() && at_qualified { + let value = self.method_def(None, star)?; + ObjProp::Prop(value) + } else if let Some(key) = key { + if self.at_punct(Punct::Colon) && keyword_async.is_none() { + if !computed && Self::is_proto_(&key.value) { + is_proto = true; + } + let colon = self.expect_punct(Punct::Colon)?; + let value = inherit_cover_grammar!(self, parse_assignment_expr)?; + let value = PropValue::Expr(value); + let prop = PropInit { + key, + colon: Some(colon), + value: Some(value), + }; + ObjProp::Prop(Prop::Init(prop)) + } else if self.at_punct(Punct::OpenParen) { self.context.set_allow_super(true); - let value = self.parse_setter_method(None, keyword_set, key)?; + let value = if let Some(keyword_async) = keyword_async { + self.parse_async_property_method(keyword_async.loc.start.into(), key.clone())? + } else { + self.parse_property_method(key)? + }; self.context.set_allow_super(prev_super); - ObjProp::Prop(value) - } else if star.is_some() && at_qualified { - let value = self.method_def(None, star)?; - ObjProp::Prop(value) - } else if let Some(key) = key { - if self.at_punct(Punct::Colon) && keyword_async.is_none() { - if !computed && Self::is_proto_(&key.value) { - is_proto = true; - } - let colon = self.expect_punct(Punct::Colon)?; - let value = inherit_cover_grammar!(self, parse_assignment_expr)?; - let value = PropValue::Expr(value); + + ObjProp::Prop(Prop::Method(value)) + } else if start.token.is_ident() + || start.token == Token::Keyword(Keyword::Yield("yield")) + || (!self.context.strict && start.token.matches_keyword(Keyword::Let(()))) + { + if self.at_punct(Punct::Equal) { + self.context.first_covert_initialized_name_error = + Some(self.look_ahead.clone()); + let operator = AssignOp::Equal(self.expect_punct(Punct::Equal)?); + let inner = isolate_cover_grammar!(self, parse_assignment_expr)?; + let value = if let Token::Ident(_) = &start.token { + let slice = self.get_slice(&start)?; + let p = AssignPat { + left: Box::new(Pat::Ident(slice.into())), + operator, + right: Box::new(inner), + }; + PropValue::Pat(Pat::Assign(p)) + } else { + PropValue::Expr(inner) + }; + // self.set_isolate_cover_grammar_state(prev_bind, prev_assign, prev_first)?; let prop = PropInit { key, - colon: Some(colon), + colon: None, value: Some(value), }; ObjProp::Prop(Prop::Init(prop)) - } else if self.at_punct(Punct::OpenParen) { - self.context.set_allow_super(true); - let value = if let Some(keyword_async) = keyword_async { - self.parse_async_property_method(keyword_async, key.clone())? - } else { - self.parse_property_method(key)? - }; - self.context.set_allow_super(prev_super); - - ObjProp::Prop(Prop::Method(value)) - } else if start.token.is_ident() - || start.token == Token::Keyword(Keyword::Yield("yield")) - || (!self.context.strict && start.token.matches_keyword(Keyword::Let(()))) - { - if self.at_punct(Punct::Equal) { - self.context.first_covert_initialized_name_error = - Some(self.look_ahead.clone()); - let operator = AssignOp::Equal(self.expect_punct(Punct::Equal)?); - let inner = isolate_cover_grammar!(self, parse_assignment_expr)?; - let value = if let Token::Ident(_) = &start.token { - let slice = self.get_slice(&start)?; - let p = AssignPat { - left: Box::new(Pat::Ident(slice.into())), - operator, - right: Box::new(inner), - }; - PropValue::Pat(Pat::Assign(p)) - } else { - PropValue::Expr(inner) - }; - // self.set_isolate_cover_grammar_state(prev_bind, prev_assign, prev_first)?; - let prop = PropInit { - key, - colon: None, - value: Some(value), - }; - ObjProp::Prop(Prop::Init(prop)) - } else { - let prop = Prop::Init(PropInit { - key, - colon: None, - value: None, - }); - - ObjProp::Prop(prop) - } } else { - return self.expected_token_error(&start, &["object property value"]); + let prop = Prop::Init(PropInit { + key, + colon: None, + value: None, + }); + + ObjProp::Prop(prop) } } else { - return self.expected_token_error(&start, &["object property key"]); - }; + return self.expected_token_error(&start, &["object property value"]); + } + } else { + return self.expected_token_error(&start, &["object property key"]); + }; log::trace!("prop: {:?}", prop); Ok((is_proto, prop)) } - fn is_proto_(key: &PropKey) -> bool { + fn is_proto_(key: &PropKey>) -> bool { log::trace!("is_proto {:?}", key); match key { PropKey::Lit(ref l) => match l { - Lit::String(ref s) => s.content.source == "__proto__", + Lit::String(ref s) => s.content.source.as_ref() == "__proto__", _ => false, }, PropKey::Expr(Expr::Ident(ref ident)) | PropKey::Pat(Pat::Ident(ref ident)) => { - ident.slice.source == "__proto__" + ident.slice.source.as_ref() == "__proto__" } _ => false, } @@ -4241,7 +4298,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_template_lit(&mut self, is_tagged: bool) -> Res> { + fn parse_template_lit(&mut self, is_tagged: bool) -> Res>> { log::debug!( "{}: parse_template_Lit {:?}", self.look_ahead.span.start, @@ -4268,8 +4325,7 @@ where }) } - #[tracing::instrument(level = "trace", skip(self))] - fn parse_template_element(&mut self, is_tagged: bool) -> Res> { + fn parse_template_element(&mut self, is_tagged: bool) -> Res>> { log::debug!( "{}: parse_template_element {:?}", self.look_ahead.span.start, @@ -4279,28 +4335,30 @@ where let item = self.next_item()?; if let Token::Template(t) = &item.token { let raw = self.get_slice(&item)?; - let (cooked, lit) = match t { - Template::Head(c) | Template::Middle(c) => ( - Slice { - loc: SourceLocation { - start: raw.loc.start + Position { line: 0, column: 1 }, - end: raw.loc.end - Position { line: 0, column: 2 }, - }, - source: Cow::Borrowed(c.content), - }, - c, + let start_pos = raw.loc.start; + let (open_quote, lit, close_quote) = match t { + Template::NoSub(inner) => ( + QuasiQuote::BackTick(start_pos.into()), + inner, + QuasiQuote::BackTick((raw.loc.end - Position { line: 0, column: 1 }).into()), ), - Template::Tail(c) | Template::NoSub(c) => ( - Slice { - loc: SourceLocation { - start: raw.loc.start + Position { line: 0, column: 1 }, - end: raw.loc.end - Position { line: 0, column: 1 }, - }, - source: Cow::Borrowed(c.content), - }, - c, + Template::Head(inner) => ( + QuasiQuote::BackTick(start_pos.into()), + inner, + QuasiQuote::OpenBrace((raw.loc.end - Position { line: 0, column: 2 }).into()), + ), + Template::Middle(inner) => ( + QuasiQuote::CloseBrace(start_pos.into()), + inner, + QuasiQuote::OpenBrace((raw.loc.end - Position { line: 0, column: 2 }).into()), + ), + Template::Tail(inner) => ( + QuasiQuote::CloseBrace(start_pos.into()), + inner, + QuasiQuote::BackTick((raw.loc.end - Position { line: 0, column: 1 }).into()), ), }; + if !is_tagged && lit.contains_octal_escape { return Err(Error::OctalLiteral(item.location.start)); } @@ -4313,15 +4371,25 @@ where "Invalid unicode escape in template literal".to_string(), )); } - - Ok(TemplateElement { cooked, raw }) + let content = Slice { + source: Cow::Borrowed(lit.content).into(), + loc: SourceLocation { + start: open_quote.end(), + end: close_quote.start(), + }, + }; + Ok(TemplateElement { + open_quote, + content, + close_quote, + }) } else { self.expected_token_error(&self.look_ahead, &["Template part"]) } } #[tracing::instrument(level = "trace", skip(self))] - fn parse_function_expr(&mut self) -> Res> { + fn parse_function_expr(&mut self) -> Res>> { log::debug!( "{}: parse_function_expr {:?}", self.look_ahead.span.start, @@ -4331,7 +4399,7 @@ where let is_async = self.at_contextual_keyword("async"); let keyword_async = if self.at_contextual_keyword("async") { let keyword = self.next_item()?; - self.slice_from(&keyword) + Some(self.position_from(&keyword).into()) } else { None }; @@ -4428,7 +4496,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_fn_name(&mut self, is_gen: bool) -> Res> { + fn parse_fn_name(&mut self, is_gen: bool) -> Res>> { log::debug!( "{}: parse_fn_name {:?}", self.look_ahead.span.start, @@ -4442,7 +4510,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_ident_name(&mut self) -> Res> { + fn parse_ident_name(&mut self) -> Res>> { log::debug!( "{}: parse_ident_name {:?}", self.look_ahead.span.start, @@ -4459,7 +4527,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_var_ident(&mut self, is_var: bool) -> Res> { + fn parse_var_ident(&mut self, is_var: bool) -> Res>> { log::debug!( "{}: parse_var_ident {:?}", self.look_ahead.span.start, @@ -4476,7 +4544,7 @@ where ident.location.start, format!( "{} is a strict reserved word", - self.get_slice(&ident)?.source, + self.get_slice(&ident)?.source.as_ref(), ), )); } else if self.context.strict @@ -4567,7 +4635,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_formal_param(&mut self, simple: bool) -> Res<(bool, bool, FuncArg<'b>)> { + fn parse_formal_param(&mut self, simple: bool) -> Res<(bool, bool, FuncArg>)> { log::debug!( "{}: parse_formal_param {:?}", self.look_ahead.span.start, @@ -4589,7 +4657,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_rest_element(&mut self, params: &mut Vec>) -> Res<(bool, RestPat<'b>)> { + fn parse_rest_element( + &mut self, + params: &mut Vec>, + ) -> Res<(bool, RestPat>)> { log::debug!( "{}: parse_rest_element {:?}", self.look_ahead.span.start, @@ -4608,7 +4679,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_binding_rest_el(&mut self, params: &mut Vec>) -> Res> { + fn parse_binding_rest_el( + &mut self, + params: &mut Vec>, + ) -> Res>> { log::debug!( "{}: parse_binding_rest_el {:?}", self.look_ahead.span.start, @@ -4623,7 +4697,7 @@ where fn parse_pattern_with_default( &mut self, params: &mut Vec>, - ) -> Res<(bool, Pat<'b>)> { + ) -> Res<(bool, Pat>)> { log::debug!( "{}: parse_pattern_with_default {:?}", self.look_ahead.span.start, @@ -4653,7 +4727,7 @@ where &mut self, is_var: bool, params: &mut Vec>, - ) -> Res<(bool, Pat<'b>)> { + ) -> Res<(bool, Pat>)> { log::debug!( "{}: parse_pattern {:?}", self.look_ahead.span.start, @@ -4665,17 +4739,21 @@ where self.parse_object_pattern() } else { let ident = self.parse_var_ident(is_var)?; - if !is_var && ident.slice.source == "let" { + if !is_var && ident.slice.source.as_ref() == "let" { return self.expected_token_error(&self.look_ahead, &["identifier"]); } - let restricted = ident.slice.source == "eval" || ident.slice.source == "arguments"; + let restricted = + ident.slice.source.as_ref() == "eval" || ident.slice.source.as_ref() == "arguments"; params.push(self.look_ahead.clone()); Ok((restricted, Pat::Ident(ident))) } } #[tracing::instrument(level = "trace", skip(self))] - fn parse_array_pattern(&mut self, params: &mut Vec>) -> Res<(bool, Pat<'b>)> { + fn parse_array_pattern( + &mut self, + params: &mut Vec>, + ) -> Res<(bool, Pat>)> { log::debug!( "{}: parse_array_pattern {:?}", self.look_ahead.span.start, @@ -4685,14 +4763,13 @@ where let mut elements = Vec::new(); while !self.at_punct(Punct::CloseBracket) { if self.at_punct(Punct::Comma) { - let comma = self.slice_from(&self.look_ahead); - let _ = self.next_item()?; + let comma = Some(self.expect_punct(Punct::Comma)?); elements.push(ListEntry { item: None, comma }); } else { if self.at_punct(Punct::Ellipsis) { let el = self.parse_binding_rest_el(params)?; let comma = if self.at_punct(Punct::Comma) { - self.slice_from(&self.look_ahead) + Some(self.expect_punct(Punct::Comma)?) } else { None }; @@ -4705,8 +4782,11 @@ where } else { let (_, el) = self.parse_pattern_with_default(params)?; let comma = if self.at_punct(Punct::Comma) { - self.slice_from(&self.look_ahead) + Some(self.expect_punct(Punct::Comma)?) } else { + if !self.at_punct(Punct::CloseBracket) { + self.expect_punct::(Punct::Comma)?; + } None }; let ele = ListEntry { @@ -4715,9 +4795,7 @@ where }; elements.push(ele); } - if !self.at_punct(Punct::CloseBracket) { - self.expect_punct(Punct::Comma)?; - } + } } let close_bracket = self.expect_punct(Punct::CloseBracket)?; @@ -4730,7 +4808,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_object_pattern(&mut self) -> Res<(bool, Pat<'b>)> { + fn parse_object_pattern(&mut self) -> Res<(bool, Pat>)> { log::debug!( "{}: parse_object_pattern {:?}", self.look_ahead.span.start, @@ -4761,7 +4839,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_rest_prop(&mut self) -> Res> { + fn parse_rest_prop(&mut self) -> Res>> { log::debug!( "{}: parse_rest_prop {:?}", self.look_ahead.span.start, @@ -4781,7 +4859,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_property_pattern(&mut self) -> Res> { + fn parse_property_pattern(&mut self) -> Res>> { log::debug!( "{}: parse_property_pattern {:?}", self.look_ahead.span.start, @@ -4826,7 +4904,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_assignment_expr(&mut self) -> Res> { + fn parse_assignment_expr(&mut self) -> Res>> { log::debug!( "{}: parse_assignment_expr {:?}", self.look_ahead.span.start, @@ -4862,7 +4940,7 @@ where let arg = self.reinterpret_expr_as_pat(arg)?; let arg = FuncArg::Pat(arg); let inner = ArrowParamPlaceHolder { - keyword: keyword.clone(), + keyword: keyword.as_ref().map(|k| k.loc.start.into()), args: vec![ListEntry::no_comma(arg)], open_paren: None, close_paren: None, @@ -4919,7 +4997,7 @@ where self.context.allow_in = prev_in; self.context.allow_strict_directive = prev_strict; let afe = ArrowFuncExpr { - keyword: keyword.clone(), + keyword: keyword.map(|k| k.loc.start.into()), star: None, open_paren: params.open_paren, params: params.params, @@ -4933,7 +5011,7 @@ where self.context.allow_await = prev_await; self.remove_scope(); current = Expr::ArrowFunc(ArrowFuncExpr { - keyword, + keyword: keyword.map(|k| k.loc.start.into()), star: None, open_paren: params.open_paren, params: params.params, @@ -4957,7 +5035,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_assignment_after_start(&mut self, start: Expr<'b>) -> Res> { + fn parse_assignment_after_start( + &mut self, + start: Expr>, + ) -> Res>> { if self.context.strict && Self::is_ident(&start) { if let Expr::Ident(ref i) = start { if Self::is_restricted_word(i) || Self::is_strict_reserved(i) { @@ -5014,7 +5095,7 @@ where } /// Check if an arg is a strict mode restricted identifier /// returns true if the arg _is_ an error - fn check_arg_strict_mode(arg: &FuncArg<'b>) -> bool { + fn check_arg_strict_mode(arg: &FuncArg>) -> bool { match arg { FuncArg::Expr(Expr::Ident(ref ident)) | FuncArg::Pat(Pat::Ident(ref ident)) => { ident.name() == "arguments" || ident.name() == "eval" @@ -5023,22 +5104,22 @@ where } } - fn assignment_operator(&self, p: Punct, item: &Item<&'b str>) -> Option> { - let slice = self.slice_from(item)?; + fn assignment_operator(&self, p: Punct, item: &Item<&'b str>) -> Option { + let slice = self.position_from(item); match p { - Punct::Equal => Some(AssignOp::Equal(slice)), - Punct::PlusEqual => Some(AssignOp::PlusEqual(slice)), - Punct::DashEqual => Some(AssignOp::MinusEqual(slice)), - Punct::AsteriskEqual => Some(AssignOp::TimesEqual(slice)), - Punct::ForwardSlashEqual => Some(AssignOp::DivEqual(slice)), - Punct::PercentEqual => Some(AssignOp::ModEqual(slice)), - Punct::DoubleLessThanEqual => Some(AssignOp::LeftShiftEqual(slice)), - Punct::DoubleGreaterThanEqual => Some(AssignOp::RightShiftEqual(slice)), - Punct::TripleGreaterThanEqual => Some(AssignOp::UnsignedRightShiftEqual(slice)), - Punct::PipeEqual => Some(AssignOp::OrEqual(slice)), - Punct::CaretEqual => Some(AssignOp::XOrEqual(slice)), - Punct::AmpersandEqual => Some(AssignOp::AndEqual(slice)), - Punct::DoubleAsteriskEqual => Some(AssignOp::PowerOfEqual(slice)), + Punct::Equal => Some(AssignOp::Equal(slice.into())), + Punct::PlusEqual => Some(AssignOp::PlusEqual(slice.into())), + Punct::DashEqual => Some(AssignOp::MinusEqual(slice.into())), + Punct::AsteriskEqual => Some(AssignOp::TimesEqual(slice.into())), + Punct::ForwardSlashEqual => Some(AssignOp::DivEqual(slice.into())), + Punct::PercentEqual => Some(AssignOp::ModEqual(slice.into())), + Punct::DoubleLessThanEqual => Some(AssignOp::LeftShiftEqual(slice.into())), + Punct::DoubleGreaterThanEqual => Some(AssignOp::RightShiftEqual(slice.into())), + Punct::TripleGreaterThanEqual => Some(AssignOp::UnsignedRightShiftEqual(slice.into())), + Punct::PipeEqual => Some(AssignOp::OrEqual(slice.into())), + Punct::CaretEqual => Some(AssignOp::XOrEqual(slice.into())), + Punct::AmpersandEqual => Some(AssignOp::AndEqual(slice.into())), + Punct::DoubleAsteriskEqual => Some(AssignOp::PowerOfEqual(slice.into())), _ => None, } } @@ -5049,7 +5130,7 @@ where #[tracing::instrument(level = "trace", skip(self))] fn reinterpret_as_cover_formals_list( &mut self, - expr: Expr<'b>, + expr: Expr>, pos: Position, ) -> Res> { let mut formals_list = if let Expr::Ident(ref ident) = expr { @@ -5113,7 +5194,12 @@ where "strict reserved word as an identifier".to_string(), )); } - let ident = y.keyword.clone().into(); + let ident = resast::spanned::Ident { + slice: Slice { + loc: y.loc(), + source: Cow::Borrowed("yield").into(), + }, + }; let entry = ListEntry { item: FuncArg::Pat(Pat::Ident(ident)), comma: param.comma, @@ -5144,7 +5230,12 @@ where "strict reserved word as an identifier".to_string(), )); } - let ident = y.keyword.clone().into(); + let ident = resast::spanned::Ident { + slice: Slice { + loc: y.loc(), + source: Cow::Borrowed("yield").into(), + }, + }; let entry = ListEntry { item: FuncArg::Pat(Pat::Ident(ident)), comma: param.comma, @@ -5248,21 +5339,21 @@ where Ok(formals_list) } - fn is_await(arg: &FuncArg) -> bool { + fn is_await(arg: &FuncArg>) -> bool { match arg { FuncArg::Expr(ref e) => match e { - Expr::Ident(ref i) => i.slice.source == "await", + Expr::Ident(ref i) => i.slice.source.as_ref() == "await", _ => false, }, FuncArg::Pat(ref p) => match p { - Pat::Ident(ref i) => i.slice.source == "await", + Pat::Ident(ref i) => i.slice.source.as_ref() == "await", _ => false, }, FuncArg::Rest(_) => false, } } - fn is_assignment(arg: &FuncArg) -> bool { + fn is_assignment(arg: &FuncArg>) -> bool { match arg { FuncArg::Pat(ref p) => match p { Pat::Assign(_) => true, @@ -5275,7 +5366,7 @@ where FuncArg::Rest(_) => false, } } - pub fn is_simple(arg: &FuncArg) -> bool { + pub fn is_simple(arg: &FuncArg>) -> bool { match arg { FuncArg::Pat(ref p) => match p { Pat::Ident(_) => true, @@ -5289,7 +5380,7 @@ where } } - fn is_invalid_await(arg: &FuncArg) -> bool { + fn is_invalid_await(arg: &FuncArg>) -> bool { match arg { FuncArg::Expr(Expr::Assign(AssignExpr { right, .. })) | FuncArg::Pat(Pat::Assign(AssignPat { right, .. })) => match &**right { @@ -5312,7 +5403,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn reinterpret_expr_as_pat(&self, ex: Expr<'b>) -> Res> { + fn reinterpret_expr_as_pat(&self, ex: Expr>) -> Res>> { log::debug!( "{}: reinterpret_expr_as_pat {:?}", self.look_ahead.span.start, @@ -5392,7 +5483,10 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn reinterpret_array_pat_part(&self, part: Expr<'b>) -> Res> { + fn reinterpret_array_pat_part( + &self, + part: Expr>, + ) -> Res>> { log::debug!( "{}: reinterpret_array_pat_part {:?}", self.look_ahead.span.start, @@ -5415,7 +5509,7 @@ where Ok(ret) } - fn is_reinterpret_target(ex: &Expr) -> bool { + fn is_reinterpret_target(ex: &Expr>) -> bool { match ex { Expr::Ident(_) => true, Expr::Spread(ref s) => Self::is_reinterpret_target(&s.expr), @@ -5430,7 +5524,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn reinterpret_prop(&self, mut p: Prop<'b>) -> Res> { + fn reinterpret_prop(&self, mut p: Prop>) -> Res>> { if let Prop::Init(inner) = &mut p { let prop_key = std::mem::replace(&mut inner.key.value, Self::dummy_prop_key()); if let PropKey::Expr(expr) = prop_key { @@ -5457,34 +5551,28 @@ where Ok(p) } - fn dummy_prop_key() -> PropKey<'static> { - use resast::spanned::{Position, SourceLocation}; + fn dummy_prop_key() -> PropKey> { + use resast::spanned::Position; let zero = Position { line: 0, column: 0 }; - PropKey::Expr(Expr::This(Slice { - source: Cow::Borrowed(""), - loc: SourceLocation { - start: zero, - end: zero, - }, - })) + PropKey::Expr(Expr::This(zero.into())) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_yield_expr(&mut self) -> Res> { + fn parse_yield_expr(&mut self) -> Res>> { log::debug!( "{}: parse_yield_expr {:?}", self.look_ahead.span.start, self.look_ahead.token ); let keyword = self.expect_keyword(Keyword::Yield(()))?; - let mut argument: Option> = None; + let mut argument: Option>>> = None; let mut star = None; if !self.context.has_line_term { let prev_yield = self.context.allow_yield; self.context.allow_yield = false; if self.at_punct(Punct::Asterisk) { let start = self.next_item()?; - star = Some(self.get_slice(&start)?); + star = Some(self.position_from(&start).into()); argument = Some(Box::new(self.parse_assignment_expr()?)); } else if self.is_start_of_expr() { argument = Some(Box::new(self.parse_assignment_expr()?)); @@ -5500,7 +5588,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_conditional_expr(&mut self) -> Res> { + fn parse_conditional_expr(&mut self) -> Res>> { log::debug!( "{}: parse_conditional_expr {:?}", self.look_ahead.span.start, @@ -5532,7 +5620,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_binary_expression(&mut self) -> Res> { + fn parse_binary_expression(&mut self) -> Res>> { log::debug!( "{}: parse_binary_expression {:?}", self.look_ahead.span.start, @@ -5633,7 +5721,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_exponentiation_expression(&mut self) -> Res> { + fn parse_exponentiation_expression(&mut self) -> Res>> { log::debug!( "{}: parse_exponentiation_expression", self.look_ahead.span.start @@ -5648,7 +5736,7 @@ where )); } let stars = self.next_item()?; - let stars = self.get_slice(&stars)?; + let stars = self.position_from(&stars).into(); self.context.set_is_assignment_target(false); self.context.set_is_binding_element(false); let left = expr; @@ -5664,7 +5752,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_unary_expression(&mut self) -> Res> { + fn parse_unary_expression(&mut self) -> Res>> { log::debug!( "{}: parse_unary_expression {:?} allow_await: {}", self.look_ahead.span.start, @@ -5707,66 +5795,66 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn unary_operator(&self, item: Item<&str>) -> Option> { - let slice = self.slice_from(&item)?; + fn unary_operator(&self, item: Item<&str>) -> Option { + let slice = self.position_from(&item); match &item.token { Token::Punct(ref p) => match p { - Punct::Dash => Some(UnaryOp::Minus(slice)), - Punct::Plus => Some(UnaryOp::Plus(slice)), - Punct::Bang => Some(UnaryOp::Not(slice)), - Punct::Tilde => Some(UnaryOp::Tilde(slice)), + Punct::Dash => Some(UnaryOp::Minus(slice.into())), + Punct::Plus => Some(UnaryOp::Plus(slice.into())), + Punct::Bang => Some(UnaryOp::Not(slice.into())), + Punct::Tilde => Some(UnaryOp::Tilde(slice.into())), _ => None, }, Token::Keyword(ref k) => match k { - Keyword::TypeOf(_) => Some(UnaryOp::TypeOf(slice)), - Keyword::Void(_) => Some(UnaryOp::Void(slice)), - Keyword::Delete(_) => Some(UnaryOp::Delete(slice)), + Keyword::TypeOf(_) => Some(UnaryOp::TypeOf(slice.into())), + Keyword::Void(_) => Some(UnaryOp::Void(slice.into())), + Keyword::Delete(_) => Some(UnaryOp::Delete(slice.into())), _ => None, }, _ => None, } } - fn binary_operator(&self, token: &Item<&str>) -> Option> { - let slice = self.slice_from(token)?; + fn binary_operator(&self, token: &Item<&str>) -> Option { + let slice = self.position_from(token); match &token.token { Token::Keyword(ref key) => match key { - Keyword::InstanceOf(_) => Some(BinaryOp::InstanceOf(slice)), - Keyword::In(_) => Some(BinaryOp::In(slice)), + Keyword::InstanceOf(_) => Some(BinaryOp::InstanceOf(slice.into())), + Keyword::In(_) => Some(BinaryOp::In(slice.into())), _ => None, }, Token::Punct(ref p) => match p { - Punct::DoubleEqual => Some(BinaryOp::Equal(slice)), - Punct::BangEqual => Some(BinaryOp::NotEqual(slice)), - Punct::TripleEqual => Some(BinaryOp::StrictEqual(slice)), - Punct::BangDoubleEqual => Some(BinaryOp::StrictNotEqual(slice)), - Punct::LessThan => Some(BinaryOp::LessThan(slice)), - Punct::LessThanEqual => Some(BinaryOp::LessThanEqual(slice)), - Punct::GreaterThan => Some(BinaryOp::GreaterThan(slice)), - Punct::GreaterThanEqual => Some(BinaryOp::GreaterThanEqual(slice)), - Punct::DoubleLessThan => Some(BinaryOp::LeftShift(slice)), - Punct::DoubleGreaterThan => Some(BinaryOp::RightShift(slice)), - Punct::TripleGreaterThan => Some(BinaryOp::UnsignedRightShift(slice)), - Punct::Plus => Some(BinaryOp::Plus(slice)), - Punct::Dash => Some(BinaryOp::Minus(slice)), - Punct::Asterisk => Some(BinaryOp::Times(slice)), - Punct::ForwardSlash => Some(BinaryOp::Over(slice)), - Punct::Percent => Some(BinaryOp::Mod(slice)), - Punct::Ampersand => Some(BinaryOp::And(slice)), - Punct::Pipe => Some(BinaryOp::Or(slice)), - Punct::Caret => Some(BinaryOp::XOr(slice)), + Punct::DoubleEqual => Some(BinaryOp::Equal(slice.into())), + Punct::BangEqual => Some(BinaryOp::NotEqual(slice.into())), + Punct::TripleEqual => Some(BinaryOp::StrictEqual(slice.into())), + Punct::BangDoubleEqual => Some(BinaryOp::StrictNotEqual(slice.into())), + Punct::LessThan => Some(BinaryOp::LessThan(slice.into())), + Punct::LessThanEqual => Some(BinaryOp::LessThanEqual(slice.into())), + Punct::GreaterThan => Some(BinaryOp::GreaterThan(slice.into())), + Punct::GreaterThanEqual => Some(BinaryOp::GreaterThanEqual(slice.into())), + Punct::DoubleLessThan => Some(BinaryOp::LeftShift(slice.into())), + Punct::DoubleGreaterThan => Some(BinaryOp::RightShift(slice.into())), + Punct::TripleGreaterThan => Some(BinaryOp::UnsignedRightShift(slice.into())), + Punct::Plus => Some(BinaryOp::Plus(slice.into())), + Punct::Dash => Some(BinaryOp::Minus(slice.into())), + Punct::Asterisk => Some(BinaryOp::Times(slice.into())), + Punct::ForwardSlash => Some(BinaryOp::Over(slice.into())), + Punct::Percent => Some(BinaryOp::Mod(slice.into())), + Punct::Ampersand => Some(BinaryOp::And(slice.into())), + Punct::Pipe => Some(BinaryOp::Or(slice.into())), + Punct::Caret => Some(BinaryOp::XOr(slice.into())), _ => None, }, _ => None, } } - fn logical_operator(&self, token: &Item<&str>) -> Option> { - let slice = self.slice_from(token)?; + fn logical_operator(&self, token: &Item<&str>) -> Option { + let slice = self.position_from(token); match &token.token { Token::Punct(ref p) => match p { - Punct::DoubleAmpersand => Some(LogicalOp::And(slice)), - Punct::DoublePipe => Some(LogicalOp::Or(slice)), + Punct::DoubleAmpersand => Some(LogicalOp::And(slice.into())), + Punct::DoublePipe => Some(LogicalOp::Or(slice.into())), _ => None, }, _ => None, @@ -5774,7 +5862,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_await_expr(&mut self) -> Res> { + fn parse_await_expr(&mut self) -> Res>> { log::debug!( "{}: parse_await_expr {:?}", self.look_ahead.span.start, @@ -5784,14 +5872,14 @@ where self.unexpected_token_error(&self.look_ahead, "await is not valid in this context")?; } let keyword = self.next_item()?; - let keyword = self.get_slice(&keyword)?; + let keyword = self.position_from(&keyword).into(); let expr = self.parse_unary_expression()?; let ret = AwaitExpr { keyword, expr }; Ok(Expr::Await(Box::new(ret))) } #[tracing::instrument(level = "trace", skip(self))] - fn parse_update_expr(&mut self) -> Res> { + fn parse_update_expr(&mut self) -> Res>> { log::debug!( "{}: parse_update_expr {:?}", self.look_ahead.span.start, @@ -5800,11 +5888,11 @@ where let start = self.look_ahead.clone(); if self.at_punct(Punct::DoublePlus) || self.at_punct(Punct::DoubleDash) { let op = self.next_item()?; - let slice = self.get_slice(&op)?; + let slice = self.position_from(&op); let operator = match op.token { Token::Punct(ref p) => match p { - Punct::DoublePlus => UpdateOp::Increment(slice), - Punct::DoubleDash => UpdateOp::Decrement(slice), + Punct::DoublePlus => UpdateOp::Increment(slice.into()), + Punct::DoubleDash => UpdateOp::Decrement(slice.into()), _ => unreachable!("Already validated that the next token would be ++ or --"), }, _ => unreachable!("Already validated that the next token would be ++ or --"), @@ -5847,12 +5935,12 @@ where } self.context.set_is_assignment_target(false); self.context.set_is_binding_element(false); - let slice = self.get_slice(&op)?; + let slice = self.position_from(&op); let ret = UpdateExpr { operator: if op.token.matches_punct(Punct::DoublePlus) { - UpdateOp::Increment(slice) + UpdateOp::Increment(slice.into()) } else if op.token.matches_punct(Punct::DoubleDash) { - UpdateOp::Decrement(slice) + UpdateOp::Decrement(slice.into()) } else { return self.expected_token_error(&op, &["++", "--"]); }, @@ -5864,7 +5952,7 @@ where } } - fn is_func_decl(stmt: &Stmt) -> bool { + fn is_func_decl(stmt: &Stmt>) -> bool { if let Stmt::Expr { expr: Expr::Func(_), .. @@ -5876,7 +5964,7 @@ where } } - fn is_labeled_func(stmt: &Stmt) -> bool { + fn is_labeled_func(stmt: &Stmt>) -> bool { match stmt { Stmt::Labeled(stmt) => { Self::is_func_decl(&stmt.body) || Self::is_labeled_func(&stmt.body) @@ -5885,7 +5973,7 @@ where } } - fn is_ident(expr: &Expr) -> bool { + fn is_ident(expr: &Expr>) -> bool { match expr { Expr::Ident(_) => true, _ => false, @@ -5893,7 +5981,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_left_hand_side_expr(&mut self) -> Res> { + fn parse_left_hand_side_expr(&mut self) -> Res>> { if !self.context.allow_in { return Err(Error::InvalidUseOfContextualKeyword( self.current_position, @@ -5958,7 +6046,7 @@ where /// > note: This will handle any invalid super expression /// scenarios #[tracing::instrument(level = "trace", skip(self))] - fn parse_super(&mut self) -> Res> { + fn parse_super(&mut self) -> Res>> { let super_position = self.look_ahead_position; if !self.context.allow_super { log::trace!("super when not allowed"); @@ -5979,7 +6067,7 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn parse_left_hand_side_expr_allow_call(&mut self) -> Res> { + fn parse_left_hand_side_expr_allow_call(&mut self) -> Res>> { log::debug!( "{}: parse_left_hand_side_expr_allow_call", self.look_ahead.span.start @@ -6083,7 +6171,9 @@ where } /// Parse the arguments of an async function #[tracing::instrument(level = "trace", skip(self))] - fn parse_async_args(&mut self) -> Res<(Slice<'b>, Vec>>, Slice<'b>)> { + fn parse_async_args( + &mut self, + ) -> Res<(OpenParen, Vec>>>, CloseParen)> { log::debug!( "{}: parse_async_args {:?}", self.look_ahead.span.start, @@ -6131,7 +6221,7 @@ where /// Parse an argument of an async function /// note: not sure this is needed #[tracing::instrument(level = "trace", skip(self))] - fn parse_async_arg(&mut self) -> Res> { + fn parse_async_arg(&mut self) -> Res>> { log::debug!( "{}: parse_async_arg {:?}", self.look_ahead.span.start, @@ -6145,7 +6235,7 @@ where /// if parsing with tolerance we can tolerate /// a non-existent comma #[tracing::instrument(level = "trace", skip(self))] - fn expect_comma_sep(&mut self) -> Res> { + fn expect_comma_sep(&mut self) -> Res { log::debug!( "{}: expect_comma_sep {:?}", self.look_ahead.span.start, @@ -6156,7 +6246,7 @@ where /// Parse an expression preceded by the `...` operator #[tracing::instrument(level = "trace", skip(self))] - fn parse_spread_element(&mut self) -> Res> { + fn parse_spread_element(&mut self) -> Res>> { log::debug!( "{}: parse_spread_element {:?}", self.look_ahead.span.start, @@ -6169,7 +6259,7 @@ where /// Parse function arguments, expecting to open with `(` and close with `)` #[tracing::instrument(level = "trace", skip(self))] - fn parse_args(&mut self) -> Res<(Slice<'b>, Vec>>, Slice<'b>)> { + fn parse_args(&mut self) -> Res<(OpenParen, Vec>>>, CloseParen)> { log::debug!( "{}: parse_args {:?}", self.look_ahead.span.start, @@ -6206,7 +6296,7 @@ where /// or `new.target`. The later is only valid in a function /// body #[tracing::instrument(level = "trace", skip(self))] - fn parse_new_expr(&mut self) -> Res> { + fn parse_new_expr(&mut self) -> Res>> { log::debug!( "{}: parse_new_expr {:?}", self.look_ahead.span.start, @@ -6246,7 +6336,7 @@ where self.context.set_is_assignment_target(false); self.context.set_is_binding_element(false); let new = NewExpr { - keyword, + keyword: keyword.loc.start.into(), callee: Box::new(callee), open_paren, arguments, @@ -6408,16 +6498,15 @@ where /// Get the next token and validate that it matches /// the punct provided, discarding the result /// if it does - fn expect_punct(&mut self, p: Punct) -> Res> { + fn expect_punct>(&mut self, p: Punct) -> Res { let next = self.next_item()?; if !next.token.matches_punct(p) { return self.expected_token_error(&next, &[&format!("{:?}", p)]); } - self.slice_from(&next) - .ok_or_else(|| self.op_error("extracting slice from item")) + Ok(self.position_from(&next).into()) } - fn expect_assign_op(&mut self, p: Punct) -> Res> { + fn expect_assign_op(&mut self, p: Punct) -> Res { let item = self.next_item()?; if let Some(op) = self.assignment_operator(p, &item) { Ok(op) @@ -6427,13 +6516,13 @@ where } #[tracing::instrument(level = "trace", skip(self))] - fn expect_fat_arrow(&mut self) -> Res> { + fn expect_fat_arrow(&mut self) -> Res { if self.look_ahead.token.matches_punct(Punct::EqualGreaterThan) { if self.context.has_line_term { Err(Error::NewLineAfterFatArrow(self.look_ahead_position)) } else { let item = self.next_item()?; - self.get_slice(&item) + Ok(self.position_from(&item).into()) } } else { self.expected_token_error(&self.look_ahead, &["=>"]) @@ -6442,20 +6531,23 @@ where /// move on to the next item and validate it matches /// the keyword provided, discarding the result /// if it does - fn expect_keyword(&mut self, k: Keyword<()>) -> Res> { + fn expect_keyword>(&mut self, k: Keyword<()>) -> Res { let next = self.next_item()?; if !next.token.matches_keyword(k) { return self.expected_token_error(&next, &[&format!("{:?}", k)]); } - self.get_slice(&next) + Ok(self.position_from(&next).into()) } - fn expect_contextual_keyword(&mut self, target: &str) -> Res> { + fn expect_contextual_keyword>( + &mut self, + target: &str, + ) -> Res { let next = self.next_item()?; if !next.token.matches_ident_str(target) { return self.expected_token_error(&next, &[target]); } - self.get_slice(&next) + Ok(self.position_from(&next).into()) } fn at_return_arg(&self) -> bool { @@ -6607,11 +6699,11 @@ where /// consume it otherwise we need to either be at a line terminator /// EoF or a close brace #[tracing::instrument(level = "trace", skip(self))] - fn consume_semicolon(&mut self) -> Res>> { + fn consume_semicolon(&mut self) -> Res> { log::trace!("consume_semicolon {}", self.context.has_line_term); if self.at_punct(Punct::SemiColon) { let semi = self.next_item()?; - return Ok(self.slice_from(&semi)); + return Ok(Some(self.position_from(&semi).into())); } else if !self.context.has_line_term && !self.look_ahead.token.is_eof() && !self.at_punct(Punct::CloseBrace) @@ -6625,31 +6717,47 @@ where fn at_contextual_keyword(&self, s: &str) -> bool { log::debug!("at_contextual_keyword {:?}", s); if let Ok(slice) = self.get_slice(&self.look_ahead) { - slice.source == s + slice.source.as_ref() == s } else { false } } - fn slice_from(&self, item: &Item<&str>) -> Option> { + fn slice_from(&self, item: &Item<&str>) -> Option>> { let slice = self.scanner.str_for(&item.span)?; Some(Slice { loc: resast::spanned::SourceLocation { start: resast::spanned::Position { - line: item.location.start.line, - column: item.location.start.column, + line: item.location.start.line as _, + column: item.location.start.column as _, }, end: resast::spanned::Position { - line: item.location.end.line, - column: item.location.end.column, + line: item.location.end.line as _, + column: item.location.end.column as _, }, }, - source: Cow::Borrowed(slice), + source: Cow::Borrowed(slice).into(), + }) + } + + fn var_kind_from(&self, item: &Item<&'b str>) -> Res { + Ok(match &item.token { + Token::Keyword(Keyword::Var(_)) => VarKind::Var(Some(self.position_from(&item).into())), + Token::Keyword(Keyword::Let(_)) => VarKind::Let(self.position_from(&item).into()), + Token::Keyword(Keyword::Const(_)) => VarKind::Const(self.position_from(&item).into()), + _ => return self.expected_token_error(item, &["var", "let", "const"]), }) } + fn position_from(&self, item: &Item<&str>) -> resast::spanned::Position { + resast::spanned::Position::new( + item.location.start.line as _, + item.location.start.column as _, + ) + } + /// Converts a ress::Item into a resast::StringLit - fn string_lit_from(&self, item: &Item<&'b str>) -> Res> { + fn string_lit_from(&self, item: &Item<&'b str>) -> Res>> { use resast::spanned::{Position, SourceLocation}; static NEW_LINES: &[char] = &['\n', '\r', '\u{2028}', '\u{2029}']; let slice = self.scanner.str_for(&item.span).unwrap(); @@ -6666,48 +6774,37 @@ where } }; let open = Cow::Borrowed(&slice[0..1]); - let open = Slice { - loc: SourceLocation { - start: Position { - line: item.location.start.line, - column: item.location.start.column, - }, - end: Position { - line: item.location.start.line, - column: item.location.start.column + 1, - }, - }, - source: open, + let open_pos = self.position_from(item); + let open = if open == "'" { + resast::spanned::tokens::Quote::Single(open_pos.into()) + } else { + resast::spanned::tokens::Quote::Double(open_pos.into()) }; let close = Cow::Borrowed(&slice[slice.len() - 1..]); - let close = Slice { - loc: SourceLocation { - start: Position { - line: item.location.end.line, - column: item.location.end.column - 1, - }, - end: Position { - line: item.location.end.line, - column: item.location.end.column, - }, - }, - source: close, + let close_pos = Position::new( + item.location.end.line as u32, + item.location.end.column as u32 - 1, + ); + let close = if close == "'" { + resast::spanned::tokens::Quote::Single(close_pos.into()) + } else { + resast::spanned::tokens::Quote::Double(close_pos.into()) }; let start = if contents.starts_with(NEW_LINES) { - let line = item.location.start.line + 1; + let line = item.location.start.line as u32 + 1; Position { line, column: 1 } } else { Position { - line: item.location.start.line, - column: item.location.start.column + 1, + line: item.location.start.line as _, + column: item.location.start.column as u32 + 1, } }; let content = Slice { loc: SourceLocation { start, - end: close.loc.start, + end: close_pos, }, - source: Cow::Borrowed(contents), + source: Cow::Borrowed(contents).into(), }; Ok(StringLit { open_quote: open, @@ -6716,68 +6813,42 @@ where }) } - fn regex_lit_from(&self, item: &Item<&'b str>) -> Res> { - use resast::spanned::{expr::RegEx, Position, SourceLocation}; - let source = self - .scanner - .str_for(&item.span) - .ok_or(Error::UnexpectedEoF)?; + fn regex_lit_from( + &self, + item: &Item<&'b str>, + ) -> Res>> { + use resast::spanned::{expr::RegEx, tokens::ForwardSlash, Position, SourceLocation}; // regex will be on 1 line if `validate` is successful let line = item.location.start.line; - let open_slash = Slice { - loc: SourceLocation { - start: Position { - line, - column: item.location.start.column, - }, - end: Position { - line, - column: item.location.start.column + 1, - }, - }, - source: Cow::Borrowed(&source[0..1]), + let Token::RegEx(token) = &item.token else { + return self.expected_token_error(item, &[""]) }; - // this should be safe to unwrap because of `validate` above - let close_slash_idx = source.rfind('/').unwrap(); - let pattern = Slice { - loc: SourceLocation { - start: Position { - line, - column: item.location.start.column + 1, - }, - end: Position { - line, - column: item.location.start.column + close_slash_idx, - }, - }, - source: Cow::Borrowed(&source[1..close_slash_idx]), + let open_slash_pos = Position { + line: line as u32, + column: item.location.start.column as u32, }; - let close_slash = Slice { + let open_slash: ForwardSlash = open_slash_pos.into(); + let pattern_start = open_slash.end(); + let pattern_end = resast::spanned::Position { + line: pattern_start.line, + column: pattern_start.column + token.body.len() as u32, + }; + let pattern = Slice { loc: SourceLocation { - start: Position { - line, - column: item.location.start.column + close_slash_idx, - }, - end: Position { - line, - column: item.location.start.column + close_slash_idx + 1, - }, + start: pattern_start, + end: pattern_end, }, - source: Cow::Borrowed(&source[close_slash_idx..close_slash_idx + 1]), + source: Cow::Borrowed(token.body).into(), }; - let flags = if let Some(flags_slice) = source.get(close_slash_idx + 1..) { + let close_slash: ForwardSlash = pattern_end.into(); + let flags = if let Some(flags_slice) = token.flags { + let flags_start = close_slash.end(); Some(Slice { loc: SourceLocation { - start: Position { - line, - column: item.location.start.column + close_slash_idx + 1, - }, - end: Position { - line, - column: item.location.end.column, - }, + start: flags_start, + end: flags_start + flags_slice.len() as u32, }, - source: Cow::Borrowed(flags_slice), + source: Cow::Borrowed(flags_slice).into(), }) } else { None @@ -6793,21 +6864,21 @@ where /// Sort of keywords `eval` and `arguments` have /// a special meaning and will cause problems /// if used in the wrong scope - fn is_restricted_word(word: &resast::spanned::Ident) -> bool { - &word.slice.source == "eval" || &word.slice.source == "arguments" + fn is_restricted_word(word: &resast::spanned::Ident>) -> bool { + word.slice.source.as_ref() == "eval" || word.slice.source.as_ref() == "arguments" } /// Check if this &str is in the list of reserved /// words in the context of 'use strict' - fn is_strict_reserved(word: &resast::spanned::Ident) -> bool { - word.slice.source == "implements" - || word.slice.source == "interface" - || word.slice.source == "package" - || word.slice.source == "private" - || word.slice.source == "protected" - || word.slice.source == "public" - || word.slice.source == "static" - || word.slice.source == "yield" - || word.slice.source == "let" + fn is_strict_reserved(word: &resast::spanned::Ident>) -> bool { + word.slice.source.as_ref() == "implements" + || word.slice.source.as_ref() == "interface" + || word.slice.source.as_ref() == "package" + || word.slice.source.as_ref() == "private" + || word.slice.source.as_ref() == "protected" + || word.slice.source.as_ref() == "public" + || word.slice.source.as_ref() == "static" + || word.slice.source.as_ref() == "yield" + || word.slice.source.as_ref() == "let" } /// Tests if the parser is currently at the /// start of an expression. This consists of a @@ -6850,7 +6921,7 @@ where &self.original[start..end] == "n" } - fn get_slice(&self, item: &Item<&str>) -> Res> { + fn get_slice(&self, item: &Item<&str>) -> Res>> { self.slice_from(item) .ok_or_else(|| self.op_error("Unable to get slice from scanner")) } @@ -6904,7 +6975,7 @@ where self.look_ahead.location } - pub(crate) fn next_part(&mut self) -> Res> { + pub(crate) fn next_part(&mut self) -> Res>> { log::trace!( "next_part past_prolog: {}, strict: {}", self.context.past_prolog, @@ -6956,7 +7027,7 @@ impl<'b, CH> Iterator for Parser<'b, CH> where CH: CommentHandler<'b> + Sized, { - type Item = Res>; + type Item = Res>>; #[tracing::instrument(level = "trace", skip(self))] fn next(&mut self) -> Option { if self.look_ahead.token.is_eof() || self.context.errored { diff --git a/tests/major_libs.rs b/tests/major_libs.rs index 90c2a16..06b4977 100644 --- a/tests/major_libs.rs +++ b/tests/major_libs.rs @@ -71,10 +71,10 @@ fn run_test(name: &str, normal: String, min: String) { handle_result(r, &format!("{}.min", name)); } -fn handle_result<'a>( - result: Result, ressa::Error>, +fn handle_result( + result: Result, ressa::Error>, name: &str, -) -> resast::Program<'a> { +) -> resast::Program { match result { Ok(result) => result, Err(e) => panic!("Unable to parse {0}\n{1}\n{1:?}", name, e), diff --git a/tests/snapshots/everything_js__es2015_module.snap b/tests/snapshots/everything_js__es2015_module.snap index 137e284..66b27a8 100644 --- a/tests/snapshots/everything_js__es2015_module.snap +++ b/tests/snapshots/everything_js__es2015_module.snap @@ -7,19 +7,12 @@ Mod( Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 3, - column: 1, - }, - end: Position { - line: 3, - column: 7, - }, + keyword_import: Import( + Position { + line: 3, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Default( @@ -45,35 +38,23 @@ Mod( }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 3, - column: 11, - }, - end: Position { - line: 3, - column: 15, - }, + From( + Position { + line: 3, + column: 11, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 3, column: 16, }, - end: Position { - line: 3, - column: 17, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -87,85 +68,52 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 3, column: 23, }, - end: Position { - line: 3, - column: 24, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 3, - column: 24, - }, - end: Position { - line: 3, - column: 25, - }, + Semicolon( + Position { + line: 3, + column: 24, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 4, - column: 1, - }, - end: Position { - line: 4, - column: 7, - }, + keyword_import: Import( + Position { + line: 4, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Namespace( NamespaceImportSpec { - star: Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 4, - column: 8, - }, - end: Position { - line: 4, - column: 9, - }, + star: Asterisk( + Position { + line: 4, + column: 8, }, - }, - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 4, - column: 10, - }, - end: Position { - line: 4, - column: 12, - }, + ), + keyword: As( + Position { + line: 4, + column: 10, }, - }, + ), ident: Ident { slice: Slice { source: "i1", @@ -187,35 +135,23 @@ Mod( }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 4, - column: 16, - }, - end: Position { - line: 4, - column: 20, - }, + From( + Position { + line: 4, + column: 16, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 4, column: 21, }, - end: Position { - line: 4, - column: 22, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -229,121 +165,76 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 4, column: 28, }, - end: Position { - line: 4, - column: 29, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 4, - column: 29, - }, - end: Position { - line: 4, - column: 30, - }, + Semicolon( + Position { + line: 4, + column: 29, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 5, - column: 1, - }, - end: Position { - line: 5, - column: 7, - }, + keyword_import: Import( + Position { + line: 5, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Normal( NormalImportSpecs { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 5, - column: 8, - }, - end: Position { - line: 5, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 5, + column: 8, }, - }, + ), specs: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 5, - column: 9, - }, - end: Position { - line: 5, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 5, + column: 9, }, - }, + ), }, ), comma: None, }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 5, - column: 11, - }, - end: Position { - line: 5, - column: 15, - }, + From( + Position { + line: 5, + column: 11, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 5, column: 16, }, - end: Position { - line: 5, - column: 17, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -357,72 +248,46 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 5, column: 23, }, - end: Position { - line: 5, - column: 24, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 5, - column: 24, - }, - end: Position { - line: 5, - column: 25, - }, + Semicolon( + Position { + line: 5, + column: 24, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 6, - column: 1, - }, - end: Position { - line: 6, - column: 7, - }, + keyword_import: Import( + Position { + line: 6, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Normal( NormalImportSpecs { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 6, - column: 8, - }, - end: Position { - line: 6, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 6, + column: 8, }, - }, + ), specs: [ ListEntry { item: NormalImportSpec { @@ -444,19 +309,12 @@ Mod( alias: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 6, - column: 12, - }, - end: Position { - line: 6, - column: 13, - }, + Comma( + Position { + line: 6, + column: 12, }, - }, + ), ), }, ListEntry { @@ -478,19 +336,12 @@ Mod( }, alias: Some( Alias { - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 6, - column: 16, - }, - end: Position { - line: 6, - column: 18, - }, + keyword: As( + Position { + line: 6, + column: 16, }, - }, + ), ident: Ident { slice: Slice { source: "i3", @@ -510,70 +361,44 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 6, - column: 21, - }, - end: Position { - line: 6, - column: 22, - }, + Comma( + Position { + line: 6, + column: 21, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 6, - column: 23, - }, - end: Position { - line: 6, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 6, + column: 23, }, - }, + ), }, ), comma: None, }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 6, - column: 25, - }, - end: Position { - line: 6, - column: 29, - }, + From( + Position { + line: 6, + column: 25, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 6, column: 30, }, - end: Position { - line: 6, - column: 31, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -587,55 +412,36 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 6, column: 37, }, - end: Position { - line: 6, - column: 38, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 6, - column: 38, - }, - end: Position { - line: 6, - column: 39, - }, + Semicolon( + Position { + line: 6, + column: 38, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 7, - column: 1, - }, - end: Position { - line: 7, - column: 7, - }, + keyword_import: Import( + Position { + line: 7, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Default( @@ -658,50 +464,29 @@ Mod( }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 7, - column: 10, - }, - end: Position { - line: 7, - column: 11, - }, + Comma( + Position { + line: 7, + column: 10, }, - }, + ), ), }, ListEntry { item: Namespace( NamespaceImportSpec { - star: Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 7, - column: 12, - }, - end: Position { - line: 7, - column: 13, - }, + star: Asterisk( + Position { + line: 7, + column: 12, }, - }, - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 7, - column: 14, - }, - end: Position { - line: 7, - column: 16, - }, + ), + keyword: As( + Position { + line: 7, + column: 14, }, - }, + ), ident: Ident { slice: Slice { source: "i5", @@ -723,35 +508,23 @@ Mod( }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 7, - column: 20, - }, - end: Position { - line: 7, - column: 24, - }, + From( + Position { + line: 7, + column: 20, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 7, column: 25, }, - end: Position { - line: 7, - column: 26, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -765,55 +538,36 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 7, column: 32, }, - end: Position { - line: 7, - column: 33, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 7, - column: 33, - }, - end: Position { - line: 7, - column: 34, - }, + Semicolon( + Position { + line: 7, + column: 33, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 8, - column: 1, - }, - end: Position { - line: 8, - column: 7, - }, + keyword_import: Import( + Position { + line: 8, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Default( @@ -836,86 +590,53 @@ Mod( }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 8, - column: 10, - }, - end: Position { - line: 8, - column: 11, - }, + Comma( + Position { + line: 8, + column: 10, }, - }, + ), ), }, ListEntry { item: Normal( NormalImportSpecs { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 8, - column: 12, - }, - end: Position { - line: 8, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 8, + column: 12, }, - }, + ), specs: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 8, - column: 13, - }, - end: Position { - line: 8, - column: 14, - }, + close_brace: CloseBrace( + Position { + line: 8, + column: 13, }, - }, + ), }, ), comma: None, }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 8, - column: 15, - }, - end: Position { - line: 8, - column: 19, - }, + From( + Position { + line: 8, + column: 15, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 8, column: 20, }, - end: Position { - line: 8, - column: 21, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -929,55 +650,36 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 8, column: 27, }, - end: Position { - line: 8, - column: 28, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 8, - column: 28, - }, - end: Position { - line: 8, - column: 29, - }, + Semicolon( + Position { + line: 8, + column: 28, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 9, - column: 1, - }, - end: Position { - line: 9, - column: 7, - }, + keyword_import: Import( + Position { + line: 9, + column: 1, }, - }, + ), specifiers: [ ListEntry { item: Default( @@ -1000,37 +702,23 @@ Mod( }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 9, - column: 10, - }, - end: Position { - line: 9, - column: 11, - }, + Comma( + Position { + line: 9, + column: 10, }, - }, + ), ), }, ListEntry { item: Normal( NormalImportSpecs { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 9, - column: 12, - }, - end: Position { - line: 9, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 9, + column: 12, }, - }, + ), specs: [ ListEntry { item: NormalImportSpec { @@ -1052,19 +740,12 @@ Mod( alias: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 9, - column: 16, - }, - end: Position { - line: 9, - column: 17, - }, + Comma( + Position { + line: 9, + column: 16, }, - }, + ), ), }, ListEntry { @@ -1086,19 +767,12 @@ Mod( }, alias: Some( Alias { - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 9, - column: 22, - }, - end: Position { - line: 9, - column: 24, - }, + keyword: As( + Position { + line: 9, + column: 22, }, - }, + ), ident: Ident { slice: Slice { source: "i9", @@ -1120,54 +794,35 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 9, - column: 28, - }, - end: Position { - line: 9, - column: 29, - }, + close_brace: CloseBrace( + Position { + line: 9, + column: 28, }, - }, + ), }, ), comma: None, }, ], keyword_from: Some( - Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 9, - column: 30, - }, - end: Position { - line: 9, - column: 34, - }, + From( + Position { + line: 9, + column: 30, }, - }, + ), ), source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 9, column: 35, }, - end: Position { - line: 9, - column: 36, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -1181,72 +836,48 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 9, column: 42, }, - end: Position { - line: 9, - column: 43, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 9, - column: 43, - }, - end: Position { - line: 9, - column: 44, - }, + Semicolon( + Position { + line: 9, + column: 43, }, - }, + ), ), }, ), Decl( Import { import: ModImport { - keyword_import: Slice { - source: "import", - loc: SourceLocation { - start: Position { - line: 10, - column: 1, - }, - end: Position { - line: 10, - column: 7, - }, + keyword_import: Import( + Position { + line: 10, + column: 1, }, - }, + ), specifiers: [], keyword_from: None, source: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 10, column: 8, }, - end: Position { - line: 10, - column: 9, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -1260,97 +891,60 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 10, column: 15, }, - end: Position { - line: 10, - column: 16, - }, - }, - }, + ), + ), }, ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 10, - column: 16, - }, - end: Position { - line: 10, - column: 17, - }, + Semicolon( + Position { + line: 10, + column: 16, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 12, - column: 1, - }, - end: Position { - line: 12, - column: 7, - }, + keyword: Export( + Position { + line: 12, + column: 1, }, - }, + ), spec: All { - star: Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 12, - column: 8, - }, - end: Position { - line: 12, - column: 9, - }, + star: Asterisk( + Position { + line: 12, + column: 8, }, - }, - keyword: Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 12, - column: 10, - }, - end: Position { - line: 12, - column: 14, - }, + ), + alias: None, + keyword: From( + Position { + line: 12, + column: 10, }, - }, + ), name: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 12, column: 15, }, - end: Position { - line: 12, - column: 16, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -1364,118 +958,73 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 12, column: 22, }, - end: Position { - line: 12, - column: 23, - }, - }, - }, + ), + ), }, ), }, }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 12, - column: 23, - }, - end: Position { - line: 12, - column: 24, - }, + Semicolon( + Position { + line: 12, + column: 23, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 13, - column: 1, - }, - end: Position { - line: 13, - column: 7, - }, + keyword: Export( + Position { + line: 13, + column: 1, }, - }, + ), spec: Named( Specifier( NamedExportSpec { list: ExportList { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 13, - column: 8, - }, - end: Position { - line: 13, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 13, + column: 8, }, - }, + ), elements: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 13, - column: 9, - }, - end: Position { - line: 13, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 13, + column: 9, }, - }, + ), }, source: Some( NamedExportSource { - keyword_from: Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 13, - column: 11, - }, - end: Position { - line: 13, - column: 15, - }, + keyword_from: From( + Position { + line: 13, + column: 11, }, - }, + ), module: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 13, column: 16, }, - end: Position { - line: 13, - column: 17, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -1489,19 +1038,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 13, column: 23, }, - end: Position { - line: 13, - column: 24, - }, - }, - }, + ), + ), }, ), }, @@ -1511,55 +1055,34 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 13, - column: 24, - }, - end: Position { - line: 13, - column: 25, - }, + Semicolon( + Position { + line: 13, + column: 24, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 14, - column: 1, - }, - end: Position { - line: 14, - column: 7, - }, + keyword: Export( + Position { + line: 14, + column: 1, }, - }, + ), spec: Named( Specifier( NamedExportSpec { list: ExportList { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 14, - column: 8, - }, - end: Position { - line: 14, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 14, + column: 8, }, - }, + ), elements: [ ListEntry { item: ExportSpecifier { @@ -1581,19 +1104,12 @@ Mod( alias: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 14, - column: 12, - }, - end: Position { - line: 14, - column: 13, - }, + Comma( + Position { + line: 14, + column: 12, }, - }, + ), ), }, ListEntry { @@ -1615,19 +1131,12 @@ Mod( }, alias: Some( Alias { - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 14, - column: 17, - }, - end: Position { - line: 14, - column: 19, - }, + keyword: As( + Position { + line: 14, + column: 17, }, - }, + ), ident: Ident { slice: Slice { source: "a", @@ -1647,19 +1156,12 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 14, - column: 21, - }, - end: Position { - line: 14, - column: 22, - }, + Comma( + Position { + line: 14, + column: 21, }, - }, + ), ), }, ListEntry { @@ -1681,19 +1183,12 @@ Mod( }, alias: Some( Alias { - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 14, - column: 26, - }, - end: Position { - line: 14, - column: 28, - }, + keyword: As( + Position { + line: 14, + column: 26, }, - }, + ), ident: Ident { slice: Slice { source: "var", @@ -1713,66 +1208,40 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 14, - column: 32, - }, - end: Position { - line: 14, - column: 33, - }, + Comma( + Position { + line: 14, + column: 32, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 14, - column: 34, - }, - end: Position { - line: 14, - column: 35, - }, + close_brace: CloseBrace( + Position { + line: 14, + column: 34, }, - }, + ), }, source: Some( NamedExportSource { - keyword_from: Slice { - source: "from", - loc: SourceLocation { - start: Position { - line: 14, - column: 36, - }, - end: Position { - line: 14, - column: 40, - }, + keyword_from: From( + Position { + line: 14, + column: 36, }, - }, + ), module: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 14, column: 41, }, - end: Position { - line: 14, - column: 42, - }, - }, - }, + ), + ), content: Slice { source: "module", loc: SourceLocation { @@ -1786,19 +1255,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 14, column: 48, }, - end: Position { - line: 14, - column: 49, - }, - }, - }, + ), + ), }, ), }, @@ -1808,69 +1272,41 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 14, - column: 49, - }, - end: Position { - line: 14, - column: 50, - }, + Semicolon( + Position { + line: 14, + column: 49, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 15, - column: 1, - }, - end: Position { - line: 15, - column: 7, - }, + keyword: Export( + Position { + line: 15, + column: 1, }, - }, + ), spec: Named( Specifier( NamedExportSpec { list: ExportList { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 15, - column: 8, - }, - end: Position { - line: 15, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 15, + column: 8, }, - }, + ), elements: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 15, - column: 9, - }, - end: Position { - line: 15, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 15, + column: 9, }, - }, + ), }, source: None, }, @@ -1878,55 +1314,34 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 15, - column: 10, - }, - end: Position { - line: 15, - column: 11, - }, + Semicolon( + Position { + line: 15, + column: 10, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 16, - column: 1, - }, - end: Position { - line: 16, - column: 7, - }, + keyword: Export( + Position { + line: 16, + column: 1, }, - }, + ), spec: Named( Specifier( NamedExportSpec { list: ExportList { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 16, - column: 8, - }, - end: Position { - line: 16, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 16, + column: 8, }, - }, + ), elements: [ ListEntry { item: ExportSpecifier { @@ -1948,19 +1363,12 @@ Mod( alias: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 16, - column: 12, - }, - end: Position { - line: 16, - column: 13, - }, + Comma( + Position { + line: 16, + column: 12, }, - }, + ), ), }, ListEntry { @@ -1982,19 +1390,12 @@ Mod( }, alias: Some( Alias { - keyword: Slice { - source: "as", - loc: SourceLocation { - start: Position { - line: 16, - column: 17, - }, - end: Position { - line: 16, - column: 19, - }, + keyword: As( + Position { + line: 16, + column: 17, }, - }, + ), ident: Ident { slice: Slice { source: "in", @@ -2016,19 +1417,12 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 16, - column: 23, - }, - end: Position { - line: 16, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 16, + column: 23, }, - }, + ), }, source: None, }, @@ -2036,57 +1430,36 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 16, - column: 24, - }, - end: Position { - line: 16, - column: 25, - }, + Semicolon( + Position { + line: 16, + column: 24, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 17, - column: 1, - }, - end: Position { - line: 17, - column: 7, - }, + keyword: Export( + Position { + line: 17, + column: 1, }, - }, + ), spec: Named( Decl( Var { decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 17, - column: 8, - }, - end: Position { - line: 17, - column: 11, - }, + Var( + Position { + line: 17, + column: 8, }, - }, + ), ), ), decls: [ @@ -2113,19 +1486,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 17, - column: 14, - }, - end: Position { - line: 17, - column: 15, - }, + Comma( + Position { + line: 17, + column: 14, }, - }, + ), ), }, ListEntry { @@ -2148,19 +1514,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 17, - column: 19, - }, - end: Position { - line: 17, - column: 20, - }, + Equal( + Position { + line: 17, + column: 19, }, - }, + ), ), init: Some( Lit( @@ -2187,19 +1546,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 17, - column: 22, - }, - end: Position { - line: 17, - column: 23, - }, + Semicolon( + Position { + line: 17, + column: 22, }, - }, + ), ), }, ), @@ -2211,37 +1563,23 @@ Mod( Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 18, - column: 1, - }, - end: Position { - line: 18, - column: 7, - }, + keyword: Export( + Position { + line: 18, + column: 1, }, - }, + ), spec: Named( Decl( Var { decls: VarDecls { keyword: Let( - Slice { - source: "let", - loc: SourceLocation { - start: Position { - line: 18, - column: 8, - }, - end: Position { - line: 18, - column: 11, - }, + Let( + Position { + line: 18, + column: 8, }, - }, + ), ), decls: [ ListEntry { @@ -2267,19 +1605,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 18, - column: 14, - }, - end: Position { - line: 18, - column: 15, - }, + Comma( + Position { + line: 18, + column: 14, }, - }, + ), ), }, ListEntry { @@ -2302,19 +1633,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 18, - column: 19, - }, - end: Position { - line: 18, - column: 20, - }, + Equal( + Position { + line: 18, + column: 19, }, - }, + ), ), init: Some( Lit( @@ -2346,56 +1670,35 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 18, - column: 22, - }, - end: Position { - line: 18, - column: 23, - }, + Semicolon( + Position { + line: 18, + column: 22, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 19, - column: 1, - }, - end: Position { - line: 19, - column: 7, - }, + keyword: Export( + Position { + line: 19, + column: 1, }, - }, + ), spec: Named( Decl( Var { decls: VarDecls { keyword: Const( - Slice { - source: "const", - loc: SourceLocation { - start: Position { - line: 19, - column: 8, - }, - end: Position { - line: 19, - column: 13, - }, + Const( + Position { + line: 19, + column: 8, }, - }, + ), ), decls: [ ListEntry { @@ -2418,19 +1721,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 19, - column: 17, - }, - end: Position { - line: 19, - column: 18, - }, + Equal( + Position { + line: 19, + column: 17, }, - }, + ), ), init: Some( Lit( @@ -2453,19 +1749,12 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 19, - column: 20, - }, - end: Position { - line: 19, - column: 21, - }, + Comma( + Position { + line: 19, + column: 20, }, - }, + ), ), }, ListEntry { @@ -2488,19 +1777,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 19, - column: 26, - }, - end: Position { - line: 19, - column: 27, - }, + Equal( + Position { + line: 19, + column: 26, }, - }, + ), ), init: Some( Lit( @@ -2532,55 +1814,34 @@ Mod( ), }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 19, - column: 29, - }, - end: Position { - line: 19, - column: 30, - }, + Semicolon( + Position { + line: 19, + column: 29, }, - }, + ), ), }, ), Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 20, - column: 1, - }, - end: Position { - line: 20, - column: 7, - }, + keyword: Export( + Position { + line: 20, + column: 1, }, - }, + ), spec: Named( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 20, - column: 8, - }, - end: Position { - line: 20, - column: 16, - }, + keyword: Function( + Position { + line: 20, + column: 8, }, - }, + ), id: Some( Ident { slice: Slice { @@ -2598,61 +1859,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 20, - column: 20, - }, - end: Position { - line: 20, - column: 21, - }, + open_paren: OpenParen( + Position { + line: 20, + column: 20, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 20, - column: 21, - }, - end: Position { - line: 20, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 20, + column: 21, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 20, - column: 22, - }, - end: Position { - line: 20, - column: 23, - }, + open_brace: OpenBrace( + Position { + line: 20, + column: 22, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 20, - column: 23, - }, - end: Position { - line: 20, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 20, + column: 23, }, - }, + ), }, star: None, keyword_async: None, @@ -2667,36 +1900,22 @@ Mod( Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 21, - column: 1, - }, - end: Position { - line: 21, - column: 7, - }, + keyword: Export( + Position { + line: 21, + column: 1, }, - }, + ), spec: Named( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 21, - column: 8, - }, - end: Position { - line: 21, - column: 16, - }, + keyword: Function( + Position { + line: 21, + column: 8, }, - }, + ), id: Some( Ident { slice: Slice { @@ -2714,76 +1933,41 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 21, - column: 21, - }, - end: Position { - line: 21, - column: 22, - }, + open_paren: OpenParen( + Position { + line: 21, + column: 21, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 21, - column: 22, - }, - end: Position { - line: 21, - column: 23, - }, + close_paren: CloseParen( + Position { + line: 21, + column: 22, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 21, - column: 23, - }, - end: Position { - line: 21, - column: 24, - }, + open_brace: OpenBrace( + Position { + line: 21, + column: 23, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 21, - column: 24, - }, - end: Position { - line: 21, - column: 25, - }, + close_brace: CloseBrace( + Position { + line: 21, + column: 24, }, - }, + ), }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 21, - column: 16, - }, - end: Position { - line: 21, - column: 17, - }, + Asterisk( + Position { + line: 21, + column: 16, }, - }, + ), ), keyword_async: None, }, @@ -2797,36 +1981,22 @@ Mod( Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 22, - column: 1, - }, - end: Position { - line: 22, - column: 7, - }, + keyword: Export( + Position { + line: 22, + column: 1, }, - }, + ), spec: Named( Decl( Class( Class { - keyword: Slice { - source: "class", - loc: SourceLocation { - start: Position { - line: 22, - column: 8, - }, - end: Position { - line: 22, - column: 13, - }, + keyword: Class( + Position { + line: 22, + column: 8, }, - }, + ), id: Some( Ident { slice: Slice { @@ -2846,33 +2016,19 @@ Mod( ), super_class: None, body: ClassBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 22, - column: 18, - }, - end: Position { - line: 22, - column: 19, - }, + open_brace: OpenBrace( + Position { + line: 22, + column: 18, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 22, - column: 19, - }, - end: Position { - line: 22, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 22, + column: 19, }, - }, + ), }, }, ), @@ -2885,36 +2041,22 @@ Mod( Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 23, - column: 1, - }, - end: Position { - line: 23, - column: 7, - }, + keyword: Export( + Position { + line: 23, + column: 1, }, - }, + ), spec: Named( Decl( Class( Class { - keyword: Slice { - source: "class", - loc: SourceLocation { - start: Position { - line: 23, - column: 8, - }, - end: Position { - line: 23, - column: 13, - }, + keyword: Class( + Position { + line: 23, + column: 8, }, - }, + ), id: Some( Ident { slice: Slice { @@ -2934,19 +2076,12 @@ Mod( ), super_class: Some( SuperClass { - keyword_extends: Slice { - source: "extends", - loc: SourceLocation { - start: Position { - line: 23, - column: 18, - }, - end: Position { - line: 23, - column: 25, - }, + keyword_extends: Extends( + Position { + line: 23, + column: 18, }, - }, + ), expr: Ident( Ident { slice: Slice { @@ -2967,33 +2102,19 @@ Mod( }, ), body: ClassBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 23, - column: 30, - }, - end: Position { - line: 23, - column: 31, - }, + open_brace: OpenBrace( + Position { + line: 23, + column: 30, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 23, - column: 31, - }, - end: Position { - line: 23, - column: 32, - }, + close_brace: CloseBrace( + Position { + line: 23, + column: 31, }, - }, + ), }, }, ), @@ -3006,49 +2127,28 @@ Mod( Decl( Export { export: ModExport { - keyword: Slice { - source: "export", - loc: SourceLocation { - start: Position { - line: 24, - column: 1, - }, - end: Position { - line: 24, - column: 7, - }, + keyword: Export( + Position { + line: 24, + column: 1, }, - }, + ), spec: Default { - keyword: Slice { - source: "default", - loc: SourceLocation { - start: Position { - line: 24, - column: 8, - }, - end: Position { - line: 24, - column: 15, - }, + keyword: Default( + Position { + line: 24, + column: 8, }, - }, + ), value: Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 24, - column: 16, - }, - end: Position { - line: 24, - column: 24, - }, + keyword: Function( + Position { + line: 24, + column: 16, }, - }, + ), id: Some( Ident { slice: Slice { @@ -3066,61 +2166,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 24, - column: 28, - }, - end: Position { - line: 24, - column: 29, - }, + open_paren: OpenParen( + Position { + line: 24, + column: 28, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 24, - column: 29, - }, - end: Position { - line: 24, - column: 30, - }, + close_paren: CloseParen( + Position { + line: 24, + column: 29, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 24, - column: 30, - }, - end: Position { - line: 24, - column: 31, - }, + open_brace: OpenBrace( + Position { + line: 24, + column: 30, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 24, - column: 31, - }, - end: Position { - line: 24, - column: 32, - }, + close_brace: CloseBrace( + Position { + line: 24, + column: 31, }, - }, + ), }, star: None, keyword_async: None, @@ -3150,103 +2222,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 39, - column: 4, - }, - end: Position { - line: 39, - column: 5, - }, + colon: Colon( + Position { + line: 39, + column: 4, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 39, - column: 5, - }, - end: Position { - line: 39, - column: 8, - }, + keyword: For( + Position { + line: 39, + column: 5, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 39, - column: 8, - }, - end: Position { - line: 39, - column: 9, - }, + ), + open_paren: OpenParen( + Position { + line: 39, + column: 8, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 39, - column: 9, - }, - end: Position { - line: 39, - column: 10, - }, + semi1: Semicolon( + Position { + line: 39, + column: 9, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 39, - column: 10, - }, - end: Position { - line: 39, - column: 11, - }, + semi2: Semicolon( + Position { + line: 39, + column: 10, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 39, - column: 11, - }, - end: Position { - line: 39, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 39, + column: 11, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 39, - column: 12, - }, - end: Position { - line: 39, - column: 17, - }, + keyword: Break( + Position { + line: 39, + column: 12, }, - }, + ), label: Some( Ident { slice: Slice { @@ -3265,19 +2288,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 39, - column: 21, - }, - end: Position { - line: 39, - column: 22, - }, + Semicolon( + Position { + line: 39, + column: 21, }, - }, + ), ), }, }, @@ -3303,103 +2319,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 40, - column: 12, - }, - end: Position { - line: 40, - column: 13, - }, + colon: Colon( + Position { + line: 40, + column: 12, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 40, - column: 13, - }, - end: Position { - line: 40, - column: 16, - }, + keyword: For( + Position { + line: 40, + column: 13, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 40, - column: 16, - }, - end: Position { - line: 40, - column: 17, - }, + ), + open_paren: OpenParen( + Position { + line: 40, + column: 16, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 40, - column: 17, - }, - end: Position { - line: 40, - column: 18, - }, + semi1: Semicolon( + Position { + line: 40, + column: 17, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 40, - column: 18, - }, - end: Position { - line: 40, - column: 19, - }, + semi2: Semicolon( + Position { + line: 40, + column: 18, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 40, - column: 19, - }, - end: Position { - line: 40, - column: 20, - }, + close_paren: CloseParen( + Position { + line: 40, + column: 19, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 40, - column: 20, - }, - end: Position { - line: 40, - column: 25, - }, + keyword: Break( + Position { + line: 40, + column: 20, }, - }, + ), label: Some( Ident { slice: Slice { @@ -3418,19 +2385,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 40, - column: 37, - }, - end: Position { - line: 40, - column: 38, - }, + Semicolon( + Position { + line: 40, + column: 37, }, - }, + ), ), }, }, @@ -3456,103 +2416,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 41, - column: 9, - }, - end: Position { - line: 41, - column: 10, - }, + colon: Colon( + Position { + line: 41, + column: 9, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 41, - column: 10, - }, - end: Position { - line: 41, - column: 13, - }, + keyword: For( + Position { + line: 41, + column: 10, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 41, - column: 13, - }, - end: Position { - line: 41, - column: 14, - }, + ), + open_paren: OpenParen( + Position { + line: 41, + column: 13, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 41, - column: 14, - }, - end: Position { - line: 41, - column: 15, - }, + semi1: Semicolon( + Position { + line: 41, + column: 14, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 41, - column: 15, - }, - end: Position { - line: 41, - column: 16, - }, + semi2: Semicolon( + Position { + line: 41, + column: 15, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 41, - column: 16, - }, - end: Position { - line: 41, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 41, + column: 16, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 41, - column: 17, - }, - end: Position { - line: 41, - column: 22, - }, + keyword: Break( + Position { + line: 41, + column: 17, }, - }, + ), label: Some( Ident { slice: Slice { @@ -3571,19 +2482,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 41, - column: 31, - }, - end: Position { - line: 41, - column: 32, - }, + Semicolon( + Position { + line: 41, + column: 31, }, - }, + ), ), }, }, @@ -3609,103 +2513,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 42, - column: 6, - }, - end: Position { - line: 42, - column: 7, - }, + colon: Colon( + Position { + line: 42, + column: 6, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 42, - column: 7, - }, - end: Position { - line: 42, - column: 10, - }, + keyword: For( + Position { + line: 42, + column: 7, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 42, - column: 10, - }, - end: Position { - line: 42, - column: 11, - }, + ), + open_paren: OpenParen( + Position { + line: 42, + column: 10, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 42, - column: 11, - }, - end: Position { - line: 42, - column: 12, - }, + semi1: Semicolon( + Position { + line: 42, + column: 11, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 42, - column: 12, - }, - end: Position { - line: 42, - column: 13, - }, + semi2: Semicolon( + Position { + line: 42, + column: 12, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 42, - column: 13, - }, - end: Position { - line: 42, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 42, + column: 13, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 42, - column: 14, - }, - end: Position { - line: 42, - column: 19, - }, + keyword: Break( + Position { + line: 42, + column: 14, }, - }, + ), label: Some( Ident { slice: Slice { @@ -3724,19 +2579,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 42, - column: 25, - }, - end: Position { - line: 42, - column: 26, - }, + Semicolon( + Position { + line: 42, + column: 25, }, - }, + ), ), }, }, @@ -3762,103 +2610,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 43, - column: 5, - }, - end: Position { - line: 43, - column: 6, - }, + colon: Colon( + Position { + line: 43, + column: 5, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 43, - column: 6, - }, - end: Position { - line: 43, - column: 9, - }, + keyword: For( + Position { + line: 43, + column: 6, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 43, - column: 9, - }, - end: Position { - line: 43, - column: 10, - }, + ), + open_paren: OpenParen( + Position { + line: 43, + column: 9, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 43, - column: 10, - }, - end: Position { - line: 43, - column: 11, - }, + semi1: Semicolon( + Position { + line: 43, + column: 10, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 43, - column: 11, - }, - end: Position { - line: 43, - column: 12, - }, + semi2: Semicolon( + Position { + line: 43, + column: 11, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 43, - column: 12, - }, - end: Position { - line: 43, - column: 13, - }, + close_paren: CloseParen( + Position { + line: 43, + column: 12, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 43, - column: 13, - }, - end: Position { - line: 43, - column: 18, - }, + keyword: Break( + Position { + line: 43, + column: 13, }, - }, + ), label: Some( Ident { slice: Slice { @@ -3877,19 +2676,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 43, - column: 23, - }, - end: Position { - line: 43, - column: 24, - }, + Semicolon( + Position { + line: 43, + column: 23, }, - }, + ), ), }, }, @@ -3915,103 +2707,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 44, - column: 4, - }, - end: Position { - line: 44, - column: 5, - }, + colon: Colon( + Position { + line: 44, + column: 4, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 44, - column: 5, - }, - end: Position { - line: 44, - column: 8, - }, + keyword: For( + Position { + line: 44, + column: 5, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 44, - column: 8, - }, - end: Position { - line: 44, - column: 9, - }, + ), + open_paren: OpenParen( + Position { + line: 44, + column: 8, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 44, - column: 9, - }, - end: Position { - line: 44, - column: 10, - }, + semi1: Semicolon( + Position { + line: 44, + column: 9, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 44, - column: 10, - }, - end: Position { - line: 44, - column: 11, - }, + semi2: Semicolon( + Position { + line: 44, + column: 10, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 44, - column: 11, - }, - end: Position { - line: 44, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 44, + column: 11, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 44, - column: 12, - }, - end: Position { - line: 44, - column: 17, - }, + keyword: Break( + Position { + line: 44, + column: 12, }, - }, + ), label: Some( Ident { slice: Slice { @@ -4030,19 +2773,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 44, - column: 21, - }, - end: Position { - line: 44, - column: 22, - }, + Semicolon( + Position { + line: 44, + column: 21, }, - }, + ), ), }, }, @@ -4068,19 +2804,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 47, - column: 9, - }, - end: Position { - line: 47, - column: 10, - }, + colon: Colon( + Position { + line: 47, + column: 9, }, - }, + ), body: Expr { expr: Lit( Number( @@ -4124,19 +2853,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 48, - column: 2, - }, - end: Position { - line: 48, - column: 3, - }, + Semicolon( + Position { + line: 48, + column: 2, }, - }, + ), ), }, ), @@ -4158,19 +2880,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 49, - column: 15, - }, - end: Position { - line: 49, - column: 16, - }, + colon: Colon( + Position { + line: 49, + column: 15, }, - }, + ), body: Expr { expr: Lit( Number( @@ -4214,19 +2929,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 50, - column: 2, - }, - end: Position { - line: 50, - column: 3, - }, + Semicolon( + Position { + line: 50, + column: 2, }, - }, + ), ), }, ), @@ -4248,19 +2956,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 51, - column: 23, - }, - end: Position { - line: 51, - column: 24, - }, + colon: Colon( + Position { + line: 51, + column: 23, }, - }, + ), body: Expr { expr: Lit( Number( @@ -4304,19 +3005,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 53, - column: 2, - }, - end: Position { - line: 53, - column: 3, - }, + Semicolon( + Position { + line: 53, + column: 2, }, - }, + ), ), }, ), @@ -4338,19 +3032,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 54, - column: 14, - }, - end: Position { - line: 54, - column: 15, - }, + colon: Colon( + Position { + line: 54, + column: 14, }, - }, + ), body: Expr { expr: Lit( Number( @@ -4394,19 +3081,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 55, - column: 2, - }, - end: Position { - line: 55, - column: 3, - }, + Semicolon( + Position { + line: 55, + column: 2, }, - }, + ), ), }, ), @@ -4428,19 +3108,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 56, - column: 19, - }, - end: Position { - line: 56, - column: 20, - }, + colon: Colon( + Position { + line: 56, + column: 19, }, - }, + ), body: Expr { expr: Lit( Number( @@ -4484,19 +3157,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 57, - column: 2, - }, - end: Position { - line: 57, - column: 3, - }, + Semicolon( + Position { + line: 57, + column: 2, }, - }, + ), ), }, ), @@ -4505,19 +3171,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 60, - column: 1, - }, - end: Position { - line: 60, - column: 4, - }, + Var( + Position { + line: 60, + column: 1, }, - }, + ), ), ), decls: [ @@ -4544,19 +3203,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 6, - }, - end: Position { - line: 60, - column: 7, - }, + Comma( + Position { + line: 60, + column: 6, }, - }, + ), ), }, ListEntry { @@ -4582,19 +3234,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 9, - }, - end: Position { - line: 60, - column: 10, - }, + Comma( + Position { + line: 60, + column: 9, }, - }, + ), ), }, ListEntry { @@ -4620,19 +3265,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 17, - }, - end: Position { - line: 60, - column: 18, - }, + Comma( + Position { + line: 60, + column: 17, }, - }, + ), ), }, ListEntry { @@ -4658,19 +3296,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 28, - }, - end: Position { - line: 60, - column: 29, - }, + Comma( + Position { + line: 60, + column: 28, }, - }, + ), ), }, ListEntry { @@ -4696,19 +3327,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 32, - }, - end: Position { - line: 60, - column: 33, - }, + Comma( + Position { + line: 60, + column: 32, }, - }, + ), ), }, ListEntry { @@ -4734,19 +3358,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 36, - }, - end: Position { - line: 60, - column: 37, - }, + Comma( + Position { + line: 60, + column: 36, }, - }, + ), ), }, ListEntry { @@ -4772,19 +3389,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 45, - }, - end: Position { - line: 60, - column: 46, - }, + Comma( + Position { + line: 60, + column: 45, }, - }, + ), ), }, ListEntry { @@ -4810,19 +3420,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 57, - }, - end: Position { - line: 60, - column: 58, - }, + Comma( + Position { + line: 60, + column: 57, }, - }, + ), ), }, ListEntry { @@ -4848,19 +3451,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 61, - }, - end: Position { - line: 60, - column: 62, - }, + Comma( + Position { + line: 60, + column: 61, }, - }, + ), ), }, ListEntry { @@ -4886,19 +3482,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 65, - }, - end: Position { - line: 60, - column: 66, - }, + Comma( + Position { + line: 60, + column: 65, }, - }, + ), ), }, ListEntry { @@ -4924,19 +3513,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 60, - column: 70, - }, - end: Position { - line: 60, - column: 71, - }, + Comma( + Position { + line: 60, + column: 70, }, - }, + ), ), }, ListEntry { @@ -4962,19 +3544,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 61, - column: 14, - }, - end: Position { - line: 61, - column: 15, - }, + Comma( + Position { + line: 61, + column: 14, }, - }, + ), ), }, ListEntry { @@ -5000,19 +3575,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 61, - column: 42, - }, - end: Position { - line: 61, - column: 43, - }, + Comma( + Position { + line: 61, + column: 42, }, - }, + ), ), }, ListEntry { @@ -5042,19 +3610,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 61, - column: 70, - }, - end: Position { - line: 61, - column: 71, - }, + Semicolon( + Position { + line: 61, + column: 70, }, - }, + ), ), }, ), @@ -5063,19 +3624,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 63, - column: 1, - }, - end: Position { - line: 63, - column: 4, - }, + Var( + Position { + line: 63, + column: 1, }, - }, + ), ), ), decls: [ @@ -5102,19 +3656,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 8, - }, - end: Position { - line: 63, - column: 9, - }, + Comma( + Position { + line: 63, + column: 8, }, - }, + ), ), }, ListEntry { @@ -5140,19 +3687,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 15, - }, - end: Position { - line: 63, - column: 16, - }, + Comma( + Position { + line: 63, + column: 15, }, - }, + ), ), }, ListEntry { @@ -5178,19 +3718,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 22, - }, - end: Position { - line: 63, - column: 23, - }, + Comma( + Position { + line: 63, + column: 22, }, - }, + ), ), }, ListEntry { @@ -5216,19 +3749,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 29, - }, - end: Position { - line: 63, - column: 30, - }, + Comma( + Position { + line: 63, + column: 29, }, - }, + ), ), }, ListEntry { @@ -5254,19 +3780,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 36, - }, - end: Position { - line: 63, - column: 37, - }, + Comma( + Position { + line: 63, + column: 36, }, - }, + ), ), }, ListEntry { @@ -5292,19 +3811,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 40, - }, - end: Position { - line: 63, - column: 41, - }, + Comma( + Position { + line: 63, + column: 40, }, - }, + ), ), }, ListEntry { @@ -5330,19 +3842,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 48, - }, - end: Position { - line: 63, - column: 49, - }, + Comma( + Position { + line: 63, + column: 48, }, - }, + ), ), }, ListEntry { @@ -5368,19 +3873,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 63, - column: 65, - }, - end: Position { - line: 63, - column: 66, - }, + Comma( + Position { + line: 63, + column: 65, }, - }, + ), ), }, ListEntry { @@ -5410,19 +3908,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 63, - column: 74, - }, - end: Position { - line: 63, - column: 75, - }, + Semicolon( + Position { + line: 63, + column: 74, }, - }, + ), ), }, ), @@ -5430,19 +3921,12 @@ Mod( Var { decls: VarDecls { keyword: Let( - Slice { - source: "let", - loc: SourceLocation { - start: Position { - line: 64, - column: 1, - }, - end: Position { - line: 64, - column: 4, - }, + Let( + Position { + line: 64, + column: 1, }, - }, + ), ), decls: [ ListEntry { @@ -5472,19 +3956,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 64, - column: 9, - }, - end: Position { - line: 64, - column: 10, - }, + Semicolon( + Position { + line: 64, + column: 9, }, - }, + ), ), }, ), @@ -5492,38 +3969,24 @@ Mod( Var { decls: VarDecls { keyword: Let( - Slice { - source: "let", - loc: SourceLocation { - start: Position { - line: 64, - column: 11, - }, - end: Position { - line: 64, - column: 14, - }, + Let( + Position { + line: 64, + column: 11, }, - }, + ), ), decls: [ ListEntry { item: VarDecl { id: Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 64, - column: 14, - }, - end: Position { - line: 64, - column: 15, - }, + open_bracket: OpenBracket( + Position { + line: 64, + column: 14, }, - }, + ), elements: [ ListEntry { item: Some( @@ -5550,35 +4013,21 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 64, - column: 22, - }, - end: Position { - line: 64, - column: 23, - }, + close_bracket: CloseBracket( + Position { + line: 64, + column: 22, }, - }, + ), }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 64, - column: 24, - }, - end: Position { - line: 64, - column: 25, - }, + Equal( + Position { + line: 64, + column: 24, }, - }, + ), ), init: Some( Lit( @@ -5605,19 +4054,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 64, - column: 27, - }, - end: Position { - line: 64, - column: 28, - }, + Semicolon( + Position { + line: 64, + column: 27, }, - }, + ), ), }, ), @@ -5625,19 +4067,12 @@ Mod( Var { decls: VarDecls { keyword: Const( - Slice { - source: "const", - loc: SourceLocation { - start: Position { - line: 64, - column: 29, - }, - end: Position { - line: 64, - column: 34, - }, + Const( + Position { + line: 64, + column: 29, }, - }, + ), ), decls: [ ListEntry { @@ -5660,19 +4095,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 64, - column: 42, - }, - end: Position { - line: 64, - column: 43, - }, + Equal( + Position { + line: 64, + column: 42, }, - }, + ), ), init: Some( Lit( @@ -5699,56 +4127,35 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 64, - column: 45, - }, - end: Position { - line: 64, - column: 46, - }, + Semicolon( + Position { + line: 64, + column: 45, }, - }, + ), ), }, ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 65, - column: 1, - }, - end: Position { - line: 65, - column: 2, - }, + open_brace: OpenBrace( + Position { + line: 65, + column: 1, }, - }, + ), stmts: [ Decl( Var { decls: VarDecls { keyword: Let( - Slice { - source: "let", - loc: SourceLocation { - start: Position { - line: 65, - column: 3, - }, - end: Position { - line: 65, - column: 6, - }, + Let( + Position { + line: 65, + column: 3, }, - }, + ), ), decls: [ ListEntry { @@ -5778,19 +4185,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 65, - column: 8, - }, - end: Position { - line: 65, - column: 9, - }, + Semicolon( + Position { + line: 65, + column: 8, }, - }, + ), ), }, ), @@ -5798,19 +4198,12 @@ Mod( Var { decls: VarDecls { keyword: Let( - Slice { - source: "let", - loc: SourceLocation { - start: Position { - line: 65, - column: 10, - }, - end: Position { - line: 65, - column: 13, - }, + Let( + Position { + line: 65, + column: 10, }, - }, + ), ), decls: [ ListEntry { @@ -5833,19 +4226,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 65, - column: 16, - }, - end: Position { - line: 65, - column: 17, - }, + Equal( + Position { + line: 65, + column: 16, }, - }, + ), ), init: Some( Lit( @@ -5872,19 +4258,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 65, - column: 19, - }, - end: Position { - line: 65, - column: 20, - }, + Semicolon( + Position { + line: 65, + column: 19, }, - }, + ), ), }, ), @@ -5892,19 +4271,12 @@ Mod( Var { decls: VarDecls { keyword: Const( - Slice { - source: "const", - loc: SourceLocation { - start: Position { - line: 65, - column: 21, - }, - end: Position { - line: 65, - column: 26, - }, + Const( + Position { + line: 65, + column: 21, }, - }, + ), ), decls: [ ListEntry { @@ -5927,19 +4299,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 65, - column: 29, - }, - end: Position { - line: 65, - column: 30, - }, + Equal( + Position { + line: 65, + column: 29, }, - }, + ), ), init: Some( Lit( @@ -5966,36 +4331,22 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 65, - column: 32, - }, - end: Position { - line: 65, - column: 33, - }, + Semicolon( + Position { + line: 65, + column: 32, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 65, - column: 34, - }, - end: Position { - line: 65, - column: 35, - }, + close_brace: CloseBrace( + Position { + line: 65, + column: 34, }, - }, + ), }, ), ), @@ -6003,35 +4354,21 @@ Mod( Expr { expr: Lit( Null( - Slice { - source: "null", - loc: SourceLocation { - start: Position { - line: 67, - column: 1, - }, - end: Position { - line: 67, - column: 5, - }, + Null( + Position { + line: 67, + column: 1, }, - }, + ), ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 67, - column: 5, - }, - end: Position { - line: 67, - column: 6, - }, + Semicolon( + Position { + line: 67, + column: 5, }, - }, + ), ), }, ), @@ -6039,35 +4376,23 @@ Mod( Expr { expr: Lit( Boolean( - Slice { - source: "true", - loc: SourceLocation { - start: Position { + True( + True( + Position { line: 67, column: 7, }, - end: Position { - line: 67, - column: 11, - }, - }, - }, + ), + ), ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 67, - column: 11, - }, - end: Position { - line: 67, - column: 12, - }, + Semicolon( + Position { + line: 67, + column: 11, }, - }, + ), ), }, ), @@ -6075,35 +4400,23 @@ Mod( Expr { expr: Lit( Boolean( - Slice { - source: "false", - loc: SourceLocation { - start: Position { + False( + False( + Position { line: 67, column: 13, }, - end: Position { - line: 67, - column: 18, - }, - }, - }, + ), + ), ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 67, - column: 18, - }, - end: Position { - line: 67, - column: 19, - }, + Semicolon( + Position { + line: 67, + column: 18, }, - }, + ), ), }, ), @@ -6127,19 +4440,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 69, - column: 2, - }, - end: Position { - line: 69, - column: 3, - }, + Semicolon( + Position { + line: 69, + column: 2, }, - }, + ), ), }, ), @@ -6163,19 +4469,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 69, - column: 14, - }, - end: Position { - line: 69, - column: 15, - }, + Semicolon( + Position { + line: 69, + column: 14, }, - }, + ), ), }, ), @@ -6199,19 +4498,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 70, - column: 3, - }, - end: Position { - line: 70, - column: 4, - }, + Semicolon( + Position { + line: 70, + column: 3, }, - }, + ), ), }, ), @@ -6235,19 +4527,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 70, - column: 9, - }, - end: Position { - line: 70, - column: 10, - }, + Semicolon( + Position { + line: 70, + column: 9, }, - }, + ), ), }, ), @@ -6271,19 +4556,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 70, - column: 16, - }, - end: Position { - line: 70, - column: 17, - }, + Semicolon( + Position { + line: 70, + column: 16, }, - }, + ), ), }, ), @@ -6307,19 +4585,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 70, - column: 20, - }, - end: Position { - line: 70, - column: 21, - }, + Semicolon( + Position { + line: 70, + column: 20, }, - }, + ), ), }, ), @@ -6365,19 +4636,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 71, - column: 4, - }, - end: Position { - line: 71, - column: 5, - }, + Semicolon( + Position { + line: 71, + column: 4, }, - }, + ), ), }, ), @@ -6401,19 +4665,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 71, - column: 9, - }, - end: Position { - line: 71, - column: 10, - }, + Semicolon( + Position { + line: 71, + column: 9, }, - }, + ), ), }, ), @@ -6437,19 +4694,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 71, - column: 15, - }, - end: Position { - line: 71, - column: 16, - }, + Semicolon( + Position { + line: 71, + column: 15, }, - }, + ), ), }, ), @@ -6473,19 +4723,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 71, - column: 24, - }, - end: Position { - line: 71, - column: 25, - }, + Semicolon( + Position { + line: 71, + column: 24, }, - }, + ), ), }, ), @@ -6509,19 +4752,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 71, - column: 32, - }, - end: Position { - line: 71, - column: 33, - }, + Semicolon( + Position { + line: 71, + column: 32, }, - }, + ), ), }, ), @@ -6545,19 +4781,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 72, - column: 4, - }, - end: Position { - line: 72, - column: 5, - }, + Semicolon( + Position { + line: 72, + column: 4, }, - }, + ), ), }, ), @@ -6581,19 +4810,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 72, - column: 9, - }, - end: Position { - line: 72, - column: 10, - }, + Semicolon( + Position { + line: 72, + column: 9, }, - }, + ), ), }, ), @@ -6617,19 +4839,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 72, - column: 35, - }, - end: Position { - line: 72, - column: 36, - }, + Semicolon( + Position { + line: 72, + column: 35, }, - }, + ), ), }, ), @@ -6653,19 +4868,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 73, - column: 4, - }, - end: Position { - line: 73, - column: 5, - }, + Semicolon( + Position { + line: 73, + column: 4, }, - }, + ), ), }, ), @@ -6689,19 +4897,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 73, - column: 9, - }, - end: Position { - line: 73, - column: 10, - }, + Semicolon( + Position { + line: 73, + column: 9, }, - }, + ), ), }, ), @@ -6725,19 +4926,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 73, - column: 15, - }, - end: Position { - line: 73, - column: 16, - }, + Semicolon( + Position { + line: 73, + column: 15, }, - }, + ), ), }, ), @@ -6761,19 +4955,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 73, - column: 21, - }, - end: Position { - line: 73, - column: 22, - }, + Semicolon( + Position { + line: 73, + column: 21, }, - }, + ), ), }, ), @@ -6797,19 +4984,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 73, - column: 33, - }, - end: Position { - line: 73, - column: 34, - }, + Semicolon( + Position { + line: 73, + column: 33, }, - }, + ), ), }, ), @@ -6833,19 +5013,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 74, - column: 4, - }, - end: Position { - line: 74, - column: 5, - }, + Semicolon( + Position { + line: 74, + column: 4, }, - }, + ), ), }, ), @@ -6869,19 +5042,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 74, - column: 9, - }, - end: Position { - line: 74, - column: 10, - }, + Semicolon( + Position { + line: 74, + column: 9, }, - }, + ), ), }, ), @@ -6905,19 +5071,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 74, - column: 21, - }, - end: Position { - line: 74, - column: 22, - }, + Semicolon( + Position { + line: 74, + column: 21, }, - }, + ), ), }, ), @@ -6941,19 +5100,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 75, - column: 6, - }, - end: Position { - line: 75, - column: 7, - }, + Semicolon( + Position { + line: 75, + column: 6, }, - }, + ), ), }, ), @@ -6962,19 +5114,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 77, column: 1, }, - end: Position { - line: 77, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "", loc: SourceLocation { @@ -6988,36 +5135,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 77, column: 2, }, - end: Position { - line: 77, - column: 3, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 77, - column: 3, - }, - end: Position { - line: 77, - column: 4, - }, + Semicolon( + Position { + line: 77, + column: 3, }, - }, + ), ), }, ), @@ -7026,19 +5161,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 77, column: 5, }, - end: Position { - line: 77, - column: 6, - }, - }, - }, + ), + ), content: Slice { source: "'", loc: SourceLocation { @@ -7052,36 +5182,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 77, column: 7, }, - end: Position { - line: 77, - column: 8, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 77, - column: 8, - }, - end: Position { - line: 77, - column: 9, - }, + Semicolon( + Position { + line: 77, + column: 8, }, - }, + ), ), }, ), @@ -7090,19 +5208,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 77, column: 10, }, - end: Position { - line: 77, - column: 11, - }, - }, - }, + ), + ), content: Slice { source: "\\'\\\"\\\\\\b\\f\\n\\r\\t\\v\\0", loc: SourceLocation { @@ -7116,36 +5229,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 77, column: 31, }, - end: Position { - line: 77, - column: 32, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 77, - column: 32, - }, - end: Position { - line: 77, - column: 33, - }, + Semicolon( + Position { + line: 77, + column: 32, }, - }, + ), ), }, ), @@ -7154,19 +5255,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 78, column: 1, }, - end: Position { - line: 78, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\0", loc: SourceLocation { @@ -7180,36 +5276,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 78, column: 4, }, - end: Position { - line: 78, - column: 5, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 78, - column: 5, - }, - end: Position { - line: 78, - column: 6, - }, + Semicolon( + Position { + line: 78, + column: 5, }, - }, + ), ), }, ), @@ -7218,19 +5302,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 79, column: 1, }, - end: Position { - line: 79, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\x01\\x23\\x45\\x67\\x89\\xAB\\xCD\\xEF\\xab\\xcd\\xef", loc: SourceLocation { @@ -7244,36 +5323,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 79, column: 46, }, - end: Position { - line: 79, - column: 47, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 79, - column: 47, - }, - end: Position { - line: 79, - column: 48, - }, + Semicolon( + Position { + line: 79, + column: 47, }, - }, + ), ), }, ), @@ -7282,19 +5349,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 80, column: 1, }, - end: Position { - line: 80, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\u0123\\u4567\\u89AB\\uCDEF\\u00ab\\ucdef", loc: SourceLocation { @@ -7308,36 +5370,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 80, column: 38, }, - end: Position { - line: 80, - column: 39, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 80, - column: 39, - }, - end: Position { - line: 80, - column: 40, - }, + Semicolon( + Position { + line: 80, + column: 39, }, - }, + ), ), }, ), @@ -7346,19 +5396,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 81, column: 1, }, - end: Position { - line: 81, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\uD834\\uDF06\\u2603\\u03C6 \\u{0000001F4a9}\\u{1D306}\\u{2603}\\u{3c6} 𝌆☃φ", loc: SourceLocation { @@ -7372,36 +5417,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 81, column: 67, }, - end: Position { - line: 81, - column: 68, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 81, - column: 68, - }, - end: Position { - line: 81, - column: 69, - }, + Semicolon( + Position { + line: 81, + column: 68, }, - }, + ), ), }, ), @@ -7410,19 +5443,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 81, column: 70, }, - end: Position { - line: 81, - column: 71, - }, - }, - }, + ), + ), content: Slice { source: "\\\n", loc: SourceLocation { @@ -7436,36 +5464,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 82, column: 0, }, - end: Position { - line: 82, - column: 1, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 82, - column: 1, - }, - end: Position { - line: 82, - column: 2, - }, + Semicolon( + Position { + line: 82, + column: 1, }, - }, + ), ), }, ), @@ -7474,19 +5490,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 84, column: 1, }, - end: Position { - line: 84, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "", loc: SourceLocation { @@ -7500,36 +5511,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 84, column: 2, }, - end: Position { - line: 84, - column: 3, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 84, - column: 3, - }, - end: Position { - line: 84, - column: 4, - }, + Semicolon( + Position { + line: 84, + column: 3, }, - }, + ), ), }, ), @@ -7538,19 +5537,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 84, column: 5, }, - end: Position { - line: 84, - column: 6, - }, - }, - }, + ), + ), content: Slice { source: "\"", loc: SourceLocation { @@ -7564,36 +5558,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 84, column: 7, }, - end: Position { - line: 84, - column: 8, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 84, - column: 8, - }, - end: Position { - line: 84, - column: 9, - }, + Semicolon( + Position { + line: 84, + column: 8, }, - }, + ), ), }, ), @@ -7602,19 +5584,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 84, column: 10, }, - end: Position { - line: 84, - column: 11, - }, - }, - }, + ), + ), content: Slice { source: "\\'\\\"\\\\\\b\\f\\n\\r\\t\\v\\0", loc: SourceLocation { @@ -7628,36 +5605,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 84, column: 31, }, - end: Position { - line: 84, - column: 32, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 84, - column: 32, - }, - end: Position { - line: 84, - column: 33, - }, + Semicolon( + Position { + line: 84, + column: 32, }, - }, + ), ), }, ), @@ -7666,19 +5631,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 85, column: 1, }, - end: Position { - line: 85, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\0", loc: SourceLocation { @@ -7692,36 +5652,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 85, column: 4, }, - end: Position { - line: 85, - column: 5, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 85, - column: 5, - }, - end: Position { - line: 85, - column: 6, - }, + Semicolon( + Position { + line: 85, + column: 5, }, - }, + ), ), }, ), @@ -7730,19 +5678,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 86, column: 1, }, - end: Position { - line: 86, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\x01\\x23\\x45\\x67\\x89\\xAB\\xCD\\xEF\\xab\\xcd\\xef", loc: SourceLocation { @@ -7756,36 +5699,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 86, column: 46, }, - end: Position { - line: 86, - column: 47, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 86, - column: 47, - }, - end: Position { - line: 86, - column: 48, - }, + Semicolon( + Position { + line: 86, + column: 47, }, - }, + ), ), }, ), @@ -7794,19 +5725,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 87, column: 1, }, - end: Position { - line: 87, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\u0123\\u4567\\u89AB\\uCDEF\\u00ab\\ucdef", loc: SourceLocation { @@ -7820,36 +5746,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 87, column: 38, }, - end: Position { - line: 87, - column: 39, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 87, - column: 39, - }, - end: Position { - line: 87, - column: 40, - }, + Semicolon( + Position { + line: 87, + column: 39, }, - }, + ), ), }, ), @@ -7858,19 +5772,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 88, column: 1, }, - end: Position { - line: 88, - column: 2, - }, - }, - }, + ), + ), content: Slice { source: "\\uD834\\uDF06\\u2603\\u03C6 \\u{0000001F4a9} \\u{1D306}\\u{2603}\\u{3c6} 𝌆☃φ", loc: SourceLocation { @@ -7884,36 +5793,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 88, column: 68, }, - end: Position { - line: 88, - column: 69, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 88, - column: 69, - }, - end: Position { - line: 88, - column: 70, - }, + Semicolon( + Position { + line: 88, + column: 69, }, - }, + ), ), }, ), @@ -7922,19 +5819,14 @@ Mod( expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 88, column: 71, }, - end: Position { - line: 88, - column: 72, - }, - }, - }, + ), + ), content: Slice { source: "\\\n", loc: SourceLocation { @@ -7948,36 +5840,24 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 89, column: 0, }, - end: Position { - line: 89, - column: 1, - }, - }, - }, + ), + ), }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 89, - column: 1, - }, - end: Position { - line: 89, - column: 2, - }, + Semicolon( + Position { + line: 89, + column: 1, }, - }, + ), ), }, ), @@ -7986,19 +5866,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 1, - }, - end: Position { - line: 91, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 91, + column: 1, }, - }, + ), pattern: Slice { source: "x", loc: SourceLocation { @@ -8012,51 +5885,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 3, - }, - end: Position { - line: 91, - column: 4, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 91, - column: 4, - }, - end: Position { - line: 91, - column: 4, - }, - }, + close_slash: ForwardSlash( + Position { + line: 91, + column: 3, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 91, - column: 4, - }, - end: Position { - line: 91, - column: 5, - }, + Semicolon( + Position { + line: 91, + column: 4, }, - }, + ), ), }, ), @@ -8065,19 +5910,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 6, - }, - end: Position { - line: 91, - column: 7, - }, + open_slash: ForwardSlash( + Position { + line: 91, + column: 6, }, - }, + ), pattern: Slice { source: "|", loc: SourceLocation { @@ -8091,51 +5929,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 8, - }, - end: Position { - line: 91, - column: 9, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 91, - column: 9, - }, - end: Position { - line: 91, - column: 9, - }, - }, + close_slash: ForwardSlash( + Position { + line: 91, + column: 8, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 91, - column: 9, - }, - end: Position { - line: 91, - column: 10, - }, + Semicolon( + Position { + line: 91, + column: 9, }, - }, + ), ), }, ), @@ -8144,19 +5954,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 11, - }, - end: Position { - line: 91, - column: 12, - }, + open_slash: ForwardSlash( + Position { + line: 91, + column: 11, }, - }, + ), pattern: Slice { source: "|||", loc: SourceLocation { @@ -8170,51 +5973,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 91, - column: 15, - }, - end: Position { - line: 91, - column: 16, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 91, - column: 16, - }, - end: Position { - line: 91, - column: 16, - }, - }, + close_slash: ForwardSlash( + Position { + line: 91, + column: 15, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 91, - column: 16, - }, - end: Position { - line: 91, - column: 17, - }, + Semicolon( + Position { + line: 91, + column: 16, }, - }, + ), ), }, ), @@ -8223,19 +5998,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 92, - column: 1, - }, - end: Position { - line: 92, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 92, + column: 1, }, - }, + ), pattern: Slice { source: "^$\\b\\B", loc: SourceLocation { @@ -8249,51 +6017,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 92, - column: 8, - }, - end: Position { - line: 92, - column: 9, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 92, - column: 9, - }, - end: Position { - line: 92, - column: 9, - }, - }, + close_slash: ForwardSlash( + Position { + line: 92, + column: 8, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 92, - column: 9, - }, - end: Position { - line: 92, - column: 10, - }, + Semicolon( + Position { + line: 92, + column: 9, }, - }, + ), ), }, ), @@ -8302,19 +6042,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 92, - column: 11, - }, - end: Position { - line: 92, - column: 12, - }, + open_slash: ForwardSlash( + Position { + line: 92, + column: 11, }, - }, + ), pattern: Slice { source: "(?=(?!(?:(.))))", loc: SourceLocation { @@ -8328,51 +6061,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 92, - column: 27, - }, - end: Position { - line: 92, - column: 28, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 92, - column: 28, - }, - end: Position { - line: 92, - column: 28, - }, - }, + close_slash: ForwardSlash( + Position { + line: 92, + column: 27, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 92, - column: 28, - }, - end: Position { - line: 92, - column: 29, - }, + Semicolon( + Position { + line: 92, + column: 28, }, - }, + ), ), }, ), @@ -8381,19 +6086,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 1, - }, - end: Position { - line: 93, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 93, + column: 1, }, - }, + ), pattern: Slice { source: "a.\\f\\n\\r\\t\\v\\0\\[\\-\\/\\\\\\x00\\u0000\\uD834\\uDF06", loc: SourceLocation { @@ -8407,51 +6105,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 46, - }, - end: Position { - line: 93, - column: 47, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 93, - column: 47, - }, - end: Position { - line: 93, - column: 47, - }, - }, + close_slash: ForwardSlash( + Position { + line: 93, + column: 46, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 93, - column: 47, - }, - end: Position { - line: 93, - column: 48, - }, + Semicolon( + Position { + line: 93, + column: 47, }, - }, + ), ), }, ), @@ -8460,19 +6130,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 49, - }, - end: Position { - line: 93, - column: 50, - }, + open_slash: ForwardSlash( + Position { + line: 93, + column: 49, }, - }, + ), pattern: Slice { source: "\\u{00000001d306}", loc: SourceLocation { @@ -8486,19 +6149,12 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 66, - }, - end: Position { - line: 93, - column: 67, - }, + close_slash: ForwardSlash( + Position { + line: 93, + column: 66, }, - }, + ), flags: Some( Slice { source: "u", @@ -8518,19 +6174,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 93, - column: 68, - }, - end: Position { - line: 93, - column: 69, - }, + Semicolon( + Position { + line: 93, + column: 68, }, - }, + ), ), }, ), @@ -8539,19 +6188,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 70, - }, - end: Position { - line: 93, - column: 71, - }, + open_slash: ForwardSlash( + Position { + line: 93, + column: 70, }, - }, + ), pattern: Slice { source: "\\d\\D\\s\\S\\w\\W", loc: SourceLocation { @@ -8565,51 +6207,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 93, - column: 83, - }, - end: Position { - line: 93, - column: 84, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 93, - column: 84, - }, - end: Position { - line: 93, - column: 84, - }, - }, + close_slash: ForwardSlash( + Position { + line: 93, + column: 83, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 93, - column: 84, - }, - end: Position { - line: 93, - column: 85, - }, + Semicolon( + Position { + line: 93, + column: 84, }, - }, + ), ), }, ), @@ -8618,19 +6232,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 94, - column: 1, - }, - end: Position { - line: 94, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 94, + column: 1, }, - }, + ), pattern: Slice { source: "\\ca\\cb\\cc\\cd\\ce\\cf\\cg\\ch\\ci\\cj\\ck\\cl\\cm\\cn\\co\\cp\\cq\\cr\\cs\\ct\\cu\\cv\\cw\\cx\\cy\\cz", loc: SourceLocation { @@ -8644,51 +6251,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 94, - column: 80, - }, - end: Position { - line: 94, - column: 81, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 94, - column: 81, - }, - end: Position { - line: 94, - column: 81, - }, - }, + close_slash: ForwardSlash( + Position { + line: 94, + column: 80, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 94, - column: 81, - }, - end: Position { - line: 94, - column: 82, - }, + Semicolon( + Position { + line: 94, + column: 81, }, - }, + ), ), }, ), @@ -8697,19 +6276,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 95, - column: 1, - }, - end: Position { - line: 95, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 95, + column: 1, }, - }, + ), pattern: Slice { source: "\\cA\\cB\\cC\\cD\\cE\\cF\\cG\\cH\\cI\\cJ\\cK\\cL\\cM\\cN\\cO\\cP\\cQ\\cR\\cS\\cT\\cU\\cV\\cW\\cX\\cY\\cZ", loc: SourceLocation { @@ -8723,51 +6295,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 95, - column: 80, - }, - end: Position { - line: 95, - column: 81, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 95, - column: 81, - }, - end: Position { - line: 95, - column: 81, - }, - }, + close_slash: ForwardSlash( + Position { + line: 95, + column: 80, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 95, - column: 81, - }, - end: Position { - line: 95, - column: 82, - }, + Semicolon( + Position { + line: 95, + column: 81, }, - }, + ), ), }, ), @@ -8776,19 +6320,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 1, - }, - end: Position { - line: 96, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 96, + column: 1, }, - }, + ), pattern: Slice { source: "[a-z-]", loc: SourceLocation { @@ -8802,51 +6339,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 8, - }, - end: Position { - line: 96, - column: 9, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 96, - column: 9, - }, - end: Position { - line: 96, - column: 9, - }, - }, + close_slash: ForwardSlash( + Position { + line: 96, + column: 8, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 96, - column: 9, - }, - end: Position { - line: 96, - column: 10, - }, + Semicolon( + Position { + line: 96, + column: 9, }, - }, + ), ), }, ), @@ -8855,19 +6364,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 11, - }, - end: Position { - line: 96, - column: 12, - }, + open_slash: ForwardSlash( + Position { + line: 96, + column: 11, }, - }, + ), pattern: Slice { source: "[^\\b\\-^]", loc: SourceLocation { @@ -8881,51 +6383,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 20, - }, - end: Position { - line: 96, - column: 21, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 96, - column: 21, - }, - end: Position { - line: 96, - column: 21, - }, - }, + close_slash: ForwardSlash( + Position { + line: 96, + column: 20, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 96, - column: 21, - }, - end: Position { - line: 96, - column: 22, - }, + Semicolon( + Position { + line: 96, + column: 21, }, - }, + ), ), }, ), @@ -8934,19 +6408,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 23, - }, - end: Position { - line: 96, - column: 24, - }, + open_slash: ForwardSlash( + Position { + line: 96, + column: 23, }, - }, + ), pattern: Slice { source: "[/\\]\\\\]", loc: SourceLocation { @@ -8960,51 +6427,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 96, - column: 31, - }, - end: Position { - line: 96, - column: 32, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 96, - column: 32, - }, - end: Position { - line: 96, - column: 32, - }, - }, + close_slash: ForwardSlash( + Position { + line: 96, + column: 31, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 96, - column: 32, - }, - end: Position { - line: 96, - column: 33, - }, + Semicolon( + Position { + line: 96, + column: 32, }, - }, + ), ), }, ), @@ -9013,19 +6452,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 1, - }, - end: Position { - line: 97, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 97, + column: 1, }, - }, + ), pattern: Slice { source: ".", loc: SourceLocation { @@ -9039,19 +6471,12 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 3, - }, - end: Position { - line: 97, - column: 4, - }, + close_slash: ForwardSlash( + Position { + line: 97, + column: 3, }, - }, + ), flags: Some( Slice { source: "i", @@ -9071,19 +6496,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 97, - column: 5, - }, - end: Position { - line: 97, - column: 6, - }, + Semicolon( + Position { + line: 97, + column: 5, }, - }, + ), ), }, ), @@ -9092,19 +6510,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 7, - }, - end: Position { - line: 97, - column: 8, - }, + open_slash: ForwardSlash( + Position { + line: 97, + column: 7, }, - }, + ), pattern: Slice { source: ".", loc: SourceLocation { @@ -9118,19 +6529,12 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 9, - }, - end: Position { - line: 97, - column: 10, - }, + close_slash: ForwardSlash( + Position { + line: 97, + column: 9, }, - }, + ), flags: Some( Slice { source: "g", @@ -9150,19 +6554,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 97, - column: 11, - }, - end: Position { - line: 97, - column: 12, - }, + Semicolon( + Position { + line: 97, + column: 11, }, - }, + ), ), }, ), @@ -9171,19 +6568,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 13, - }, - end: Position { - line: 97, - column: 14, - }, + open_slash: ForwardSlash( + Position { + line: 97, + column: 13, }, - }, + ), pattern: Slice { source: ".", loc: SourceLocation { @@ -9197,19 +6587,12 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 15, - }, - end: Position { - line: 97, - column: 16, - }, + close_slash: ForwardSlash( + Position { + line: 97, + column: 15, }, - }, + ), flags: Some( Slice { source: "m", @@ -9229,19 +6612,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 97, - column: 17, - }, - end: Position { - line: 97, - column: 18, - }, + Semicolon( + Position { + line: 97, + column: 17, }, - }, + ), ), }, ), @@ -9250,19 +6626,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 19, - }, - end: Position { - line: 97, - column: 20, - }, + open_slash: ForwardSlash( + Position { + line: 97, + column: 19, }, - }, + ), pattern: Slice { source: ".", loc: SourceLocation { @@ -9276,19 +6645,12 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 97, - column: 21, - }, - end: Position { - line: 97, - column: 22, - }, + close_slash: ForwardSlash( + Position { + line: 97, + column: 21, }, - }, + ), flags: Some( Slice { source: "igm", @@ -9308,19 +6670,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 97, - column: 25, - }, - end: Position { - line: 97, - column: 26, - }, + Semicolon( + Position { + line: 97, + column: 25, }, - }, + ), ), }, ), @@ -9329,19 +6684,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 1, - }, - end: Position { - line: 98, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 1, }, - }, + ), pattern: Slice { source: ".*", loc: SourceLocation { @@ -9355,51 +6703,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 4, - }, - end: Position { - line: 98, - column: 5, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 5, - }, - end: Position { - line: 98, - column: 5, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 4, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 5, - }, - end: Position { - line: 98, - column: 6, - }, + Semicolon( + Position { + line: 98, + column: 5, }, - }, + ), ), }, ), @@ -9408,19 +6728,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 7, - }, - end: Position { - line: 98, - column: 8, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 7, }, - }, + ), pattern: Slice { source: ".*?", loc: SourceLocation { @@ -9434,51 +6747,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 11, - }, - end: Position { - line: 98, - column: 12, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 12, - }, - end: Position { - line: 98, - column: 12, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 11, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 12, - }, - end: Position { - line: 98, - column: 13, - }, + Semicolon( + Position { + line: 98, + column: 12, }, - }, + ), ), }, ), @@ -9487,19 +6772,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 14, - }, - end: Position { - line: 98, - column: 15, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 14, }, - }, + ), pattern: Slice { source: ".+", loc: SourceLocation { @@ -9513,51 +6791,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 17, - }, - end: Position { - line: 98, - column: 18, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 18, - }, - end: Position { - line: 98, - column: 18, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 17, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 18, - }, - end: Position { - line: 98, - column: 19, - }, + Semicolon( + Position { + line: 98, + column: 18, }, - }, + ), ), }, ), @@ -9566,19 +6816,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 20, - }, - end: Position { - line: 98, - column: 21, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 20, }, - }, + ), pattern: Slice { source: ".+?", loc: SourceLocation { @@ -9592,51 +6835,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 24, - }, - end: Position { - line: 98, - column: 25, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 25, - }, - end: Position { - line: 98, - column: 25, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 24, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 25, - }, - end: Position { - line: 98, - column: 26, - }, + Semicolon( + Position { + line: 98, + column: 25, }, - }, + ), ), }, ), @@ -9645,19 +6860,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 27, - }, - end: Position { - line: 98, - column: 28, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 27, }, - }, + ), pattern: Slice { source: ".?", loc: SourceLocation { @@ -9671,51 +6879,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 30, - }, - end: Position { - line: 98, - column: 31, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 31, - }, - end: Position { - line: 98, - column: 31, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 30, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 31, - }, - end: Position { - line: 98, - column: 32, - }, + Semicolon( + Position { + line: 98, + column: 31, }, - }, + ), ), }, ), @@ -9724,19 +6904,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 33, - }, - end: Position { - line: 98, - column: 34, - }, + open_slash: ForwardSlash( + Position { + line: 98, + column: 33, }, - }, + ), pattern: Slice { source: ".??", loc: SourceLocation { @@ -9750,51 +6923,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 98, - column: 37, - }, - end: Position { - line: 98, - column: 38, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 98, - column: 38, - }, - end: Position { - line: 98, - column: 38, - }, - }, + close_slash: ForwardSlash( + Position { + line: 98, + column: 37, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 98, - column: 38, - }, - end: Position { - line: 98, - column: 39, - }, + Semicolon( + Position { + line: 98, + column: 38, }, - }, + ), ), }, ), @@ -9803,19 +6948,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 1, - }, - end: Position { - line: 99, - column: 2, - }, + open_slash: ForwardSlash( + Position { + line: 99, + column: 1, }, - }, + ), pattern: Slice { source: ".{0}", loc: SourceLocation { @@ -9829,51 +6967,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 6, - }, - end: Position { - line: 99, - column: 7, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 99, - column: 7, - }, - end: Position { - line: 99, - column: 7, - }, - }, + close_slash: ForwardSlash( + Position { + line: 99, + column: 6, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 99, - column: 7, - }, - end: Position { - line: 99, - column: 8, - }, + Semicolon( + Position { + line: 99, + column: 7, }, - }, + ), ), }, ), @@ -9882,19 +6992,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 9, - }, - end: Position { - line: 99, - column: 10, - }, + open_slash: ForwardSlash( + Position { + line: 99, + column: 9, }, - }, + ), pattern: Slice { source: ".{0,}", loc: SourceLocation { @@ -9908,51 +7011,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 15, - }, - end: Position { - line: 99, - column: 16, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 99, - column: 16, - }, - end: Position { - line: 99, - column: 16, - }, - }, + close_slash: ForwardSlash( + Position { + line: 99, + column: 15, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 99, - column: 16, - }, - end: Position { - line: 99, - column: 17, - }, + Semicolon( + Position { + line: 99, + column: 16, }, - }, + ), ), }, ), @@ -9961,19 +7036,12 @@ Mod( expr: Lit( RegEx( RegEx { - open_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 18, - }, - end: Position { - line: 99, - column: 19, - }, + open_slash: ForwardSlash( + Position { + line: 99, + column: 18, }, - }, + ), pattern: Slice { source: ".{0,0}", loc: SourceLocation { @@ -9987,51 +7055,23 @@ Mod( }, }, }, - close_slash: Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 99, - column: 25, - }, - end: Position { - line: 99, - column: 26, - }, - }, - }, - flags: Some( - Slice { - source: "", - loc: SourceLocation { - start: Position { - line: 99, - column: 26, - }, - end: Position { - line: 99, - column: 26, - }, - }, + close_slash: ForwardSlash( + Position { + line: 99, + column: 25, }, ), + flags: None, }, ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 99, - column: 26, - }, - end: Position { - line: 99, - column: 27, - }, + Semicolon( + Position { + line: 99, + column: 26, }, - }, + ), ), }, ), @@ -10042,32 +7082,35 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`a`", + open_quote: BackTick( + BackTick( + Position { + line: 101, + column: 1, + }, + ), + ), + content: Slice { + source: "a", loc: SourceLocation { start: Position { line: 101, - column: 1, + column: 2, }, end: Position { line: 101, - column: 4, + column: 3, }, }, }, - cooked: Slice { - source: "a", - loc: SourceLocation { - start: Position { - line: 101, - column: 2, - }, - end: Position { + close_quote: BackTick( + BackTick( + Position { line: 101, column: 3, }, - }, - }, + ), + ), }, ], expressions: [], @@ -10075,19 +7118,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 101, - column: 4, - }, - end: Position { - line: 101, - column: 5, - }, + Semicolon( + Position { + line: 101, + column: 4, }, - }, + ), ), }, ), @@ -10098,20 +7134,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`${", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 101, column: 6, }, - end: Position { - line: 101, - column: 9, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "", loc: SourceLocation { start: Position { @@ -10124,22 +7155,25 @@ Mod( }, }, }, + close_quote: OpenBrace( + DollarSignOpenBrace( + Position { + line: 101, + column: 7, + }, + ), + ), }, TemplateElement { - raw: Slice { - source: "}`", - loc: SourceLocation { - start: Position { + open_quote: CloseBrace( + CloseBrace( + Position { line: 101, column: 10, }, - end: Position { - line: 101, - column: 12, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "", loc: SourceLocation { start: Position { @@ -10152,6 +7186,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 101, + column: 11, + }, + ), + ), }, ], expressions: [ @@ -10177,19 +7219,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 101, - column: 12, - }, - end: Position { - line: 101, - column: 13, - }, + Semicolon( + Position { + line: 101, + column: 12, }, - }, + ), ), }, ), @@ -10200,20 +7235,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`0${", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 101, column: 14, }, - end: Position { - line: 101, - column: 18, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "0", loc: SourceLocation { start: Position { @@ -10226,22 +7256,25 @@ Mod( }, }, }, + close_quote: OpenBrace( + DollarSignOpenBrace( + Position { + line: 101, + column: 16, + }, + ), + ), }, TemplateElement { - raw: Slice { - source: "}2`", - loc: SourceLocation { - start: Position { + open_quote: CloseBrace( + CloseBrace( + Position { line: 101, column: 21, }, - end: Position { - line: 101, - column: 24, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "2", loc: SourceLocation { start: Position { @@ -10254,6 +7287,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 101, + column: 23, + }, + ), + ), }, ], expressions: [ @@ -10278,19 +7319,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 101, - column: 19, - }, - end: Position { - line: 101, - column: 20, - }, + Comma( + Position { + line: 101, + column: 19, }, - }, + ), ), }, ListEntry { @@ -10320,19 +7354,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 101, - column: 24, - }, - end: Position { - line: 101, - column: 25, - }, + Semicolon( + Position { + line: 101, + column: 24, }, - }, + ), ), }, ), @@ -10343,20 +7370,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`0${", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 101, column: 26, }, - end: Position { - line: 101, - column: 30, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "0", loc: SourceLocation { start: Position { @@ -10369,22 +7391,25 @@ Mod( }, }, }, + close_quote: OpenBrace( + DollarSignOpenBrace( + Position { + line: 101, + column: 28, + }, + ), + ), }, TemplateElement { - raw: Slice { - source: "}4`", - loc: SourceLocation { - start: Position { + open_quote: CloseBrace( + CloseBrace( + Position { line: 101, column: 38, }, - end: Position { - line: 101, - column: 41, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "4", loc: SourceLocation { start: Position { @@ -10397,6 +7422,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 101, + column: 40, + }, + ), + ), }, ], expressions: [ @@ -10405,20 +7438,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`1${", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 101, column: 30, }, - end: Position { - line: 101, - column: 34, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "1", loc: SourceLocation { start: Position { @@ -10431,22 +7459,25 @@ Mod( }, }, }, + close_quote: OpenBrace( + DollarSignOpenBrace( + Position { + line: 101, + column: 32, + }, + ), + ), }, TemplateElement { - raw: Slice { - source: "}3`", - loc: SourceLocation { - start: Position { + open_quote: CloseBrace( + CloseBrace( + Position { line: 101, column: 35, }, - end: Position { - line: 101, - column: 38, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "3", loc: SourceLocation { start: Position { @@ -10459,6 +7490,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 101, + column: 37, + }, + ), + ), }, ], expressions: [ @@ -10488,19 +7527,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 101, - column: 41, - }, - end: Position { - line: 101, - column: 42, - }, + Semicolon( + Position { + line: 101, + column: 41, }, - }, + ), ), }, ), @@ -10511,20 +7543,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`\\``", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 102, column: 1, }, - end: Position { - line: 102, - column: 5, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "\\`", loc: SourceLocation { start: Position { @@ -10537,6 +7564,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 102, + column: 4, + }, + ), + ), }, ], expressions: [], @@ -10544,19 +7579,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 102, - column: 5, - }, - end: Position { - line: 102, - column: 6, - }, + Semicolon( + Position { + line: 102, + column: 5, }, - }, + ), ), }, ), @@ -10567,20 +7595,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`a\\${b`", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 102, column: 7, }, - end: Position { - line: 102, - column: 14, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "a\\${b", loc: SourceLocation { start: Position { @@ -10593,6 +7616,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 102, + column: 13, + }, + ), + ), }, ], expressions: [], @@ -10600,19 +7631,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 102, - column: 14, - }, - end: Position { - line: 102, - column: 15, - }, + Semicolon( + Position { + line: 102, + column: 14, }, - }, + ), ), }, ), @@ -10623,20 +7647,15 @@ Mod( TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`\\0\\n\\x0A\\u000A\\u{A}`", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 102, column: 16, }, - end: Position { - line: 102, - column: 32, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "\\0\\n\\x0A\\u000A\\u{A}", loc: SourceLocation { start: Position { @@ -10649,6 +7668,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 102, + column: 31, + }, + ), + ), }, ], expressions: [], @@ -10656,53 +7683,32 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 102, - column: 32, - }, - end: Position { - line: 102, - column: 33, - }, + Semicolon( + Position { + line: 102, + column: 32, }, - }, + ), ), }, ), Stmt( Expr { expr: This( - Slice { - source: "this", - loc: SourceLocation { - start: Position { - line: 104, - column: 1, - }, - end: Position { - line: 104, - column: 5, - }, + This( + Position { + line: 104, + column: 1, }, - }, + ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 104, - column: 5, - }, - end: Position { - line: 104, - column: 6, - }, + Semicolon( + Position { + line: 104, + column: 5, }, - }, + ), ), }, ), @@ -10726,19 +7732,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 106, - column: 2, - }, - end: Position { - line: 106, - column: 3, - }, + Semicolon( + Position { + line: 106, + column: 2, }, - }, + ), ), }, ), @@ -10746,49 +7745,28 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 1, - }, - end: Position { - line: 108, - column: 2, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 1, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 2, - }, - end: Position { - line: 108, - column: 3, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 2, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 3, - }, - end: Position { - line: 108, - column: 4, - }, + Semicolon( + Position { + line: 108, + column: 3, }, - }, + ), ), }, ), @@ -10796,68 +7774,40 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 5, - }, - end: Position { - line: 108, - column: 6, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 5, }, - }, + ), elements: [ ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 6, - }, - end: Position { - line: 108, - column: 7, - }, + Comma( + Position { + line: 108, + column: 6, }, - }, + ), ), }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 7, - }, - end: Position { - line: 108, - column: 8, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 7, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 8, - }, - end: Position { - line: 108, - column: 9, - }, + Semicolon( + Position { + line: 108, + column: 8, }, - }, + ), ), }, ), @@ -10865,19 +7815,12 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 10, - }, - end: Position { - line: 108, - column: 11, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 10, }, - }, + ), elements: [ ListEntry { item: Some( @@ -10902,35 +7845,21 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 12, - }, - end: Position { - line: 108, - column: 13, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 12, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 13, - }, - end: Position { - line: 108, - column: 14, - }, + Semicolon( + Position { + line: 108, + column: 13, }, - }, + ), ), }, ), @@ -10938,19 +7867,12 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 15, - }, - end: Position { - line: 108, - column: 16, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 15, }, - }, + ), elements: [ ListEntry { item: Some( @@ -10973,51 +7895,30 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 17, - }, - end: Position { - line: 108, - column: 18, - }, + Comma( + Position { + line: 108, + column: 17, }, - }, + ), ), }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 18, - }, - end: Position { - line: 108, - column: 19, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 18, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 19, - }, - end: Position { - line: 108, - column: 20, - }, + Semicolon( + Position { + line: 108, + column: 19, }, - }, + ), ), }, ), @@ -11025,36 +7926,22 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 21, - }, - end: Position { - line: 108, - column: 22, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 21, }, - }, + ), elements: [ ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 22, - }, - end: Position { - line: 108, - column: 23, - }, + Comma( + Position { + line: 108, + column: 22, }, - }, + ), ), }, ListEntry { @@ -11080,35 +7967,21 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 24, - }, - end: Position { - line: 108, - column: 25, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 24, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 25, - }, - end: Position { - line: 108, - column: 26, - }, + Semicolon( + Position { + line: 108, + column: 25, }, - }, + ), ), }, ), @@ -11116,19 +7989,12 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 27, - }, - end: Position { - line: 108, - column: 28, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 27, }, - }, + ), elements: [ ListEntry { item: Some( @@ -11151,19 +8017,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 29, - }, - end: Position { - line: 108, - column: 30, - }, + Comma( + Position { + line: 108, + column: 29, }, - }, + ), ), }, ListEntry { @@ -11189,35 +8048,21 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 31, - }, - end: Position { - line: 108, - column: 32, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 31, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 32, - }, - end: Position { - line: 108, - column: 33, - }, + Semicolon( + Position { + line: 108, + column: 32, }, - }, + ), ), }, ), @@ -11225,19 +8070,12 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 34, - }, - end: Position { - line: 108, - column: 35, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 34, }, - }, + ), elements: [ ListEntry { item: Some( @@ -11260,19 +8098,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 36, - }, - end: Position { - line: 108, - column: 37, - }, + Comma( + Position { + line: 108, + column: 36, }, - }, + ), ), }, ListEntry { @@ -11296,51 +8127,30 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 38, - }, - end: Position { - line: 108, - column: 39, - }, + Comma( + Position { + line: 108, + column: 38, }, - }, + ), ), }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 39, - }, - end: Position { - line: 108, - column: 40, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 39, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 40, - }, - end: Position { - line: 108, - column: 41, - }, + Semicolon( + Position { + line: 108, + column: 40, }, - }, + ), ), }, ), @@ -11348,19 +8158,12 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 42, - }, - end: Position { - line: 108, - column: 43, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 42, }, - }, + ), elements: [ ListEntry { item: Some( @@ -11383,37 +8186,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 44, - }, - end: Position { - line: 108, - column: 45, - }, + Comma( + Position { + line: 108, + column: 44, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 45, - }, - end: Position { - line: 108, - column: 46, - }, + Comma( + Position { + line: 108, + column: 45, }, - }, + ), ), }, ListEntry { @@ -11439,35 +8228,21 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 47, - }, - end: Position { - line: 108, - column: 48, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 47, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 48, - }, - end: Position { - line: 108, - column: 49, - }, + Semicolon( + Position { + line: 108, + column: 48, }, - }, + ), ), }, ), @@ -11475,86 +8250,51 @@ Mod( Expr { expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 108, - column: 50, - }, - end: Position { - line: 108, - column: 51, - }, + open_bracket: OpenBracket( + Position { + line: 108, + column: 50, }, - }, + ), elements: [ ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 51, - }, - end: Position { - line: 108, - column: 52, - }, + Comma( + Position { + line: 108, + column: 51, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 108, - column: 52, - }, - end: Position { - line: 108, - column: 53, - }, + Comma( + Position { + line: 108, + column: 52, }, - }, + ), ), }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 108, - column: 53, - }, - end: Position { - line: 108, - column: 54, - }, + close_bracket: CloseBracket( + Position { + line: 108, + column: 53, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 108, - column: 54, - }, - end: Position { - line: 108, - column: 55, - }, + Semicolon( + Position { + line: 108, + column: 54, }, - }, + ), ), }, ), @@ -11562,79 +8302,44 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 1, - }, - end: Position { - line: 110, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 1, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 2, - }, - end: Position { - line: 110, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 2, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 3, - }, - end: Position { - line: 110, - column: 4, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 3, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 4, - }, - end: Position { - line: 110, - column: 5, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 4, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 5, - }, - end: Position { - line: 110, - column: 6, - }, + Semicolon( + Position { + line: 110, + column: 5, }, - }, + ), ), }, ), @@ -11642,34 +8347,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 7, - }, - end: Position { - line: 110, - column: 8, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 7, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 8, - }, - end: Position { - line: 110, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 8, }, - }, + ), props: [ ListEntry { item: Prop( @@ -11705,50 +8396,29 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 10, - }, - end: Position { - line: 110, - column: 11, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 10, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 11, - }, - end: Position { - line: 110, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 11, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 12, - }, - end: Position { - line: 110, - column: 13, - }, + Semicolon( + Position { + line: 110, + column: 12, }, - }, + ), ), }, ), @@ -11756,34 +8426,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 14, - }, - end: Position { - line: 110, - column: 15, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 14, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 15, - }, - end: Position { - line: 110, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 15, }, - }, + ), props: [ ListEntry { item: Prop( @@ -11812,19 +8468,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 17, - }, - end: Position { - line: 110, - column: 18, - }, + Colon( + Position { + line: 110, + column: 17, }, - }, + ), ), value: Some( Expr( @@ -11853,50 +8502,29 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 19, - }, - end: Position { - line: 110, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 19, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 20, - }, - end: Position { - line: 110, - column: 21, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 20, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 21, - }, - end: Position { - line: 110, - column: 22, - }, + Semicolon( + Position { + line: 110, + column: 21, }, - }, + ), ), }, ), @@ -11904,34 +8532,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 23, - }, - end: Position { - line: 110, - column: 24, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 23, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 24, - }, - end: Position { - line: 110, - column: 25, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 24, }, - }, + ), props: [ ListEntry { item: Prop( @@ -11960,19 +8574,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 26, - }, - end: Position { - line: 110, - column: 27, - }, + Colon( + Position { + line: 110, + column: 26, }, - }, + ), ), value: Some( Expr( @@ -11999,19 +8606,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 110, - column: 28, - }, - end: Position { - line: 110, - column: 29, - }, + Comma( + Position { + line: 110, + column: 28, }, - }, + ), ), }, ListEntry { @@ -12041,19 +8641,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 30, - }, - end: Position { - line: 110, - column: 31, - }, + Colon( + Position { + line: 110, + column: 30, }, - }, + ), ), value: Some( Expr( @@ -12082,50 +8675,29 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 32, - }, - end: Position { - line: 110, - column: 33, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 32, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 33, - }, - end: Position { - line: 110, - column: 34, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 33, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 34, - }, - end: Position { - line: 110, - column: 35, - }, + Semicolon( + Position { + line: 110, + column: 34, }, - }, + ), ), }, ), @@ -12133,34 +8705,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 36, - }, - end: Position { - line: 110, - column: 37, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 36, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 37, - }, - end: Position { - line: 110, - column: 38, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 37, }, - }, + ), props: [ ListEntry { item: Prop( @@ -12189,19 +8747,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 39, - }, - end: Position { - line: 110, - column: 40, - }, + Colon( + Position { + line: 110, + column: 39, }, - }, + ), ), value: Some( Expr( @@ -12228,66 +8779,38 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 110, - column: 41, - }, - end: Position { - line: 110, - column: 42, - }, + Comma( + Position { + line: 110, + column: 41, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 42, - }, - end: Position { - line: 110, - column: 43, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 42, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 43, - }, - end: Position { - line: 110, - column: 44, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 43, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 44, - }, - end: Position { - line: 110, - column: 45, - }, + Semicolon( + Position { + line: 110, + column: 44, }, - }, + ), ), }, ), @@ -12295,34 +8818,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 110, - column: 46, - }, - end: Position { - line: 110, - column: 47, - }, + open_paren: OpenParen( + Position { + line: 110, + column: 46, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 110, - column: 47, - }, - end: Position { - line: 110, - column: 48, - }, + open_brace: OpenBrace( + Position { + line: 110, + column: 47, }, - }, + ), props: [ ListEntry { item: Prop( @@ -12332,19 +8841,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 110, column: 48, }, - end: Position { - line: 110, - column: 49, - }, - }, - }, + ), + ), content: Slice { source: "x", loc: SourceLocation { @@ -12358,38 +8862,26 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 110, column: 50, }, - end: Position { - line: 110, - column: 51, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 51, - }, - end: Position { - line: 110, - column: 52, - }, + Colon( + Position { + line: 110, + column: 51, }, - }, + ), ), value: Some( Expr( @@ -12416,19 +8908,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 110, - column: 53, - }, - end: Position { - line: 110, - column: 54, - }, + Comma( + Position { + line: 110, + column: 53, }, - }, + ), ), }, ListEntry { @@ -12439,19 +8924,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 110, column: 54, }, - end: Position { - line: 110, - column: 55, - }, - }, - }, + ), + ), content: Slice { source: "y", loc: SourceLocation { @@ -12465,38 +8945,26 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 110, column: 56, }, - end: Position { - line: 110, - column: 57, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 57, - }, - end: Position { - line: 110, - column: 58, - }, + Colon( + Position { + line: 110, + column: 57, }, - }, + ), ), value: Some( Expr( @@ -12523,19 +8991,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 110, - column: 59, - }, - end: Position { - line: 110, - column: 60, - }, + Comma( + Position { + line: 110, + column: 59, }, - }, + ), ), }, ListEntry { @@ -12565,19 +9026,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 110, - column: 62, - }, - end: Position { - line: 110, - column: 63, - }, + Colon( + Position { + line: 110, + column: 62, }, - }, + ), ), value: Some( Expr( @@ -12606,50 +9060,29 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 110, - column: 64, - }, - end: Position { - line: 110, - column: 65, - }, + close_brace: CloseBrace( + Position { + line: 110, + column: 64, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 110, - column: 65, - }, - end: Position { - line: 110, - column: 66, - }, + close_paren: CloseParen( + Position { + line: 110, + column: 65, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 110, - column: 66, - }, - end: Position { - line: 110, - column: 67, - }, + Semicolon( + Position { + line: 110, + column: 66, }, - }, + ), ), }, ), @@ -12657,34 +9090,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 111, - column: 1, - }, - end: Position { - line: 111, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 111, + column: 1, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 111, - column: 2, - }, - end: Position { - line: 111, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 111, + column: 2, }, - }, + ), props: [ ListEntry { item: Prop( @@ -12711,19 +9130,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 4, - }, - end: Position { - line: 112, - column: 5, - }, + Colon( + Position { + line: 112, + column: 4, }, - }, + ), ), value: Some( Expr( @@ -12750,19 +9162,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 7, - }, - end: Position { - line: 112, - column: 8, - }, + Comma( + Position { + line: 112, + column: 7, }, - }, + ), ), }, ListEntry { @@ -12790,19 +9195,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 11, - }, - end: Position { - line: 112, - column: 12, - }, + Colon( + Position { + line: 112, + column: 11, }, - }, + ), ), value: Some( Expr( @@ -12829,19 +9227,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 14, - }, - end: Position { - line: 112, - column: 15, - }, + Comma( + Position { + line: 112, + column: 14, }, - }, + ), ), }, ListEntry { @@ -12869,19 +9260,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 19, - }, - end: Position { - line: 112, - column: 20, - }, + Colon( + Position { + line: 112, + column: 19, }, - }, + ), ), value: Some( Expr( @@ -12908,19 +9292,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 22, - }, - end: Position { - line: 112, - column: 23, - }, + Comma( + Position { + line: 112, + column: 22, }, - }, + ), ), }, ListEntry { @@ -12948,19 +9325,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 26, - }, - end: Position { - line: 112, - column: 27, - }, + Colon( + Position { + line: 112, + column: 26, }, - }, + ), ), value: Some( Expr( @@ -12987,19 +9357,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 29, - }, - end: Position { - line: 112, - column: 30, - }, + Comma( + Position { + line: 112, + column: 29, }, - }, + ), ), }, ListEntry { @@ -13027,19 +9390,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 34, - }, - end: Position { - line: 112, - column: 35, - }, + Colon( + Position { + line: 112, + column: 34, }, - }, + ), ), value: Some( Expr( @@ -13066,19 +9422,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 37, - }, - end: Position { - line: 112, - column: 38, - }, + Comma( + Position { + line: 112, + column: 37, }, - }, + ), ), }, ListEntry { @@ -13106,19 +9455,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 42, - }, - end: Position { - line: 112, - column: 43, - }, + Colon( + Position { + line: 112, + column: 42, }, - }, + ), ), value: Some( Expr( @@ -13145,19 +9487,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 45, - }, - end: Position { - line: 112, - column: 46, - }, + Comma( + Position { + line: 112, + column: 45, }, - }, + ), ), }, ListEntry { @@ -13184,49 +9519,28 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 112, - column: 47, - }, - end: Position { - line: 112, - column: 48, - }, + OpenBracket( + Position { + line: 112, + column: 47, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 112, - column: 49, - }, - end: Position { - line: 112, - column: 50, - }, + ), + CloseBracket( + Position { + line: 112, + column: 49, }, - }, + ), ), ), }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 112, - column: 50, - }, - end: Position { - line: 112, - column: 51, - }, + Colon( + Position { + line: 112, + column: 50, }, - }, + ), ), value: Some( Expr( @@ -13253,19 +9567,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 112, - column: 53, - }, - end: Position { - line: 112, - column: 54, - }, + Comma( + Position { + line: 112, + column: 53, }, - }, + ), ), }, ListEntry { @@ -13273,19 +9580,12 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 113, - column: 3, - }, - end: Position { - line: 113, - column: 6, - }, + keyword_get: Get( + Position { + line: 113, + column: 3, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -13308,78 +9608,43 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 113, - column: 8, - }, - end: Position { - line: 113, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 113, + column: 8, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 113, - column: 9, - }, - end: Position { - line: 113, - column: 10, - }, + ), + close_paren: CloseParen( + Position { + line: 113, + column: 9, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 113, - column: 10, - }, - end: Position { - line: 113, - column: 11, - }, + open_brace: OpenBrace( + Position { + line: 113, + column: 10, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 113, - column: 11, - }, - end: Position { - line: 113, - column: 12, - }, + close_brace: CloseBrace( + Position { + line: 113, + column: 11, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 113, - column: 12, - }, - end: Position { - line: 113, - column: 13, - }, + Comma( + Position { + line: 113, + column: 12, }, - }, + ), ), }, ListEntry { @@ -13387,19 +9652,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 113, - column: 14, - }, - end: Position { - line: 113, - column: 17, - }, + keyword_set: Set( + Position { + line: 113, + column: 14, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -13422,19 +9680,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 113, - column: 19, - }, - end: Position { - line: 113, - column: 20, - }, + open_paren: OpenParen( + Position { + line: 113, + column: 19, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -13457,65 +9708,37 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 113, - column: 21, - }, - end: Position { - line: 113, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 113, + column: 21, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 113, - column: 22, - }, - end: Position { - line: 113, - column: 23, - }, + open_brace: OpenBrace( + Position { + line: 113, + column: 22, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 113, - column: 23, - }, - end: Position { - line: 113, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 113, + column: 23, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 113, - column: 24, - }, - end: Position { - line: 113, - column: 25, - }, + Comma( + Position { + line: 113, + column: 24, }, - }, + ), ), }, ListEntry { @@ -13523,36 +9746,24 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 113, - column: 26, - }, - end: Position { - line: 113, - column: 29, - }, + keyword_get: Get( + Position { + line: 113, + column: 26, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 113, column: 30, }, - end: Position { - line: 113, - column: 31, - }, - }, - }, + ), + ), content: Slice { source: "y", loc: SourceLocation { @@ -13566,96 +9777,56 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 113, column: 32, }, - end: Position { - line: 113, - column: 33, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 113, - column: 33, - }, - end: Position { - line: 113, - column: 34, - }, + open_paren: OpenParen( + Position { + line: 113, + column: 33, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 113, - column: 34, - }, - end: Position { - line: 113, - column: 35, - }, + ), + close_paren: CloseParen( + Position { + line: 113, + column: 34, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 113, - column: 35, - }, - end: Position { - line: 113, - column: 36, - }, + open_brace: OpenBrace( + Position { + line: 113, + column: 35, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 113, - column: 36, - }, - end: Position { - line: 113, - column: 37, - }, + close_brace: CloseBrace( + Position { + line: 113, + column: 36, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 113, - column: 37, - }, - end: Position { - line: 113, - column: 38, - }, + Comma( + Position { + line: 113, + column: 37, }, - }, + ), ), }, ListEntry { @@ -13663,36 +9834,24 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 113, - column: 39, - }, - end: Position { - line: 113, - column: 42, - }, + keyword_set: Set( + Position { + line: 113, + column: 39, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 113, column: 43, }, - end: Position { - line: 113, - column: 44, - }, - }, - }, + ), + ), content: Slice { source: "y", loc: SourceLocation { @@ -13706,37 +9865,25 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 113, column: 45, }, - end: Position { - line: 113, - column: 46, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 113, - column: 46, - }, - end: Position { - line: 113, - column: 47, - }, + open_paren: OpenParen( + Position { + line: 113, + column: 46, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -13759,65 +9906,37 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { + close_paren: CloseParen( + Position { + line: 113, + column: 48, + }, + ), + body: FuncBody { + open_brace: OpenBrace( + Position { line: 113, - column: 48, + column: 49, }, - end: Position { + ), + stmts: [], + close_brace: CloseBrace( + Position { line: 113, - column: 49, + column: 50, }, - }, - }, - body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 113, - column: 49, - }, - end: Position { - line: 113, - column: 50, - }, - }, - }, - stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 113, - column: 50, - }, - end: Position { - line: 113, - column: 51, - }, - }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 113, - column: 51, - }, - end: Position { - line: 113, - column: 52, - }, + Comma( + Position { + line: 113, + column: 51, }, - }, + ), ), }, ListEntry { @@ -13825,19 +9944,12 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 114, - column: 3, - }, - end: Position { - line: 114, - column: 6, - }, + keyword_get: Get( + Position { + line: 114, + column: 3, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -13858,78 +9970,43 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 114, - column: 8, - }, - end: Position { - line: 114, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 114, + column: 8, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 114, - column: 9, - }, - end: Position { - line: 114, - column: 10, - }, + ), + close_paren: CloseParen( + Position { + line: 114, + column: 9, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 114, - column: 10, - }, - end: Position { - line: 114, - column: 11, - }, + open_brace: OpenBrace( + Position { + line: 114, + column: 10, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 114, - column: 11, - }, - end: Position { - line: 114, - column: 12, - }, + close_brace: CloseBrace( + Position { + line: 114, + column: 11, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 114, - column: 12, - }, - end: Position { - line: 114, - column: 13, - }, + Comma( + Position { + line: 114, + column: 12, }, - }, + ), ), }, ListEntry { @@ -13937,19 +10014,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 114, - column: 14, - }, - end: Position { - line: 114, - column: 17, - }, + keyword_set: Set( + Position { + line: 114, + column: 14, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -13970,19 +10040,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 114, - column: 19, - }, - end: Position { - line: 114, - column: 20, - }, + open_paren: OpenParen( + Position { + line: 114, + column: 19, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -14005,65 +10068,37 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 114, - column: 21, - }, - end: Position { - line: 114, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 114, + column: 21, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 114, - column: 22, - }, - end: Position { - line: 114, - column: 23, - }, + open_brace: OpenBrace( + Position { + line: 114, + column: 22, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 114, - column: 23, - }, - end: Position { - line: 114, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 114, + column: 23, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 114, - column: 24, - }, - end: Position { - line: 114, - column: 25, - }, + Comma( + Position { + line: 114, + column: 24, }, - }, + ), ), }, ListEntry { @@ -14071,19 +10106,12 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 114, - column: 26, - }, - end: Position { - line: 114, - column: 29, - }, + keyword_get: Get( + Position { + line: 114, + column: 26, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -14106,78 +10134,43 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 114, - column: 33, - }, - end: Position { - line: 114, - column: 34, - }, + open_paren: OpenParen( + Position { + line: 114, + column: 33, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 114, - column: 34, - }, - end: Position { - line: 114, - column: 35, - }, + ), + close_paren: CloseParen( + Position { + line: 114, + column: 34, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 114, - column: 35, - }, - end: Position { - line: 114, - column: 36, - }, + open_brace: OpenBrace( + Position { + line: 114, + column: 35, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 114, - column: 36, - }, - end: Position { - line: 114, - column: 37, - }, + close_brace: CloseBrace( + Position { + line: 114, + column: 36, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 114, - column: 37, - }, - end: Position { - line: 114, - column: 38, - }, + Comma( + Position { + line: 114, + column: 37, }, - }, + ), ), }, ListEntry { @@ -14185,19 +10178,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 114, - column: 39, - }, - end: Position { - line: 114, - column: 42, - }, + keyword_set: Set( + Position { + line: 114, + column: 39, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -14220,19 +10206,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 114, - column: 46, - }, - end: Position { - line: 114, - column: 47, - }, + open_paren: OpenParen( + Position { + line: 114, + column: 46, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -14255,65 +10234,37 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 114, - column: 48, - }, - end: Position { - line: 114, - column: 49, - }, + close_paren: CloseParen( + Position { + line: 114, + column: 48, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 114, - column: 49, - }, - end: Position { - line: 114, - column: 50, - }, + open_brace: OpenBrace( + Position { + line: 114, + column: 49, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 114, - column: 50, - }, - end: Position { - line: 114, - column: 51, - }, + close_brace: CloseBrace( + Position { + line: 114, + column: 50, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 114, - column: 51, - }, - end: Position { - line: 114, - column: 52, - }, + Comma( + Position { + line: 114, + column: 51, }, - }, + ), ), }, ListEntry { @@ -14321,19 +10272,12 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 115, - column: 3, - }, - end: Position { - line: 115, - column: 6, - }, + keyword_get: Get( + Position { + line: 115, + column: 3, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -14354,107 +10298,58 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 115, - column: 7, - }, - end: Position { - line: 115, - column: 8, - }, + OpenBracket( + Position { + line: 115, + column: 7, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 115, - column: 9, - }, - end: Position { - line: 115, - column: 10, - }, + ), + CloseBracket( + Position { + line: 115, + column: 9, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 115, - column: 10, - }, - end: Position { - line: 115, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 115, + column: 10, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 115, - column: 11, - }, - end: Position { - line: 115, - column: 12, - }, + ), + close_paren: CloseParen( + Position { + line: 115, + column: 11, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 115, - column: 12, - }, - end: Position { - line: 115, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 115, + column: 12, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 115, - column: 13, - }, - end: Position { - line: 115, - column: 14, - }, + close_brace: CloseBrace( + Position { + line: 115, + column: 13, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 115, - column: 14, - }, - end: Position { - line: 115, - column: 15, - }, + Comma( + Position { + line: 115, + column: 14, }, - }, + ), ), }, ListEntry { @@ -14462,19 +10357,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 115, - column: 16, - }, - end: Position { - line: 115, - column: 19, - }, + keyword_set: Set( + Position { + line: 115, + column: 16, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -14495,48 +10383,27 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 115, - column: 20, - }, - end: Position { - line: 115, - column: 21, - }, + OpenBracket( + Position { + line: 115, + column: 20, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 115, - column: 22, - }, - end: Position { - line: 115, - column: 23, - }, + ), + CloseBracket( + Position { + line: 115, + column: 22, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 115, - column: 23, - }, - end: Position { - line: 115, - column: 24, - }, + open_paren: OpenParen( + Position { + line: 115, + column: 23, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -14559,65 +10426,37 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 115, - column: 25, - }, - end: Position { - line: 115, - column: 26, - }, + close_paren: CloseParen( + Position { + line: 115, + column: 25, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 115, - column: 26, - }, - end: Position { - line: 115, - column: 27, - }, + open_brace: OpenBrace( + Position { + line: 115, + column: 26, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 115, - column: 27, - }, - end: Position { - line: 115, - column: 28, - }, + close_brace: CloseBrace( + Position { + line: 115, + column: 27, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 115, - column: 28, - }, - end: Position { - line: 115, - column: 29, - }, + Comma( + Position { + line: 115, + column: 28, }, - }, + ), ), }, ListEntry { @@ -14646,109 +10485,60 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 115, - column: 30, - }, - end: Position { - line: 115, - column: 31, - }, + OpenBracket( + Position { + line: 115, + column: 30, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 115, - column: 32, - }, - end: Position { - line: 115, - column: 33, - }, + ), + CloseBracket( + Position { + line: 115, + column: 32, }, - }, + ), ), ), }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + open_paren: OpenParen( + Position { + line: 115, + column: 33, + }, + ), + params: [], + close_paren: CloseParen( + Position { + line: 115, + column: 34, + }, + ), + body: FuncBody { + open_brace: OpenBrace( + Position { line: 115, - column: 33, + column: 35, }, - end: Position { + ), + stmts: [], + close_brace: CloseBrace( + Position { line: 115, - column: 34, - }, - }, - }, - params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 115, - column: 34, - }, - end: Position { - line: 115, - column: 35, - }, - }, - }, - body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 115, - column: 35, - }, - end: Position { - line: 115, - column: 36, - }, - }, - }, - stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 115, - column: 36, - }, - end: Position { - line: 115, - column: 37, - }, + column: 36, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 115, - column: 37, - }, - end: Position { - line: 115, - column: 38, - }, + Comma( + Position { + line: 115, + column: 37, }, - }, + ), ), }, ListEntry { @@ -14780,79 +10570,44 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 4, - }, - end: Position { - line: 116, - column: 5, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 4, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 5, - }, - end: Position { - line: 116, - column: 6, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 5, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 6, - }, - end: Position { - line: 116, - column: 7, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 6, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 7, - }, - end: Position { - line: 116, - column: 8, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 7, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 8, - }, - end: Position { - line: 116, - column: 9, - }, + Comma( + Position { + line: 116, + column: 8, }, - }, + ), ), }, ListEntry { @@ -14865,19 +10620,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 116, column: 10, }, - end: Position { - line: 116, - column: 11, - }, - }, - }, + ), + ), content: Slice { source: "b", loc: SourceLocation { @@ -14891,98 +10641,58 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 116, column: 12, }, - end: Position { - line: 116, - column: 13, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 13, - }, - end: Position { - line: 116, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 14, - }, - end: Position { - line: 116, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 15, - }, - end: Position { - line: 116, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 15, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 16, - }, - end: Position { - line: 116, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 16, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 17, - }, - end: Position { - line: 116, - column: 18, - }, + Comma( + Position { + line: 116, + column: 17, }, - }, + ), ), }, ListEntry { @@ -14995,19 +10705,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 116, column: 19, }, - end: Position { - line: 116, - column: 20, - }, - }, - }, + ), + ), content: Slice { source: "c", loc: SourceLocation { @@ -15021,98 +10726,58 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 116, column: 21, }, - end: Position { - line: 116, - column: 22, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 22, - }, - end: Position { - line: 116, - column: 23, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 22, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 23, - }, - end: Position { - line: 116, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 23, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 24, - }, - end: Position { - line: 116, - column: 25, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 24, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 25, - }, - end: Position { - line: 116, - column: 26, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 25, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 26, - }, - end: Position { - line: 116, - column: 27, - }, + Comma( + Position { + line: 116, + column: 26, }, - }, + ), ), }, ListEntry { @@ -15142,79 +10807,44 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 29, - }, - end: Position { - line: 116, - column: 30, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 29, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 30, - }, - end: Position { - line: 116, - column: 31, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 30, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 31, - }, - end: Position { - line: 116, - column: 32, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 31, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 32, - }, - end: Position { - line: 116, - column: 33, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 32, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 33, - }, - end: Position { - line: 116, - column: 34, - }, + Comma( + Position { + line: 116, + column: 33, }, - }, + ), ), }, ListEntry { @@ -15244,79 +10874,44 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 37, - }, - end: Position { - line: 116, - column: 38, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 37, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 38, - }, - end: Position { - line: 116, - column: 39, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 38, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 39, - }, - end: Position { - line: 116, - column: 40, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 39, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 40, - }, - end: Position { - line: 116, - column: 41, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 40, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 41, - }, - end: Position { - line: 116, - column: 42, - }, + Comma( + Position { + line: 116, + column: 41, }, - }, + ), ), }, ListEntry { @@ -15346,79 +10941,44 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 45, - }, - end: Position { - line: 116, - column: 46, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 45, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 46, - }, - end: Position { - line: 116, - column: 47, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 46, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 47, - }, - end: Position { - line: 116, - column: 48, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 47, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 48, - }, - end: Position { - line: 116, - column: 49, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 48, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 49, - }, - end: Position { - line: 116, - column: 50, - }, + Comma( + Position { + line: 116, + column: 49, }, - }, + ), ), }, ListEntry { @@ -15448,79 +11008,44 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 116, - column: 54, - }, - end: Position { - line: 116, - column: 55, - }, + open_paren: OpenParen( + Position { + line: 116, + column: 54, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 116, - column: 55, - }, - end: Position { - line: 116, - column: 56, - }, + close_paren: CloseParen( + Position { + line: 116, + column: 55, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 116, - column: 56, - }, - end: Position { - line: 116, - column: 57, - }, + open_brace: OpenBrace( + Position { + line: 116, + column: 56, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 116, - column: 57, - }, - end: Position { - line: 116, - column: 58, - }, + close_brace: CloseBrace( + Position { + line: 116, + column: 57, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 116, - column: 58, - }, - end: Position { - line: 116, - column: 59, - }, + Comma( + Position { + line: 116, + column: 58, }, - }, + ), ), }, ListEntry { @@ -15552,19 +11077,12 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 117, - column: 6, - }, - end: Position { - line: 117, - column: 7, - }, + open_paren: OpenParen( + Position { + line: 117, + column: 6, }, - }, + ), params: [ ListEntry { item: Pat( @@ -15587,19 +11105,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 8, - }, - end: Position { - line: 117, - column: 9, - }, + Comma( + Position { + line: 117, + column: 8, }, - }, + ), ), }, ListEntry { @@ -15624,19 +11135,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 117, - column: 12, - }, - end: Position { - line: 117, - column: 13, - }, + Equal( + Position { + line: 117, + column: 12, }, - }, + ), ), right: Lit( Number( @@ -15659,38 +11163,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 15, - }, - end: Position { - line: 117, - column: 16, - }, + Comma( + Position { + line: 117, + column: 15, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 117, - column: 17, - }, - end: Position { - line: 117, - column: 18, - }, + open_bracket: OpenBracket( + Position { + line: 117, + column: 17, }, - }, + ), elements: [ ListEntry { item: Some( @@ -15715,37 +11205,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 19, - }, - end: Position { - line: 117, - column: 20, - }, + Comma( + Position { + line: 117, + column: 19, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 20, - }, - end: Position { - line: 117, - column: 21, - }, + Comma( + Position { + line: 117, + column: 20, }, - }, + ), ), }, ListEntry { @@ -15771,19 +11247,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 117, - column: 24, - }, - end: Position { - line: 117, - column: 25, - }, + Equal( + Position { + line: 117, + column: 24, }, - }, + ), ), right: Lit( Number( @@ -15807,38 +11276,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 27, - }, - end: Position { - line: 117, - column: 28, - }, + Comma( + Position { + line: 117, + column: 27, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 117, - column: 29, - }, - end: Position { - line: 117, - column: 32, - }, + dots: Ellipsis( + Position { + line: 117, + column: 29, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -15862,55 +11317,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 117, - column: 33, - }, - end: Position { - line: 117, - column: 34, - }, + close_bracket: CloseBracket( + Position { + line: 117, + column: 33, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 34, - }, - end: Position { - line: 117, - column: 35, - }, + Comma( + Position { + line: 117, + column: 34, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 117, - column: 36, - }, - end: Position { - line: 117, - column: 37, - }, + open_brace: OpenBrace( + Position { + line: 117, + column: 36, }, - }, + ), props: [ ListEntry { item: Assign( @@ -15944,19 +11378,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 38, - }, - end: Position { - line: 117, - column: 39, - }, + Comma( + Position { + line: 117, + column: 38, }, - }, + ), ), }, ListEntry { @@ -15986,19 +11413,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 117, - column: 41, - }, - end: Position { - line: 117, - column: 42, - }, + Colon( + Position { + line: 117, + column: 41, }, - }, + ), ), value: Some( Pat( @@ -16025,19 +11445,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 44, - }, - end: Position { - line: 117, - column: 45, - }, + Comma( + Position { + line: 117, + column: 44, }, - }, + ), ), }, ListEntry { @@ -16089,19 +11502,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 117, - column: 48, - }, - end: Position { - line: 117, - column: 49, - }, + Equal( + Position { + line: 117, + column: 48, }, - }, + ), ), right: Lit( Number( @@ -16128,19 +11534,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 51, - }, - end: Position { - line: 117, - column: 52, - }, + Comma( + Position { + line: 117, + column: 51, }, - }, + ), ), }, ListEntry { @@ -16170,19 +11569,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 117, - column: 54, - }, - end: Position { - line: 117, - column: 55, - }, + Colon( + Position { + line: 117, + column: 54, }, - }, + ), ), value: Some( Pat( @@ -16206,19 +11598,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 117, - column: 58, - }, - end: Position { - line: 117, - column: 59, - }, + Equal( + Position { + line: 117, + column: 58, }, - }, + ), ), right: Lit( Number( @@ -16247,54 +11632,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 117, - column: 61, - }, - end: Position { - line: 117, - column: 62, - }, + close_brace: CloseBrace( + Position { + line: 117, + column: 61, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 62, - }, - end: Position { - line: 117, - column: 63, - }, + Comma( + Position { + line: 117, + column: 62, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 117, - column: 64, - }, - end: Position { - line: 117, - column: 67, - }, + dots: Ellipsis( + Position { + line: 117, + column: 64, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -16317,65 +11681,37 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 117, - column: 68, - }, - end: Position { - line: 117, - column: 69, - }, + close_paren: CloseParen( + Position { + line: 117, + column: 68, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 117, - column: 69, - }, - end: Position { - line: 117, - column: 70, - }, + open_brace: OpenBrace( + Position { + line: 117, + column: 69, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 117, - column: 70, - }, - end: Position { - line: 117, - column: 71, - }, + close_brace: CloseBrace( + Position { + line: 117, + column: 70, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 117, - column: 71, - }, - end: Position { - line: 117, - column: 72, - }, + Comma( + Position { + line: 117, + column: 71, }, - }, + ), ), }, ListEntry { @@ -16383,19 +11719,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 118, - column: 3, - }, - end: Position { - line: 118, - column: 6, - }, + keyword_set: Set( + Position { + line: 118, + column: 3, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -16418,36 +11747,22 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 118, - column: 9, - }, - end: Position { - line: 118, - column: 10, - }, + open_paren: OpenParen( + Position { + line: 118, + column: 9, }, - }, + ), arg: ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 118, - column: 10, - }, - end: Position { - line: 118, - column: 11, - }, + open_bracket: OpenBracket( + Position { + line: 118, + column: 10, }, - }, + ), elements: [ ListEntry { item: Some( @@ -16472,19 +11787,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 12, - }, - end: Position { - line: 118, - column: 13, - }, + Comma( + Position { + line: 118, + column: 12, }, - }, + ), ), }, ListEntry { @@ -16510,19 +11818,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 118, - column: 16, - }, - end: Position { - line: 118, - column: 17, - }, + Equal( + Position { + line: 118, + column: 16, }, - }, + ), ), right: Lit( Number( @@ -16546,19 +11847,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 19, - }, - end: Position { - line: 118, - column: 20, - }, + Comma( + Position { + line: 118, + column: 19, }, - }, + ), ), }, ListEntry { @@ -16566,19 +11860,12 @@ Mod( Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 118, - column: 21, - }, - end: Position { - line: 118, - column: 22, - }, + open_bracket: OpenBracket( + Position { + line: 118, + column: 21, }, - }, + ), elements: [ ListEntry { item: Some( @@ -16603,37 +11890,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 23, - }, - end: Position { - line: 118, - column: 24, - }, + Comma( + Position { + line: 118, + column: 23, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 24, - }, - end: Position { - line: 118, - column: 25, - }, + Comma( + Position { + line: 118, + column: 24, }, - }, + ), ), }, ListEntry { @@ -16659,19 +11932,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 118, - column: 28, - }, - end: Position { - line: 118, - column: 29, - }, + Equal( + Position { + line: 118, + column: 28, }, - }, + ), ), right: Lit( Number( @@ -16695,38 +11961,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 31, - }, - end: Position { - line: 118, - column: 32, - }, + Comma( + Position { + line: 118, + column: 31, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 118, - column: 33, - }, - end: Position { - line: 118, - column: 36, - }, + dots: Ellipsis( + Position { + line: 118, + column: 33, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -16750,37 +12002,23 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 118, - column: 37, - }, - end: Position { - line: 118, - column: 38, - }, + close_bracket: CloseBracket( + Position { + line: 118, + column: 37, }, - }, + ), }, ), ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 38, - }, - end: Position { - line: 118, - column: 39, - }, + Comma( + Position { + line: 118, + column: 38, }, - }, + ), ), }, ListEntry { @@ -16788,19 +12026,12 @@ Mod( Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 118, - column: 40, - }, - end: Position { - line: 118, - column: 41, - }, + open_brace: OpenBrace( + Position { + line: 118, + column: 40, }, - }, + ), props: [ ListEntry { item: Assign( @@ -16834,19 +12065,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 42, - }, - end: Position { - line: 118, - column: 43, - }, + Comma( + Position { + line: 118, + column: 42, }, - }, + ), ), }, ListEntry { @@ -16876,19 +12100,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 118, - column: 45, - }, - end: Position { - line: 118, - column: 46, - }, + Colon( + Position { + line: 118, + column: 45, }, - }, + ), ), value: Some( Pat( @@ -16915,19 +12132,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 48, - }, - end: Position { - line: 118, - column: 49, - }, + Comma( + Position { + line: 118, + column: 48, }, - }, + ), ), }, ListEntry { @@ -16979,19 +12189,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 118, - column: 52, - }, - end: Position { - line: 118, - column: 53, - }, + Equal( + Position { + line: 118, + column: 52, }, - }, + ), ), right: Lit( Number( @@ -17018,19 +12221,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 55, - }, - end: Position { - line: 118, - column: 56, - }, + Comma( + Position { + line: 118, + column: 55, }, - }, + ), ), }, ListEntry { @@ -17060,19 +12256,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 118, - column: 58, - }, - end: Position { - line: 118, - column: 59, - }, + Colon( + Position { + line: 118, + column: 58, }, - }, + ), ), value: Some( Pat( @@ -17096,19 +12285,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 118, - column: 62, - }, - end: Position { - line: 118, - column: 63, - }, + Equal( + Position { + line: 118, + column: 62, }, - }, + ), ), right: Lit( Number( @@ -17137,56 +12319,35 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 118, - column: 65, - }, - end: Position { - line: 118, - column: 66, - }, + close_brace: CloseBrace( + Position { + line: 118, + column: 65, }, - }, + ), }, ), ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 66, - }, - end: Position { - line: 118, - column: 67, - }, + Comma( + Position { + line: 118, + column: 66, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 118, - column: 68, - }, - end: Position { - line: 118, - column: 71, - }, + dots: Ellipsis( + Position { + line: 118, + column: 68, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -17210,83 +12371,48 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 118, - column: 72, - }, - end: Position { - line: 118, - column: 73, - }, + close_bracket: CloseBracket( + Position { + line: 118, + column: 72, }, - }, + ), }, ), ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 118, - column: 73, - }, - end: Position { - line: 118, - column: 74, - }, + close_paren: CloseParen( + Position { + line: 118, + column: 73, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 118, - column: 74, - }, - end: Position { - line: 118, - column: 75, - }, + open_brace: OpenBrace( + Position { + line: 118, + column: 74, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 118, - column: 75, - }, - end: Position { - line: 118, - column: 76, - }, + close_brace: CloseBrace( + Position { + line: 118, + column: 75, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 118, - column: 76, - }, - end: Position { - line: 118, - column: 77, - }, + Comma( + Position { + line: 118, + column: 76, }, - }, + ), ), }, ListEntry { @@ -17318,93 +12444,51 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 3, - }, - end: Position { - line: 119, - column: 4, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 119, - column: 5, - }, - end: Position { + Asterisk( + Position { line: 119, - column: 6, + column: 3, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 5, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 6, - }, - end: Position { - line: 119, - column: 7, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 6, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 7, - }, - end: Position { - line: 119, - column: 8, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 7, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 8, - }, - end: Position { - line: 119, - column: 9, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 8, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 9, - }, - end: Position { - line: 119, - column: 10, - }, + Comma( + Position { + line: 119, + column: 9, }, - }, + ), ), }, ListEntry { @@ -17417,19 +12501,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 119, column: 12, }, - end: Position { - line: 119, - column: 13, - }, - }, - }, + ), + ), content: Slice { source: "e", loc: SourceLocation { @@ -17443,112 +12522,65 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 119, column: 14, }, - end: Position { - line: 119, - column: 15, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 11, - }, - end: Position { - line: 119, - column: 12, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 119, - column: 15, - }, - end: Position { + Asterisk( + Position { line: 119, - column: 16, + column: 11, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 15, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 16, - }, - end: Position { - line: 119, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 16, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 17, - }, - end: Position { - line: 119, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 17, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 18, - }, - end: Position { - line: 119, - column: 19, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 18, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 19, - }, - end: Position { - line: 119, - column: 20, - }, + Comma( + Position { + line: 119, + column: 19, }, - }, + ), ), }, ListEntry { @@ -17561,19 +12593,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 119, column: 22, }, - end: Position { - line: 119, - column: 23, - }, - }, - }, + ), + ), content: Slice { source: "f", loc: SourceLocation { @@ -17587,112 +12614,65 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 119, column: 24, }, - end: Position { - line: 119, - column: 25, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 21, - }, - end: Position { - line: 119, - column: 22, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 119, - column: 25, - }, - end: Position { + Asterisk( + Position { line: 119, - column: 26, + column: 21, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 25, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 26, - }, - end: Position { - line: 119, - column: 27, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 26, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 27, - }, - end: Position { - line: 119, - column: 28, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 27, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 28, - }, - end: Position { - line: 119, - column: 29, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 28, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 29, - }, - end: Position { - line: 119, - column: 30, - }, + Comma( + Position { + line: 119, + column: 29, }, - }, + ), ), }, ListEntry { @@ -17722,93 +12702,51 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 31, - }, - end: Position { - line: 119, - column: 32, - }, + Asterisk( + Position { + line: 119, + column: 31, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 33, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + params: [], + close_paren: CloseParen( + Position { + line: 119, + column: 34, + }, + ), + body: FuncBody { + open_brace: OpenBrace( + Position { line: 119, - column: 33, + column: 35, }, - end: Position { + ), + stmts: [], + close_brace: CloseBrace( + Position { line: 119, - column: 34, + column: 36, }, - }, - }, - params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 34, - }, - end: Position { - line: 119, - column: 35, - }, - }, - }, - body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 35, - }, - end: Position { - line: 119, - column: 36, - }, - }, - }, - stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 36, - }, - end: Position { - line: 119, - column: 37, - }, - }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 37, - }, - end: Position { - line: 119, - column: 38, - }, + Comma( + Position { + line: 119, + column: 37, }, - }, + ), ), }, ListEntry { @@ -17838,93 +12776,51 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 39, - }, - end: Position { - line: 119, - column: 40, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 119, - column: 42, - }, - end: Position { + Asterisk( + Position { line: 119, - column: 43, + column: 39, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 42, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 43, - }, - end: Position { - line: 119, - column: 44, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 43, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 44, - }, - end: Position { - line: 119, - column: 45, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 44, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 45, - }, - end: Position { - line: 119, - column: 46, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 45, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 46, - }, - end: Position { - line: 119, - column: 47, - }, + Comma( + Position { + line: 119, + column: 46, }, - }, + ), ), }, ListEntry { @@ -17954,93 +12850,51 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 48, - }, - end: Position { - line: 119, - column: 49, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + Asterisk( + Position { line: 119, - column: 51, - }, - end: Position { - line: 119, - column: 52, + column: 48, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 51, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 52, - }, - end: Position { - line: 119, - column: 53, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 52, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 53, - }, - end: Position { - line: 119, - column: 54, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 53, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 54, - }, - end: Position { - line: 119, - column: 55, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 54, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 55, - }, - end: Position { - line: 119, - column: 56, - }, + Comma( + Position { + line: 119, + column: 55, }, - }, + ), ), }, ListEntry { @@ -18070,93 +12924,51 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 57, - }, - end: Position { - line: 119, - column: 58, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + Asterisk( + Position { line: 119, - column: 61, - }, - end: Position { - line: 119, - column: 62, + column: 57, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 61, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 62, - }, - end: Position { - line: 119, - column: 63, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 62, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 63, - }, - end: Position { - line: 119, - column: 64, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 63, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 64, - }, - end: Position { - line: 119, - column: 65, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 64, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 65, - }, - end: Position { - line: 119, - column: 66, - }, + Comma( + Position { + line: 119, + column: 65, }, - }, + ), ), }, ListEntry { @@ -18188,140 +13000,77 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 119, - column: 67, - }, - end: Position { - line: 119, - column: 68, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + Asterisk( + Position { line: 119, - column: 70, - }, - end: Position { - line: 119, - column: 71, + column: 67, }, + ), + ), + open_paren: OpenParen( + Position { + line: 119, + column: 70, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 119, - column: 71, - }, - end: Position { - line: 119, - column: 72, - }, + close_paren: CloseParen( + Position { + line: 119, + column: 71, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 119, - column: 72, - }, - end: Position { - line: 119, - column: 73, - }, + open_brace: OpenBrace( + Position { + line: 119, + column: 72, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 119, - column: 73, - }, - end: Position { - line: 119, - column: 74, - }, + close_brace: CloseBrace( + Position { + line: 119, + column: 73, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 119, - column: 74, - }, - end: Position { - line: 119, - column: 75, - }, + Comma( + Position { + line: 119, + column: 74, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 120, - column: 1, - }, - end: Position { - line: 120, - column: 2, - }, + close_brace: CloseBrace( + Position { + line: 120, + column: 1, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 120, - column: 2, - }, - end: Position { - line: 120, - column: 3, - }, + close_paren: CloseParen( + Position { + line: 120, + column: 2, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 120, - column: 3, - }, - end: Position { - line: 120, - column: 4, - }, + Semicolon( + Position { + line: 120, + column: 3, }, - }, + ), ), }, ), @@ -18329,34 +13078,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 121, - column: 1, - }, - end: Position { - line: 121, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 121, + column: 1, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 121, - column: 2, - }, - end: Position { - line: 121, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 121, + column: 2, }, - }, + ), props: [ ListEntry { item: Prop( @@ -18385,37 +13120,23 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 121, - column: 13, - }, - end: Position { - line: 121, - column: 14, - }, + Colon( + Position { + line: 121, + column: 13, }, - }, + ), ), value: Some( Expr( Lit( Null( - Slice { - source: "null", - loc: SourceLocation { - start: Position { - line: 121, - column: 15, - }, - end: Position { - line: 121, - column: 19, - }, + Null( + Position { + line: 121, + column: 15, }, - }, + ), ), ), ), @@ -18424,19 +13145,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 121, - column: 19, - }, - end: Position { - line: 121, - column: 20, - }, + Comma( + Position { + line: 121, + column: 19, }, - }, + ), ), }, ListEntry { @@ -18444,19 +13158,12 @@ Mod( Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 121, - column: 21, - }, - end: Position { - line: 121, - column: 24, - }, + keyword_get: Get( + Position { + line: 121, + column: 21, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -18479,78 +13186,43 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 121, - column: 34, - }, - end: Position { - line: 121, - column: 35, - }, + open_paren: OpenParen( + Position { + line: 121, + column: 34, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 121, - column: 35, - }, - end: Position { - line: 121, - column: 36, - }, + ), + close_paren: CloseParen( + Position { + line: 121, + column: 35, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 121, - column: 36, - }, - end: Position { - line: 121, - column: 37, - }, + open_brace: OpenBrace( + Position { + line: 121, + column: 36, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 121, - column: 37, - }, - end: Position { - line: 121, - column: 38, - }, + close_brace: CloseBrace( + Position { + line: 121, + column: 37, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 121, - column: 38, - }, - end: Position { - line: 121, - column: 39, - }, + Comma( + Position { + line: 121, + column: 38, }, - }, + ), ), }, ListEntry { @@ -18558,19 +13230,12 @@ Mod( Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 121, - column: 40, - }, - end: Position { - line: 121, - column: 43, - }, + keyword_set: Set( + Position { + line: 121, + column: 40, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -18593,19 +13258,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 121, - column: 53, - }, - end: Position { - line: 121, - column: 54, - }, + open_paren: OpenParen( + Position { + line: 121, + column: 53, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -18628,112 +13286,63 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 121, - column: 55, - }, - end: Position { - line: 121, - column: 56, - }, + close_paren: CloseParen( + Position { + line: 121, + column: 55, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 121, - column: 56, - }, - end: Position { - line: 121, - column: 57, - }, + open_brace: OpenBrace( + Position { + line: 121, + column: 56, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 121, - column: 57, - }, - end: Position { - line: 121, - column: 58, - }, + close_brace: CloseBrace( + Position { + line: 121, + column: 57, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 121, - column: 58, - }, - end: Position { - line: 121, - column: 59, - }, + Comma( + Position { + line: 121, + column: 58, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 121, - column: 60, - }, - end: Position { - line: 121, - column: 61, - }, + close_brace: CloseBrace( + Position { + line: 121, + column: 60, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 121, - column: 61, - }, - end: Position { - line: 121, - column: 62, - }, + close_paren: CloseParen( + Position { + line: 121, + column: 61, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 121, - column: 62, - }, - end: Position { - line: 121, - column: 63, - }, + Semicolon( + Position { + line: 121, + column: 62, }, - }, + ), ), }, ), @@ -18741,34 +13350,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 122, - column: 1, - }, - end: Position { - line: 122, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 122, + column: 1, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 122, - column: 2, - }, - end: Position { - line: 122, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 122, + column: 2, }, - }, + ), props: [ ListEntry { item: Prop( @@ -18778,19 +13373,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 122, column: 4, }, - end: Position { - line: 122, - column: 5, - }, - }, - }, + ), + ), content: Slice { source: "__proto__", loc: SourceLocation { @@ -18804,56 +13394,37 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 122, column: 14, }, - end: Position { - line: 122, - column: 15, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 122, - column: 15, - }, - end: Position { - line: 122, - column: 16, - }, + Colon( + Position { + line: 122, + column: 15, }, - }, + ), ), value: Some( Expr( Lit( Null( - Slice { - source: "null", - loc: SourceLocation { - start: Position { - line: 122, - column: 17, - }, - end: Position { - line: 122, - column: 21, - }, + Null( + Position { + line: 122, + column: 17, }, - }, + ), ), ), ), @@ -18862,19 +13433,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 122, - column: 21, - }, - end: Position { - line: 122, - column: 22, - }, + Comma( + Position { + line: 122, + column: 21, }, - }, + ), ), }, ListEntry { @@ -18906,126 +13470,70 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 122, - column: 32, - }, - end: Position { - line: 122, - column: 33, - }, + open_paren: OpenParen( + Position { + line: 122, + column: 32, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 122, - column: 33, - }, - end: Position { - line: 122, - column: 34, - }, + close_paren: CloseParen( + Position { + line: 122, + column: 33, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 122, - column: 34, - }, - end: Position { - line: 122, - column: 35, - }, + open_brace: OpenBrace( + Position { + line: 122, + column: 34, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 122, - column: 35, - }, - end: Position { - line: 122, - column: 36, - }, + close_brace: CloseBrace( + Position { + line: 122, + column: 35, }, - }, + ), }, }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 122, - column: 36, - }, - end: Position { - line: 122, - column: 37, - }, + Comma( + Position { + line: 122, + column: 36, }, - }, + ), ), }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 122, - column: 38, - }, - end: Position { - line: 122, - column: 39, - }, + close_brace: CloseBrace( + Position { + line: 122, + column: 38, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 122, - column: 39, - }, - end: Position { - line: 122, - column: 40, - }, + close_paren: CloseParen( + Position { + line: 122, + column: 39, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 122, - column: 40, - }, - end: Position { - line: 122, - column: 41, - }, + Semicolon( + Position { + line: 122, + column: 40, }, - }, + ), ), }, ), @@ -19068,36 +13576,22 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 124, - column: 3, - }, - end: Position { - line: 124, - column: 4, - }, + Period( + Position { + line: 124, + column: 3, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 124, - column: 5, - }, - end: Position { - line: 124, - column: 6, - }, + Semicolon( + Position { + line: 124, + column: 5, }, - }, + ), ), }, ), @@ -19140,36 +13634,22 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 124, - column: 9, - }, - end: Position { - line: 124, - column: 10, - }, + Period( + Position { + line: 124, + column: 9, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 124, - column: 11, - }, - end: Position { - line: 124, - column: 12, - }, + Semicolon( + Position { + line: 124, + column: 11, }, - }, + ), ), }, ), @@ -19179,19 +13659,12 @@ Mod( MemberExpr { object: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 124, - column: 13, - }, - end: Position { - line: 124, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 124, + column: 13, }, - }, + ), expr: Lit( Number( Slice { @@ -19209,19 +13682,12 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 124, - column: 15, - }, - end: Position { - line: 124, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 124, + column: 15, }, - }, + ), }, ), property: Ident( @@ -19242,36 +13708,22 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 124, - column: 16, - }, - end: Position { - line: 124, - column: 17, - }, + Period( + Position { + line: 124, + column: 16, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 124, - column: 18, - }, - end: Position { - line: 124, - column: 19, - }, + Semicolon( + Position { + line: 124, + column: 18, }, - }, + ), ), }, ), @@ -19314,49 +13766,28 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 126, - column: 2, - }, - end: Position { - line: 126, - column: 3, - }, + open_bracket: OpenBracket( + Position { + line: 126, + column: 2, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 126, - column: 4, - }, - end: Position { - line: 126, - column: 5, - }, + ), + close_bracket: CloseBracket( + Position { + line: 126, + column: 4, }, - }, + ), }, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 126, - column: 5, - }, - end: Position { - line: 126, - column: 6, - }, + Semicolon( + Position { + line: 126, + column: 5, }, - }, + ), ), }, ), @@ -19365,19 +13796,12 @@ Mod( expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 129, - column: 3, - }, - end: Position { - line: 129, - column: 4, - }, + Equal( + Position { + line: 129, + column: 3, }, - }, + ), ), left: Expr( Ident( @@ -19400,19 +13824,12 @@ Mod( ), right: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 129, - column: 5, - }, - end: Position { - line: 129, - column: 13, - }, + keyword: Function( + Position { + line: 129, + column: 5, }, - }, + ), id: Some( Ident { slice: Slice { @@ -19430,63 +13847,35 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 129, - column: 15, - }, - end: Position { - line: 129, - column: 16, - }, + open_paren: OpenParen( + Position { + line: 129, + column: 15, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 129, - column: 16, - }, - end: Position { - line: 129, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 129, + column: 16, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 129, - column: 17, - }, - end: Position { - line: 129, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 129, + column: 17, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 129, - column: 19, - }, - end: Position { - line: 129, - column: 25, - }, + keyword: Return( + Position { + line: 129, + column: 19, }, - }, + ), value: Some( Ident( Ident { @@ -19507,36 +13896,22 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 129, - column: 27, - }, - end: Position { - line: 129, - column: 28, - }, + Semicolon( + Position { + line: 129, + column: 27, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 129, - column: 29, - }, - end: Position { - line: 129, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 129, + column: 29, }, - }, + ), }, star: None, keyword_async: None, @@ -19545,19 +13920,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 129, - column: 30, - }, - end: Position { - line: 129, - column: 31, - }, + Semicolon( + Position { + line: 129, + column: 30, }, - }, + ), ), }, ), @@ -19566,19 +13934,12 @@ Mod( expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 129, - column: 37, - }, - end: Position { - line: 129, - column: 38, - }, + Equal( + Position { + line: 129, + column: 37, }, - }, + ), ), left: Expr( Member( @@ -19618,32 +13979,18 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 129, - column: 33, - }, - end: Position { - line: 129, - column: 34, - }, + open_bracket: OpenBracket( + Position { + line: 129, + column: 33, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 129, - column: 35, - }, - end: Position { - line: 129, - column: 36, - }, + ), + close_bracket: CloseBracket( + Position { + line: 129, + column: 35, }, - }, + ), }, }, ), @@ -19668,19 +14015,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 129, - column: 40, - }, - end: Position { - line: 129, - column: 41, - }, + Semicolon( + Position { + line: 129, + column: 40, }, - }, + ), ), }, ), @@ -19689,19 +14029,12 @@ Mod( expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 129, - column: 46, - }, - end: Position { - line: 129, - column: 47, - }, + Equal( + Position { + line: 129, + column: 46, }, - }, + ), ), left: Expr( Member( @@ -19741,19 +14074,12 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 129, - column: 43, - }, - end: Position { - line: 129, - column: 44, - }, + Period( + Position { + line: 129, + column: 43, }, - }, + ), ), }, ), @@ -19778,19 +14104,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 129, - column: 49, - }, - end: Position { - line: 129, - column: 50, - }, + Semicolon( + Position { + line: 129, + column: 49, }, - }, + ), ), }, ), @@ -19798,19 +14117,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 131, - column: 1, - }, - end: Position { - line: 131, - column: 4, - }, + keyword: New( + Position { + line: 131, + column: 1, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -19829,52 +14141,31 @@ Mod( }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 131, - column: 6, - }, - end: Position { - line: 131, - column: 7, - }, + OpenParen( + Position { + line: 131, + column: 6, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 131, - column: 7, - }, - end: Position { - line: 131, - column: 8, - }, + CloseParen( + Position { + line: 131, + column: 7, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 131, - column: 8, - }, - end: Position { - line: 131, - column: 9, - }, + Semicolon( + Position { + line: 131, + column: 8, }, - }, + ), ), }, ), @@ -19882,34 +14173,20 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 131, - column: 10, - }, - end: Position { - line: 131, - column: 13, - }, + keyword: New( + Position { + line: 131, + column: 10, }, - }, + ), callee: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 131, - column: 14, - }, - end: Position { - line: 131, - column: 17, - }, + keyword: New( + Position { + line: 131, + column: 14, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -19928,85 +14205,50 @@ Mod( }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 131, - column: 19, - }, - end: Position { - line: 131, - column: 20, - }, + OpenParen( + Position { + line: 131, + column: 19, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 131, - column: 20, - }, - end: Position { - line: 131, - column: 21, - }, + CloseParen( + Position { + line: 131, + column: 20, }, - }, + ), ), }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 131, - column: 21, - }, - end: Position { - line: 131, - column: 22, - }, + OpenParen( + Position { + line: 131, + column: 21, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 131, - column: 22, - }, - end: Position { - line: 131, - column: 23, - }, + CloseParen( + Position { + line: 131, + column: 22, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 131, - column: 23, - }, - end: Position { - line: 131, - column: 24, - }, + Semicolon( + Position { + line: 131, + column: 23, }, - }, + ), ), }, ), @@ -20014,19 +14256,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 132, - column: 1, - }, - end: Position { - line: 132, - column: 4, - }, + keyword: New( + Position { + line: 132, + column: 1, }, - }, + ), callee: Member( MemberExpr { object: Ident( @@ -20064,82 +14299,47 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 132, - column: 6, - }, - end: Position { - line: 132, - column: 7, - }, + open_bracket: OpenBracket( + Position { + line: 132, + column: 6, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 132, - column: 8, - }, - end: Position { - line: 132, - column: 9, - }, + ), + close_bracket: CloseBracket( + Position { + line: 132, + column: 8, }, - }, + ), }, }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 132, - column: 9, - }, - end: Position { - line: 132, - column: 10, - }, + OpenParen( + Position { + line: 132, + column: 9, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 132, - column: 10, - }, - end: Position { - line: 132, - column: 11, - }, + CloseParen( + Position { + line: 132, + column: 10, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 132, - column: 11, - }, - end: Position { - line: 132, - column: 12, - }, + Semicolon( + Position { + line: 132, + column: 11, }, - }, + ), ), }, ), @@ -20147,19 +14347,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 132, - column: 13, - }, - end: Position { - line: 132, - column: 16, - }, + keyword: New( + Position { + line: 132, + column: 13, }, - }, + ), callee: Member( MemberExpr { object: Ident( @@ -20197,69 +14390,41 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 132, - column: 18, - }, - end: Position { - line: 132, - column: 19, - }, + Period( + Position { + line: 132, + column: 18, }, - }, + ), ), }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 132, - column: 20, - }, - end: Position { - line: 132, - column: 21, - }, + OpenParen( + Position { + line: 132, + column: 20, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 132, - column: 21, - }, - end: Position { - line: 132, - column: 22, - }, + CloseParen( + Position { + line: 132, + column: 21, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 132, - column: 22, - }, - end: Position { - line: 132, - column: 23, - }, + Semicolon( + Position { + line: 132, + column: 22, }, - }, + ), ), }, ), @@ -20267,19 +14432,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 132, - column: 24, - }, - end: Position { - line: 132, - column: 27, - }, + keyword: New( + Position { + line: 132, + column: 24, }, - }, + ), callee: Member( MemberExpr { object: Member( @@ -20319,32 +14477,18 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 132, - column: 29, - }, - end: Position { - line: 132, - column: 30, - }, + open_bracket: OpenBracket( + Position { + line: 132, + column: 29, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 132, - column: 31, - }, - end: Position { - line: 132, - column: 32, - }, + ), + close_bracket: CloseBracket( + Position { + line: 132, + column: 31, }, - }, + ), }, }, ), @@ -20366,69 +14510,41 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 132, - column: 32, - }, - end: Position { - line: 132, - column: 33, - }, + Period( + Position { + line: 132, + column: 32, }, - }, + ), ), }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 132, - column: 34, - }, - end: Position { - line: 132, - column: 35, - }, + OpenParen( + Position { + line: 132, + column: 34, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 132, - column: 35, - }, - end: Position { - line: 132, - column: 36, - }, + CloseParen( + Position { + line: 132, + column: 35, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 132, - column: 36, - }, - end: Position { - line: 132, - column: 37, - }, + Semicolon( + Position { + line: 132, + column: 36, }, - }, + ), ), }, ), @@ -20436,19 +14552,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 132, - column: 38, - }, - end: Position { - line: 132, - column: 41, - }, + keyword: New( + Position { + line: 132, + column: 38, }, - }, + ), callee: Member( MemberExpr { object: Member( @@ -20488,19 +14597,12 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 132, - column: 43, - }, - end: Position { - line: 132, - column: 44, - }, + Period( + Position { + line: 132, + column: 43, }, - }, + ), ), }, ), @@ -20522,82 +14624,47 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 132, - column: 45, - }, - end: Position { - line: 132, - column: 46, - }, + open_bracket: OpenBracket( + Position { + line: 132, + column: 45, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 132, - column: 47, - }, - end: Position { - line: 132, - column: 48, - }, + ), + close_bracket: CloseBracket( + Position { + line: 132, + column: 47, }, - }, + ), }, }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 132, - column: 48, - }, - end: Position { - line: 132, - column: 49, - }, + OpenParen( + Position { + line: 132, + column: 48, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 132, - column: 49, - }, - end: Position { - line: 132, - column: 50, - }, + CloseParen( + Position { + line: 132, + column: 49, }, - }, + ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 132, - column: 50, - }, - end: Position { - line: 132, - column: 51, - }, + Semicolon( + Position { + line: 132, + column: 50, }, - }, + ), ), }, ), @@ -20605,19 +14672,12 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 133, - column: 1, - }, - end: Position { - line: 133, - column: 4, - }, + keyword: New( + Position { + line: 133, + column: 1, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -20641,19 +14701,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 133, - column: 6, - }, - end: Position { - line: 133, - column: 7, - }, + Semicolon( + Position { + line: 133, + column: 6, }, - }, + ), ), }, ), @@ -20661,34 +14714,20 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 133, - column: 8, - }, - end: Position { - line: 133, - column: 11, - }, + keyword: New( + Position { + line: 133, + column: 8, }, - }, + ), callee: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 133, - column: 12, - }, - end: Position { - line: 133, - column: 15, - }, + keyword: New( + Position { + line: 133, + column: 12, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -20717,19 +14756,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 133, - column: 17, - }, - end: Position { - line: 133, - column: 18, - }, + Semicolon( + Position { + line: 133, + column: 17, }, - }, + ), ), }, ), @@ -20737,34 +14769,20 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 133, - column: 19, - }, - end: Position { - line: 133, - column: 22, - }, + keyword: New( + Position { + line: 133, + column: 19, }, - }, + ), callee: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 133, - column: 23, - }, - end: Position { - line: 133, - column: 26, - }, + keyword: New( + Position { + line: 133, + column: 23, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -20783,35 +14801,21 @@ Mod( }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 133, - column: 28, - }, - end: Position { - line: 133, - column: 29, - }, + OpenParen( + Position { + line: 133, + column: 28, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 133, - column: 29, - }, - end: Position { - line: 133, - column: 30, - }, + CloseParen( + Position { + line: 133, + column: 29, }, - }, + ), ), }, ), @@ -20821,19 +14825,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 133, - column: 30, - }, - end: Position { - line: 133, - column: 31, - }, + Semicolon( + Position { + line: 133, + column: 30, }, - }, + ), ), }, ), @@ -20841,36 +14838,22 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 134, - column: 1, - }, - end: Position { - line: 134, - column: 4, - }, + keyword: New( + Position { + line: 134, + column: 1, }, - }, + ), callee: Member( MemberExpr { object: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 134, - column: 5, - }, - end: Position { - line: 134, - column: 8, - }, + keyword: New( + Position { + line: 134, + column: 5, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -20889,35 +14872,21 @@ Mod( }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 134, - column: 10, - }, - end: Position { - line: 134, - column: 11, - }, + OpenParen( + Position { + line: 134, + column: 10, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 134, - column: 11, - }, - end: Position { - line: 134, - column: 12, - }, + CloseParen( + Position { + line: 134, + column: 11, }, - }, + ), ), }, ), @@ -20939,19 +14908,12 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 134, - column: 12, - }, - end: Position { - line: 134, - column: 13, - }, + Period( + Position { + line: 134, + column: 12, }, - }, + ), ), }, ), @@ -20961,19 +14923,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 134, - column: 14, - }, - end: Position { - line: 134, - column: 15, - }, + Semicolon( + Position { + line: 134, + column: 14, }, - }, + ), ), }, ), @@ -20981,36 +14936,22 @@ Mod( Expr { expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 134, - column: 16, - }, - end: Position { - line: 134, - column: 19, - }, + keyword: New( + Position { + line: 134, + column: 16, }, - }, + ), callee: Member( MemberExpr { object: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 134, - column: 20, - }, - end: Position { - line: 134, - column: 23, - }, + keyword: New( + Position { + line: 134, + column: 20, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -21029,35 +14970,21 @@ Mod( }, ), open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 134, - column: 25, - }, - end: Position { - line: 134, - column: 26, - }, + OpenParen( + Position { + line: 134, + column: 25, }, - }, + ), ), arguments: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 134, - column: 26, - }, - end: Position { - line: 134, - column: 27, - }, + CloseParen( + Position { + line: 134, + column: 26, }, - }, + ), ), }, ), @@ -21079,32 +15006,18 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 134, - column: 27, - }, - end: Position { - line: 134, - column: 28, - }, + open_bracket: OpenBracket( + Position { + line: 134, + column: 27, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 134, - column: 29, - }, - end: Position { - line: 134, - column: 30, - }, + ), + close_bracket: CloseBracket( + Position { + line: 134, + column: 29, }, - }, + ), }, }, ), @@ -21114,19 +15027,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 134, - column: 30, - }, - end: Position { - line: 134, - column: 31, - }, + Semicolon( + Position { + line: 134, + column: 30, }, - }, + ), ), }, ), @@ -21151,49 +15057,28 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 136, - column: 2, - }, - end: Position { - line: 136, - column: 3, - }, + open_paren: OpenParen( + Position { + line: 136, + column: 2, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 136, - column: 3, - }, - end: Position { - line: 136, - column: 4, - }, + close_paren: CloseParen( + Position { + line: 136, + column: 3, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 136, - column: 4, - }, - end: Position { - line: 136, - column: 5, - }, + Semicolon( + Position { + line: 136, + column: 4, }, - }, + ), ), }, ), @@ -21220,78 +15105,43 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 136, - column: 7, - }, - end: Position { - line: 136, - column: 8, - }, + open_paren: OpenParen( + Position { + line: 136, + column: 7, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 136, - column: 8, - }, - end: Position { - line: 136, - column: 9, - }, + close_paren: CloseParen( + Position { + line: 136, + column: 8, }, - }, + ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 136, - column: 9, - }, - end: Position { - line: 136, - column: 10, - }, + open_paren: OpenParen( + Position { + line: 136, + column: 9, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 136, - column: 10, - }, - end: Position { - line: 136, - column: 11, - }, + close_paren: CloseParen( + Position { + line: 136, + column: 10, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 136, - column: 11, - }, - end: Position { - line: 136, - column: 12, - }, + Semicolon( + Position { + line: 136, + column: 11, }, - }, + ), ), }, ), @@ -21316,19 +15166,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 136, - column: 14, - }, - end: Position { - line: 136, - column: 15, - }, + open_paren: OpenParen( + Position { + line: 136, + column: 14, }, - }, + ), arguments: [ ListEntry { item: Ident( @@ -21351,35 +15194,21 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 136, - column: 16, - }, - end: Position { - line: 136, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 136, + column: 16, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 136, - column: 17, - }, - end: Position { - line: 136, - column: 18, - }, + Semicolon( + Position { + line: 136, + column: 17, }, - }, + ), ), }, ), @@ -21404,19 +15233,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 136, - column: 20, - }, - end: Position { - line: 136, - column: 21, - }, + open_paren: OpenParen( + Position { + line: 136, + column: 20, }, - }, + ), arguments: [ ListEntry { item: Ident( @@ -21437,19 +15259,12 @@ Mod( }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 136, - column: 22, - }, - end: Position { - line: 136, - column: 23, - }, + Comma( + Position { + line: 136, + column: 22, }, - }, + ), ), }, ListEntry { @@ -21473,35 +15288,21 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 136, - column: 25, - }, - end: Position { - line: 136, - column: 26, - }, + close_paren: CloseParen( + Position { + line: 136, + column: 25, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 136, - column: 26, - }, - end: Position { - line: 136, - column: 27, - }, + Semicolon( + Position { + line: 136, + column: 26, }, - }, + ), ), }, ), @@ -21550,49 +15351,28 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 137, - column: 2, - }, - end: Position { - line: 137, - column: 3, - }, + Period( + Position { + line: 137, + column: 2, }, - }, + ), ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 4, - }, - end: Position { - line: 137, - column: 5, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 4, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 5, - }, - end: Position { - line: 137, - column: 6, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 5, }, - }, + ), }, ), property: Ident( @@ -21613,65 +15393,37 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 137, - column: 6, - }, - end: Position { - line: 137, - column: 7, - }, + Period( + Position { + line: 137, + column: 6, }, - }, + ), ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 8, - }, - end: Position { - line: 137, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 8, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 9, - }, - end: Position { - line: 137, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 9, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 137, - column: 10, - }, - end: Position { - line: 137, - column: 11, - }, + Semicolon( + Position { + line: 137, + column: 10, }, - }, + ), ), }, ), @@ -21720,62 +15472,34 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 137, - column: 13, - }, - end: Position { - line: 137, - column: 14, - }, + open_bracket: OpenBracket( + Position { + line: 137, + column: 13, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 137, - column: 15, - }, - end: Position { - line: 137, - column: 16, - }, + ), + close_bracket: CloseBracket( + Position { + line: 137, + column: 15, }, - }, + ), }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 16, - }, - end: Position { - line: 137, - column: 17, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 16, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 17, - }, - end: Position { - line: 137, - column: 18, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 17, }, - }, + ), }, ), property: Lit( @@ -21796,78 +15520,43 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 137, - column: 18, - }, - end: Position { - line: 137, - column: 19, - }, + open_bracket: OpenBracket( + Position { + line: 137, + column: 18, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 137, - column: 20, - }, - end: Position { - line: 137, - column: 21, - }, + ), + close_bracket: CloseBracket( + Position { + line: 137, + column: 20, }, - }, + ), }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 21, - }, - end: Position { - line: 137, - column: 22, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 21, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 22, - }, - end: Position { - line: 137, - column: 23, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 22, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 137, - column: 23, - }, - end: Position { - line: 137, - column: 24, - }, + Semicolon( + Position { + line: 137, + column: 23, }, - }, + ), ), }, ), @@ -21898,33 +15587,19 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 26, - }, - end: Position { - line: 137, - column: 27, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 26, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 27, - }, - end: Position { - line: 137, - column: 28, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 27, }, - }, + ), }, ), property: Ident( @@ -21945,19 +15620,12 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 137, - column: 28, - }, - end: Position { - line: 137, - column: 29, - }, + Period( + Position { + line: 137, + column: 28, }, - }, + ), ), }, ), @@ -21979,78 +15647,43 @@ Mod( ), ), indexer: Computed { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 137, - column: 30, - }, - end: Position { - line: 137, - column: 31, - }, + open_bracket: OpenBracket( + Position { + line: 137, + column: 30, }, - }, - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 137, - column: 32, - }, - end: Position { - line: 137, - column: 33, - }, + ), + close_bracket: CloseBracket( + Position { + line: 137, + column: 32, }, - }, + ), }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 137, - column: 33, - }, - end: Position { - line: 137, - column: 34, - }, + open_paren: OpenParen( + Position { + line: 137, + column: 33, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 137, - column: 34, - }, - end: Position { - line: 137, - column: 35, - }, + close_paren: CloseParen( + Position { + line: 137, + column: 34, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 137, - column: 35, - }, - end: Position { - line: 137, - column: 36, - }, + Semicolon( + Position { + line: 137, + column: 35, }, - }, + ), ), }, ), @@ -22075,51 +15708,30 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 138, - column: 2, - }, - end: Position { - line: 138, - column: 3, - }, + open_paren: OpenParen( + Position { + line: 138, + column: 2, }, - }, + ), arguments: [ ListEntry { item: Spread( SpreadExpr { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 138, - column: 3, - }, - end: Position { - line: 138, - column: 6, - }, + dots: Ellipsis( + Position { + line: 138, + column: 3, }, - }, + ), expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 138, - column: 6, - }, - end: Position { - line: 138, - column: 7, - }, + open_bracket: OpenBracket( + Position { + line: 138, + column: 6, }, - }, + ), elements: [ ListEntry { item: Some( @@ -22142,19 +15754,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 138, - column: 8, - }, - end: Position { - line: 138, - column: 9, - }, + Comma( + Position { + line: 138, + column: 8, }, - }, + ), ), }, ListEntry { @@ -22178,151 +15783,88 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 138, - column: 10, - }, - end: Position { - line: 138, - column: 11, - }, + Comma( + Position { + line: 138, + column: 10, }, - }, + ), ), }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 138, - column: 11, - }, - end: Position { - line: 138, - column: 12, - }, + close_bracket: CloseBracket( + Position { + line: 138, + column: 11, }, - }, + ), }, ), }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 138, - column: 12, - }, - end: Position { - line: 138, - column: 13, - }, + Comma( + Position { + line: 138, + column: 12, }, - }, + ), ), }, ListEntry { item: Spread( SpreadExpr { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 138, - column: 14, - }, - end: Position { - line: 138, - column: 17, - }, + dots: Ellipsis( + Position { + line: 138, + column: 14, }, - }, + ), expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 138, - column: 17, - }, - end: Position { - line: 138, - column: 18, - }, + open_bracket: OpenBracket( + Position { + line: 138, + column: 17, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 138, - column: 18, - }, - end: Position { - line: 138, - column: 19, - }, + close_bracket: CloseBracket( + Position { + line: 138, + column: 18, }, - }, + ), }, ), }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 138, - column: 19, - }, - end: Position { - line: 138, - column: 20, - }, + Comma( + Position { + line: 138, + column: 19, }, - }, + ), ), }, ListEntry { item: Spread( SpreadExpr { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 138, - column: 21, - }, - end: Position { - line: 138, - column: 24, - }, + dots: Ellipsis( + Position { + line: 138, + column: 21, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 138, - column: 24, - }, - end: Position { - line: 138, - column: 32, - }, + keyword: Function( + Position { + line: 138, + column: 24, }, - }, + ), id: Some( Ident { slice: Slice { @@ -22340,79 +15882,44 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 138, - column: 35, - }, - end: Position { - line: 138, - column: 36, - }, + open_paren: OpenParen( + Position { + line: 138, + column: 35, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 138, - column: 36, - }, - end: Position { - line: 138, - column: 37, - }, + close_paren: CloseParen( + Position { + line: 138, + column: 36, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 138, - column: 37, - }, - end: Position { - line: 138, - column: 38, - }, + open_brace: OpenBrace( + Position { + line: 138, + column: 37, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 138, - column: 39, - }, - end: Position { - line: 138, - column: 45, - }, + keyword: Return( + Position { + line: 138, + column: 39, }, - }, + ), value: Some( Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 138, - column: 46, - }, - end: Position { - line: 138, - column: 51, - }, + keyword: Yield( + Position { + line: 138, + column: 46, }, - }, + ), argument: Some( Lit( Number( @@ -22437,51 +15944,30 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 138, - column: 53, - }, - end: Position { - line: 138, - column: 54, - }, + Semicolon( + Position { + line: 138, + column: 53, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 138, - column: 55, - }, - end: Position { - line: 138, - column: 56, - }, + close_brace: CloseBrace( + Position { + line: 138, + column: 55, }, - }, + ), }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 138, - column: 32, - }, - end: Position { - line: 138, - column: 33, - }, + Asterisk( + Position { + line: 138, + column: 32, }, - }, + ), ), keyword_async: None, }, @@ -22491,35 +15977,21 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 138, - column: 56, - }, - end: Position { - line: 138, - column: 57, - }, + close_paren: CloseParen( + Position { + line: 138, + column: 56, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 138, - column: 57, - }, - end: Position { - line: 138, - column: 58, - }, + Semicolon( + Position { + line: 138, + column: 57, }, - }, + ), ), }, ), @@ -22547,20 +16019,15 @@ Mod( quasi: TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`a`", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 139, column: 2, }, - end: Position { - line: 139, - column: 5, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "a", loc: SourceLocation { start: Position { @@ -22573,6 +16040,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 139, + column: 4, + }, + ), + ), }, ], expressions: [], @@ -22580,19 +16055,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 139, - column: 5, - }, - end: Position { - line: 139, - column: 6, - }, + Semicolon( + Position { + line: 139, + column: 5, }, - }, + ), ), }, ), @@ -22620,20 +16088,15 @@ Mod( quasi: TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`0${", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 139, column: 8, }, - end: Position { - line: 139, - column: 12, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "0", loc: SourceLocation { start: Position { @@ -22646,22 +16109,25 @@ Mod( }, }, }, + close_quote: OpenBrace( + DollarSignOpenBrace( + Position { + line: 139, + column: 10, + }, + ), + ), }, TemplateElement { - raw: Slice { - source: "}2`", - loc: SourceLocation { - start: Position { + open_quote: CloseBrace( + CloseBrace( + Position { line: 139, column: 13, }, - end: Position { - line: 139, - column: 16, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "2", loc: SourceLocation { start: Position { @@ -22674,6 +16140,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 139, + column: 15, + }, + ), + ), }, ], expressions: [ @@ -22699,19 +16173,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 139, - column: 16, - }, - end: Position { - line: 139, - column: 17, - }, + Semicolon( + Position { + line: 139, + column: 16, }, - }, + ), ), }, ), @@ -22720,19 +16187,12 @@ Mod( expr: Update( UpdateExpr { operator: Increment( - Slice { - source: "++", - loc: SourceLocation { - start: Position { - line: 141, - column: 2, - }, - end: Position { - line: 141, - column: 4, - }, + DoublePlus( + Position { + line: 141, + column: 2, }, - }, + ), ), argument: Ident( Ident { @@ -22754,19 +16214,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 141, - column: 4, - }, - end: Position { - line: 141, - column: 5, - }, + Semicolon( + Position { + line: 141, + column: 4, }, - }, + ), ), }, ), @@ -22775,19 +16228,12 @@ Mod( expr: Update( UpdateExpr { operator: Decrement( - Slice { - source: "--", - loc: SourceLocation { - start: Position { - line: 141, - column: 7, - }, - end: Position { - line: 141, - column: 9, - }, + DoubleMinus( + Position { + line: 141, + column: 7, }, - }, + ), ), argument: Ident( Ident { @@ -22809,19 +16255,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 141, - column: 9, - }, - end: Position { - line: 141, - column: 10, - }, + Semicolon( + Position { + line: 141, + column: 9, }, - }, + ), ), }, ), @@ -22830,121 +16269,72 @@ Mod( expr: Unary( UnaryExpr { operator: Delete( - Slice { - source: "delete", - loc: SourceLocation { - start: Position { - line: 143, - column: 1, - }, - end: Position { - line: 143, - column: 7, - }, + Delete( + Position { + line: 143, + column: 1, }, - }, + ), ), argument: Unary( UnaryExpr { operator: Void( - Slice { - source: "void", - loc: SourceLocation { - start: Position { - line: 143, - column: 8, - }, - end: Position { - line: 143, - column: 12, - }, + Void( + Position { + line: 143, + column: 8, }, - }, + ), ), argument: Unary( UnaryExpr { operator: TypeOf( - Slice { - source: "typeof", - loc: SourceLocation { - start: Position { - line: 143, - column: 13, - }, - end: Position { - line: 143, - column: 19, - }, + TypeOf( + Position { + line: 143, + column: 13, }, - }, + ), ), argument: Unary( UnaryExpr { operator: Plus( - Slice { - source: "+", - loc: SourceLocation { - start: Position { - line: 143, - column: 19, - }, - end: Position { - line: 143, - column: 20, - }, + Plus( + Position { + line: 143, + column: 19, }, - }, + ), ), argument: Unary( UnaryExpr { operator: Minus( - Slice { - source: "-", - loc: SourceLocation { - start: Position { - line: 143, - column: 20, - }, - end: Position { - line: 143, - column: 21, - }, + Minus( + Position { + line: 143, + column: 20, }, - }, + ), ), argument: Unary( UnaryExpr { operator: Tilde( - Slice { - source: "~", - loc: SourceLocation { - start: Position { - line: 143, - column: 21, - }, - end: Position { - line: 143, - column: 22, - }, + Tilde( + Position { + line: 143, + column: 21, }, - }, + ), ), argument: Unary( UnaryExpr { operator: Not( - Slice { - source: "!", - loc: SourceLocation { - start: Position { - line: 143, - column: 22, - }, - end: Position { - line: 143, - column: 23, - }, + Bang( + Position { + line: 143, + column: 22, }, - }, + ), ), argument: Ident( Ident { @@ -22978,19 +16368,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 143, - column: 24, - }, - end: Position { - line: 143, - column: 25, - }, + Semicolon( + Position { + line: 143, + column: 24, }, - }, + ), ), }, ), @@ -22999,19 +16382,12 @@ Mod( expr: Update( UpdateExpr { operator: Increment( - Slice { - source: "++", - loc: SourceLocation { - start: Position { - line: 143, - column: 26, - }, - end: Position { - line: 143, - column: 28, - }, + DoublePlus( + Position { + line: 143, + column: 26, }, - }, + ), ), argument: Ident( Ident { @@ -23033,19 +16409,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 143, - column: 29, - }, - end: Position { - line: 143, - column: 30, - }, + Semicolon( + Position { + line: 143, + column: 29, }, - }, + ), ), }, ), @@ -23054,19 +16423,12 @@ Mod( expr: Update( UpdateExpr { operator: Decrement( - Slice { - source: "--", - loc: SourceLocation { - start: Position { - line: 143, - column: 31, - }, - end: Position { - line: 143, - column: 33, - }, + DoubleMinus( + Position { + line: 143, + column: 31, }, - }, + ), ), argument: Ident( Ident { @@ -23088,19 +16450,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 143, - column: 34, - }, - end: Position { - line: 143, - column: 35, - }, + Semicolon( + Position { + line: 143, + column: 34, }, - }, + ), ), }, ), @@ -23109,19 +16464,12 @@ Mod( expr: Binary( BinaryExpr { operator: Times( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 145, - column: 2, - }, - end: Position { - line: 145, - column: 3, - }, + Asterisk( + Position { + line: 145, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -23160,19 +16508,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 145, - column: 4, - }, - end: Position { - line: 145, - column: 5, - }, + Semicolon( + Position { + line: 145, + column: 4, }, - }, + ), ), }, ), @@ -23181,19 +16522,12 @@ Mod( expr: Binary( BinaryExpr { operator: Over( - Slice { - source: "/", - loc: SourceLocation { - start: Position { - line: 145, - column: 7, - }, - end: Position { - line: 145, - column: 8, - }, + ForwardSlash( + Position { + line: 145, + column: 7, }, - }, + ), ), left: Lit( Number( @@ -23232,19 +16566,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 145, - column: 9, - }, - end: Position { - line: 145, - column: 10, - }, + Semicolon( + Position { + line: 145, + column: 9, }, - }, + ), ), }, ), @@ -23253,19 +16580,12 @@ Mod( expr: Binary( BinaryExpr { operator: Mod( - Slice { - source: "%", - loc: SourceLocation { - start: Position { - line: 145, - column: 12, - }, - end: Position { - line: 145, - column: 13, - }, + Percent( + Position { + line: 145, + column: 12, }, - }, + ), ), left: Lit( Number( @@ -23304,19 +16624,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 145, - column: 14, - }, - end: Position { - line: 145, - column: 15, - }, + Semicolon( + Position { + line: 145, + column: 14, }, - }, + ), ), }, ), @@ -23325,19 +16638,12 @@ Mod( expr: Binary( BinaryExpr { operator: Plus( - Slice { - source: "+", - loc: SourceLocation { - start: Position { - line: 147, - column: 2, - }, - end: Position { - line: 147, - column: 3, - }, + Plus( + Position { + line: 147, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -23376,19 +16682,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 147, - column: 4, - }, - end: Position { - line: 147, - column: 5, - }, + Semicolon( + Position { + line: 147, + column: 4, }, - }, + ), ), }, ), @@ -23397,19 +16696,12 @@ Mod( expr: Binary( BinaryExpr { operator: Minus( - Slice { - source: "-", - loc: SourceLocation { - start: Position { - line: 147, - column: 7, - }, - end: Position { - line: 147, - column: 8, - }, + Minus( + Position { + line: 147, + column: 7, }, - }, + ), ), left: Lit( Number( @@ -23448,19 +16740,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 147, - column: 9, - }, - end: Position { - line: 147, - column: 10, - }, + Semicolon( + Position { + line: 147, + column: 9, }, - }, + ), ), }, ), @@ -23469,19 +16754,12 @@ Mod( expr: Binary( BinaryExpr { operator: LeftShift( - Slice { - source: "<<", - loc: SourceLocation { - start: Position { - line: 149, - column: 2, - }, - end: Position { - line: 149, - column: 4, - }, + DoubleLessThan( + Position { + line: 149, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -23520,19 +16798,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 149, - column: 5, - }, - end: Position { - line: 149, - column: 6, - }, + Semicolon( + Position { + line: 149, + column: 5, }, - }, + ), ), }, ), @@ -23541,19 +16812,12 @@ Mod( expr: Binary( BinaryExpr { operator: RightShift( - Slice { - source: ">>", - loc: SourceLocation { - start: Position { - line: 149, - column: 8, - }, - end: Position { - line: 149, - column: 10, - }, + DoubleGreaterThan( + Position { + line: 149, + column: 8, }, - }, + ), ), left: Lit( Number( @@ -23592,19 +16856,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 149, - column: 11, - }, - end: Position { - line: 149, - column: 12, - }, + Semicolon( + Position { + line: 149, + column: 11, }, - }, + ), ), }, ), @@ -23613,19 +16870,12 @@ Mod( expr: Binary( BinaryExpr { operator: UnsignedRightShift( - Slice { - source: ">>>", - loc: SourceLocation { - start: Position { - line: 149, - column: 14, - }, - end: Position { - line: 149, - column: 17, - }, + TripleGreaterThan( + Position { + line: 149, + column: 14, }, - }, + ), ), left: Lit( Number( @@ -23664,19 +16914,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 149, - column: 18, - }, - end: Position { - line: 149, - column: 19, - }, + Semicolon( + Position { + line: 149, + column: 18, }, - }, + ), ), }, ), @@ -23685,19 +16928,12 @@ Mod( expr: Binary( BinaryExpr { operator: LessThan( - Slice { - source: "<", - loc: SourceLocation { - start: Position { - line: 151, - column: 2, - }, - end: Position { - line: 151, - column: 3, - }, + LessThan( + Position { + line: 151, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -23736,19 +16972,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 151, - column: 4, - }, - end: Position { - line: 151, - column: 5, - }, + Semicolon( + Position { + line: 151, + column: 4, }, - }, + ), ), }, ), @@ -23757,19 +16986,12 @@ Mod( expr: Binary( BinaryExpr { operator: GreaterThan( - Slice { - source: ">", - loc: SourceLocation { - start: Position { - line: 151, - column: 7, - }, - end: Position { - line: 151, - column: 8, - }, + GreaterThan( + Position { + line: 151, + column: 7, }, - }, + ), ), left: Lit( Number( @@ -23808,19 +17030,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 151, - column: 9, - }, - end: Position { - line: 151, - column: 10, - }, + Semicolon( + Position { + line: 151, + column: 9, }, - }, + ), ), }, ), @@ -23829,19 +17044,12 @@ Mod( expr: Binary( BinaryExpr { operator: LessThanEqual( - Slice { - source: "<=", - loc: SourceLocation { - start: Position { - line: 151, - column: 12, - }, - end: Position { - line: 151, - column: 14, - }, + LessThanEqual( + Position { + line: 151, + column: 12, }, - }, + ), ), left: Lit( Number( @@ -23880,19 +17088,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 151, - column: 15, - }, - end: Position { - line: 151, - column: 16, - }, + Semicolon( + Position { + line: 151, + column: 15, }, - }, + ), ), }, ), @@ -23901,19 +17102,12 @@ Mod( expr: Binary( BinaryExpr { operator: GreaterThanEqual( - Slice { - source: ">=", - loc: SourceLocation { - start: Position { - line: 151, - column: 18, - }, - end: Position { - line: 151, - column: 20, - }, + GreaterThanEqual( + Position { + line: 151, + column: 18, }, - }, + ), ), left: Lit( Number( @@ -23952,19 +17146,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 151, - column: 21, - }, - end: Position { - line: 151, - column: 22, - }, + Semicolon( + Position { + line: 151, + column: 21, }, - }, + ), ), }, ), @@ -23973,19 +17160,12 @@ Mod( expr: Binary( BinaryExpr { operator: InstanceOf( - Slice { - source: "instanceof", - loc: SourceLocation { - start: Position { - line: 152, - column: 3, - }, - end: Position { - line: 152, - column: 13, - }, + InstanceOf( + Position { + line: 152, + column: 3, }, - }, + ), ), left: Lit( Number( @@ -24006,75 +17186,40 @@ Mod( ), right: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 152, - column: 14, - }, - end: Position { - line: 152, - column: 22, - }, + keyword: Function( + Position { + line: 152, + column: 14, }, - }, + ), id: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 152, - column: 22, - }, - end: Position { - line: 152, - column: 23, - }, + open_paren: OpenParen( + Position { + line: 152, + column: 22, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 152, - column: 23, - }, - end: Position { - line: 152, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 152, + column: 23, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 152, - column: 24, - }, - end: Position { - line: 152, - column: 25, - }, + open_brace: OpenBrace( + Position { + line: 152, + column: 24, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 152, - column: 25, - }, - end: Position { - line: 152, - column: 26, - }, + close_brace: CloseBrace( + Position { + line: 152, + column: 25, }, - }, + ), }, star: None, keyword_async: None, @@ -24083,19 +17228,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 152, - column: 26, - }, - end: Position { - line: 152, - column: 27, - }, + Semicolon( + Position { + line: 152, + column: 26, }, - }, + ), ), }, ), @@ -24104,19 +17242,12 @@ Mod( expr: Binary( BinaryExpr { operator: In( - Slice { - source: "in", - loc: SourceLocation { - start: Position { - line: 153, - column: 3, - }, - end: Position { - line: 153, - column: 5, - }, + In( + Position { + line: 153, + column: 3, }, - }, + ), ), left: Lit( Number( @@ -24137,51 +17268,30 @@ Mod( ), right: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 153, - column: 5, - }, - end: Position { - line: 153, - column: 6, - }, + open_brace: OpenBrace( + Position { + line: 153, + column: 5, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 153, - column: 6, - }, - end: Position { - line: 153, - column: 7, - }, + close_brace: CloseBrace( + Position { + line: 153, + column: 6, }, - }, + ), }, ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 153, - column: 7, - }, - end: Position { - line: 153, - column: 8, - }, + Semicolon( + Position { + line: 153, + column: 7, }, - }, + ), ), }, ), @@ -24190,19 +17300,12 @@ Mod( expr: Binary( BinaryExpr { operator: Equal( - Slice { - source: "==", - loc: SourceLocation { - start: Position { - line: 155, - column: 2, - }, - end: Position { - line: 155, - column: 4, - }, + DoubleEqual( + Position { + line: 155, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -24241,19 +17344,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 155, - column: 5, - }, - end: Position { - line: 155, - column: 6, - }, + Semicolon( + Position { + line: 155, + column: 5, }, - }, + ), ), }, ), @@ -24262,19 +17358,12 @@ Mod( expr: Binary( BinaryExpr { operator: NotEqual( - Slice { - source: "!=", - loc: SourceLocation { - start: Position { - line: 155, - column: 8, - }, - end: Position { - line: 155, - column: 10, - }, + BangEqual( + Position { + line: 155, + column: 8, }, - }, + ), ), left: Lit( Number( @@ -24313,19 +17402,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 155, - column: 11, - }, - end: Position { - line: 155, - column: 12, - }, + Semicolon( + Position { + line: 155, + column: 11, }, - }, + ), ), }, ), @@ -24334,19 +17416,12 @@ Mod( expr: Binary( BinaryExpr { operator: StrictEqual( - Slice { - source: "===", - loc: SourceLocation { - start: Position { - line: 155, - column: 14, - }, - end: Position { - line: 155, - column: 17, - }, + TripleEqual( + Position { + line: 155, + column: 14, }, - }, + ), ), left: Lit( Number( @@ -24385,19 +17460,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 155, - column: 18, - }, - end: Position { - line: 155, - column: 19, - }, + Semicolon( + Position { + line: 155, + column: 18, }, - }, + ), ), }, ), @@ -24406,19 +17474,12 @@ Mod( expr: Binary( BinaryExpr { operator: StrictNotEqual( - Slice { - source: "!==", - loc: SourceLocation { - start: Position { - line: 155, - column: 21, - }, - end: Position { - line: 155, - column: 24, - }, + BangDoubleEqual( + Position { + line: 155, + column: 21, }, - }, + ), ), left: Lit( Number( @@ -24457,19 +17518,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 155, - column: 25, - }, - end: Position { - line: 155, - column: 26, - }, + Semicolon( + Position { + line: 155, + column: 25, }, - }, + ), ), }, ), @@ -24478,19 +17532,12 @@ Mod( expr: Binary( BinaryExpr { operator: And( - Slice { - source: "&", - loc: SourceLocation { - start: Position { - line: 157, - column: 2, - }, - end: Position { - line: 157, - column: 3, - }, + Ampersand( + Position { + line: 157, + column: 2, }, - }, + ), ), left: Lit( Number( @@ -24529,19 +17576,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 157, - column: 4, - }, - end: Position { - line: 157, - column: 5, - }, + Semicolon( + Position { + line: 157, + column: 4, }, - }, + ), ), }, ), @@ -24550,19 +17590,12 @@ Mod( expr: Binary( BinaryExpr { operator: XOr( - Slice { - source: "^", - loc: SourceLocation { - start: Position { - line: 157, - column: 7, - }, - end: Position { - line: 157, - column: 8, - }, + Caret( + Position { + line: 157, + column: 7, }, - }, + ), ), left: Lit( Number( @@ -24601,19 +17634,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 157, - column: 9, - }, - end: Position { - line: 157, - column: 10, - }, + Semicolon( + Position { + line: 157, + column: 9, }, - }, + ), ), }, ), @@ -24622,19 +17648,12 @@ Mod( expr: Binary( BinaryExpr { operator: Or( - Slice { - source: "|", - loc: SourceLocation { - start: Position { - line: 157, - column: 12, - }, - end: Position { - line: 157, - column: 13, - }, + Pipe( + Position { + line: 157, + column: 12, }, - }, + ), ), left: Lit( Number( @@ -24673,19 +17692,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 157, - column: 14, - }, - end: Position { - line: 157, - column: 15, - }, + Semicolon( + Position { + line: 157, + column: 14, }, - }, + ), ), }, ), @@ -24694,19 +17706,12 @@ Mod( expr: Logical( LogicalExpr { operator: And( - Slice { - source: "&&", - loc: SourceLocation { - start: Position { - line: 157, - column: 17, - }, - end: Position { - line: 157, - column: 19, - }, + DoubleAmpersand( + Position { + line: 157, + column: 17, }, - }, + ), ), left: Lit( Number( @@ -24745,19 +17750,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 157, - column: 20, - }, - end: Position { - line: 157, - column: 21, - }, + Semicolon( + Position { + line: 157, + column: 20, }, - }, + ), ), }, ), @@ -24766,19 +17764,12 @@ Mod( expr: Logical( LogicalExpr { operator: Or( - Slice { - source: "||", - loc: SourceLocation { - start: Position { - line: 157, - column: 23, - }, - end: Position { - line: 157, - column: 25, - }, + DoublePipe( + Position { + line: 157, + column: 23, }, - }, + ), ), left: Lit( Number( @@ -24817,19 +17808,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 157, - column: 26, - }, - end: Position { - line: 157, - column: 27, - }, + Semicolon( + Position { + line: 157, + column: 26, }, - }, + ), ), }, ), @@ -24854,19 +17838,12 @@ Mod( }, ), ), - question_mark: Slice { - source: "?", - loc: SourceLocation { - start: Position { - line: 159, - column: 2, - }, - end: Position { - line: 159, - column: 3, - }, + question_mark: QuestionMark( + Position { + line: 159, + column: 2, }, - }, + ), alternate: Lit( Number( Slice { @@ -24884,19 +17861,12 @@ Mod( }, ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 159, - column: 4, - }, - end: Position { - line: 159, - column: 5, - }, + colon: Colon( + Position { + line: 159, + column: 4, }, - }, + ), consequent: Lit( Number( Slice { @@ -24917,19 +17887,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 159, - column: 6, - }, - end: Position { - line: 159, - column: 7, - }, + Semicolon( + Position { + line: 159, + column: 6, }, - }, + ), ), }, ), @@ -24954,19 +17917,12 @@ Mod( }, ), ), - question_mark: Slice { - source: "?", - loc: SourceLocation { - start: Position { - line: 159, - column: 9, - }, - end: Position { - line: 159, - column: 10, - }, + question_mark: QuestionMark( + Position { + line: 159, + column: 9, }, - }, + ), alternate: Lit( Number( Slice { @@ -24984,19 +17940,12 @@ Mod( }, ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 159, - column: 15, - }, - end: Position { - line: 159, - column: 16, - }, + colon: Colon( + Position { + line: 159, + column: 15, }, - }, + ), consequent: Conditional( ConditionalExpr { test: Lit( @@ -25016,19 +17965,12 @@ Mod( }, ), ), - question_mark: Slice { - source: "?", - loc: SourceLocation { - start: Position { - line: 159, - column: 11, - }, - end: Position { - line: 159, - column: 12, - }, + question_mark: QuestionMark( + Position { + line: 159, + column: 11, }, - }, + ), alternate: Lit( Number( Slice { @@ -25046,19 +17988,12 @@ Mod( }, ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 159, - column: 13, - }, - end: Position { - line: 159, - column: 14, - }, + colon: Colon( + Position { + line: 159, + column: 13, }, - }, + ), consequent: Lit( Number( Slice { @@ -25081,19 +18016,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 159, - column: 17, - }, - end: Position { - line: 159, - column: 18, - }, + Semicolon( + Position { + line: 159, + column: 17, }, - }, + ), ), }, ), @@ -25104,19 +18032,12 @@ Mod( test: Logical( LogicalExpr { operator: Or( - Slice { - source: "||", - loc: SourceLocation { - start: Position { - line: 159, - column: 20, - }, - end: Position { - line: 159, - column: 22, - }, + DoublePipe( + Position { + line: 159, + column: 20, }, - }, + ), ), left: Lit( Number( @@ -25154,35 +18075,21 @@ Mod( ), }, ), - question_mark: Slice { - source: "?", - loc: SourceLocation { - start: Position { - line: 159, - column: 23, - }, - end: Position { - line: 159, - column: 24, - }, + question_mark: QuestionMark( + Position { + line: 159, + column: 23, }, - }, + ), alternate: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 159, - column: 29, - }, - end: Position { - line: 159, - column: 30, - }, + Equal( + Position { + line: 159, + column: 29, }, - }, + ), ), left: Expr( Ident( @@ -25222,35 +18129,21 @@ Mod( ), }, ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 159, - column: 27, - }, - end: Position { - line: 159, - column: 28, - }, + colon: Colon( + Position { + line: 159, + column: 27, }, - }, + ), consequent: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 159, - column: 25, - }, - end: Position { - line: 159, - column: 26, - }, + Equal( + Position { + line: 159, + column: 25, }, - }, + ), ), left: Expr( Ident( @@ -25293,19 +18186,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 159, - column: 31, - }, - end: Position { - line: 159, - column: 32, - }, + Semicolon( + Position { + line: 159, + column: 31, }, - }, + ), ), }, ), @@ -25314,19 +18200,12 @@ Mod( expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 161, - column: 2, - }, - end: Position { - line: 161, - column: 3, - }, + Equal( + Position { + line: 161, + column: 2, }, - }, + ), ), left: Expr( Ident( @@ -25367,19 +18246,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 4, - }, - end: Position { - line: 161, - column: 5, - }, + Semicolon( + Position { + line: 161, + column: 4, }, - }, + ), ), }, ), @@ -25388,19 +18260,12 @@ Mod( expr: Assign( AssignExpr { operator: TimesEqual( - Slice { - source: "*=", - loc: SourceLocation { - start: Position { - line: 161, - column: 7, - }, - end: Position { - line: 161, - column: 9, - }, + AsteriskEqual( + Position { + line: 161, + column: 7, }, - }, + ), ), left: Expr( Ident( @@ -25441,19 +18306,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 10, - }, - end: Position { - line: 161, - column: 11, - }, + Semicolon( + Position { + line: 161, + column: 10, }, - }, + ), ), }, ), @@ -25462,19 +18320,12 @@ Mod( expr: Assign( AssignExpr { operator: DivEqual( - Slice { - source: "/=", - loc: SourceLocation { - start: Position { - line: 161, - column: 13, - }, - end: Position { - line: 161, - column: 15, - }, + ForwardSlashEqual( + Position { + line: 161, + column: 13, }, - }, + ), ), left: Expr( Ident( @@ -25515,19 +18366,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 16, - }, - end: Position { - line: 161, - column: 17, - }, + Semicolon( + Position { + line: 161, + column: 16, }, - }, + ), ), }, ), @@ -25536,19 +18380,12 @@ Mod( expr: Assign( AssignExpr { operator: ModEqual( - Slice { - source: "%=", - loc: SourceLocation { - start: Position { - line: 161, - column: 19, - }, - end: Position { - line: 161, - column: 21, - }, + PercentEqual( + Position { + line: 161, + column: 19, }, - }, + ), ), left: Expr( Ident( @@ -25589,19 +18426,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 22, - }, - end: Position { - line: 161, - column: 23, - }, + Semicolon( + Position { + line: 161, + column: 22, }, - }, + ), ), }, ), @@ -25610,19 +18440,12 @@ Mod( expr: Assign( AssignExpr { operator: PlusEqual( - Slice { - source: "+=", - loc: SourceLocation { - start: Position { - line: 161, - column: 25, - }, - end: Position { - line: 161, - column: 27, - }, + PlusEqual( + Position { + line: 161, + column: 25, }, - }, + ), ), left: Expr( Ident( @@ -25663,19 +18486,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 28, - }, - end: Position { - line: 161, - column: 29, - }, + Semicolon( + Position { + line: 161, + column: 28, }, - }, + ), ), }, ), @@ -25684,19 +18500,12 @@ Mod( expr: Assign( AssignExpr { operator: MinusEqual( - Slice { - source: "-=", - loc: SourceLocation { - start: Position { - line: 161, - column: 31, - }, - end: Position { - line: 161, - column: 33, - }, + MinusEqual( + Position { + line: 161, + column: 31, }, - }, + ), ), left: Expr( Ident( @@ -25737,19 +18546,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 161, - column: 34, - }, - end: Position { - line: 161, - column: 35, - }, + Semicolon( + Position { + line: 161, + column: 34, }, - }, + ), ), }, ), @@ -25758,19 +18560,12 @@ Mod( expr: Assign( AssignExpr { operator: LeftShiftEqual( - Slice { - source: "<<=", - loc: SourceLocation { - start: Position { - line: 162, - column: 2, - }, - end: Position { - line: 162, - column: 5, - }, + DoubleLessThanEqual( + Position { + line: 162, + column: 2, }, - }, + ), ), left: Expr( Ident( @@ -25811,19 +18606,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 6, - }, - end: Position { - line: 162, - column: 7, - }, + Semicolon( + Position { + line: 162, + column: 6, }, - }, + ), ), }, ), @@ -25832,19 +18620,12 @@ Mod( expr: Assign( AssignExpr { operator: RightShiftEqual( - Slice { - source: ">>=", - loc: SourceLocation { - start: Position { - line: 162, - column: 9, - }, - end: Position { - line: 162, - column: 12, - }, + DoubleGreaterThanEqual( + Position { + line: 162, + column: 9, }, - }, + ), ), left: Expr( Ident( @@ -25885,19 +18666,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 13, - }, - end: Position { - line: 162, - column: 14, - }, + Semicolon( + Position { + line: 162, + column: 13, }, - }, + ), ), }, ), @@ -25906,19 +18680,12 @@ Mod( expr: Assign( AssignExpr { operator: UnsignedRightShiftEqual( - Slice { - source: ">>>=", - loc: SourceLocation { - start: Position { - line: 162, - column: 16, - }, - end: Position { - line: 162, - column: 20, - }, + TripleGreaterThanEqual( + Position { + line: 162, + column: 16, }, - }, + ), ), left: Expr( Ident( @@ -25959,19 +18726,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 21, - }, - end: Position { - line: 162, - column: 22, - }, + Semicolon( + Position { + line: 162, + column: 21, }, - }, + ), ), }, ), @@ -25980,19 +18740,12 @@ Mod( expr: Assign( AssignExpr { operator: AndEqual( - Slice { - source: "&=", - loc: SourceLocation { - start: Position { - line: 162, - column: 24, - }, - end: Position { - line: 162, - column: 26, - }, + AmpersandEqual( + Position { + line: 162, + column: 24, }, - }, + ), ), left: Expr( Ident( @@ -26033,19 +18786,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 27, - }, - end: Position { - line: 162, - column: 28, - }, + Semicolon( + Position { + line: 162, + column: 27, }, - }, + ), ), }, ), @@ -26054,19 +18800,12 @@ Mod( expr: Assign( AssignExpr { operator: XOrEqual( - Slice { - source: "^=", - loc: SourceLocation { - start: Position { - line: 162, - column: 30, - }, - end: Position { - line: 162, - column: 32, - }, + CaretEqual( + Position { + line: 162, + column: 30, }, - }, + ), ), left: Expr( Ident( @@ -26107,19 +18846,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 33, - }, - end: Position { - line: 162, - column: 34, - }, + Semicolon( + Position { + line: 162, + column: 33, }, - }, + ), ), }, ), @@ -26128,19 +18860,12 @@ Mod( expr: Assign( AssignExpr { operator: OrEqual( - Slice { - source: "|=", - loc: SourceLocation { - start: Position { - line: 162, - column: 36, - }, - end: Position { - line: 162, - column: 38, - }, + PipeEqual( + Position { + line: 162, + column: 36, }, - }, + ), ), left: Expr( Ident( @@ -26181,19 +18906,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 162, - column: 39, - }, - end: Position { - line: 162, - column: 40, - }, + Semicolon( + Position { + line: 162, + column: 39, }, - }, + ), ), }, ), @@ -26220,19 +18938,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 164, - column: 2, - }, - end: Position { - line: 164, - column: 3, - }, + Comma( + Position { + line: 164, + column: 2, }, - }, + ), ), }, ListEntry { @@ -26258,19 +18969,12 @@ Mod( ], ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 164, - column: 4, - }, - end: Position { - line: 164, - column: 5, - }, + Semicolon( + Position { + line: 164, + column: 4, }, - }, + ), ), }, ), @@ -26297,19 +19001,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 164, - column: 7, - }, - end: Position { - line: 164, - column: 8, - }, + Comma( + Position { + line: 164, + column: 7, }, - }, + ), ), }, ListEntry { @@ -26331,19 +19028,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 164, - column: 9, - }, - end: Position { - line: 164, - column: 10, - }, + Comma( + Position { + line: 164, + column: 9, }, - }, + ), ), }, ListEntry { @@ -26369,19 +19059,12 @@ Mod( ], ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 164, - column: 11, - }, - end: Position { - line: 164, - column: 12, - }, + Semicolon( + Position { + line: 164, + column: 11, }, - }, + ), ), }, ), @@ -26393,19 +19076,12 @@ Mod( item: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 164, - column: 14, - }, - end: Position { - line: 164, - column: 15, - }, + Equal( + Position { + line: 164, + column: 14, }, - }, + ), ), left: Expr( Ident( @@ -26446,38 +19122,24 @@ Mod( }, ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 164, - column: 16, - }, - end: Position { - line: 164, - column: 17, - }, + Comma( + Position { + line: 164, + column: 16, }, - }, + ), ), }, ListEntry { item: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 164, - column: 18, - }, - end: Position { - line: 164, - column: 19, - }, + Equal( + Position { + line: 164, + column: 18, }, - }, + ), ), left: Expr( Ident( @@ -26522,122 +19184,73 @@ Mod( ], ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 164, - column: 20, - }, - end: Position { - line: 164, - column: 21, - }, + Semicolon( + Position { + line: 164, + column: 20, }, - }, + ), ), }, ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 1, - }, - end: Position { - line: 167, - column: 2, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 1, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 2, - }, - end: Position { - line: 167, - column: 3, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 2, }, - }, + ), }, ), ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 4, - }, - end: Position { - line: 167, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 4, }, - }, + ), stmts: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 167, - column: 5, - }, - end: Position { - line: 167, - column: 6, - }, + Semicolon( + Position { + line: 167, + column: 5, }, - }, + ), ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 6, - }, - end: Position { - line: 167, - column: 7, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 6, }, - }, + ), }, ), ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 8, - }, - end: Position { - line: 167, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 8, }, - }, + ), stmts: [ Stmt( Expr { @@ -26662,38 +19275,24 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 10, - }, - end: Position { - line: 167, - column: 11, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 10, }, - }, + ), }, ), ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 12, - }, - end: Position { - line: 167, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 12, }, - }, + ), stmts: [ Stmt( Expr { @@ -26715,55 +19314,34 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 167, - column: 14, - }, - end: Position { - line: 167, - column: 15, - }, + Semicolon( + Position { + line: 167, + column: 14, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 15, - }, - end: Position { - line: 167, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 15, }, - }, + ), }, ), ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 17, - }, - end: Position { - line: 167, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 17, }, - }, + ), stmts: [ Stmt( Expr { @@ -26785,19 +19363,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 167, - column: 19, - }, - end: Position { - line: 167, - column: 20, - }, + Semicolon( + Position { + line: 167, + column: 19, }, - }, + ), ), }, ), @@ -26824,38 +19395,24 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 21, - }, - end: Position { - line: 167, - column: 22, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 21, }, - }, + ), }, ), ), Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 167, - column: 23, - }, - end: Position { - line: 167, - column: 24, - }, + open_brace: OpenBrace( + Position { + line: 167, + column: 23, }, - }, + ), stmts: [ Stmt( Expr { @@ -26877,19 +19434,12 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 167, - column: 25, - }, - end: Position { - line: 167, - column: 26, - }, + Semicolon( + Position { + line: 167, + column: 25, }, - }, + ), ), }, ), @@ -26913,36 +19463,22 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 167, - column: 27, - }, - end: Position { - line: 167, - column: 28, - }, + Semicolon( + Position { + line: 167, + column: 27, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 167, - column: 28, - }, - end: Position { - line: 167, - column: 29, - }, + close_brace: CloseBrace( + Position { + line: 167, + column: 28, }, - }, + ), }, ), ), @@ -26951,19 +19487,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 169, - column: 1, - }, - end: Position { - line: 169, - column: 4, - }, + Var( + Position { + line: 169, + column: 1, }, - }, + ), ), ), decls: [ @@ -26994,19 +19523,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 169, - column: 7, - }, - end: Position { - line: 169, - column: 8, - }, + Semicolon( + Position { + line: 169, + column: 7, }, - }, + ), ), }, ), @@ -27015,19 +19537,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 169, - column: 9, - }, - end: Position { - line: 169, - column: 12, - }, + Var( + Position { + line: 169, + column: 9, }, - }, + ), ), ), decls: [ @@ -27054,19 +19569,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 169, - column: 15, - }, - end: Position { - line: 169, - column: 16, - }, + Comma( + Position { + line: 169, + column: 15, }, - }, + ), ), }, ListEntry { @@ -27096,19 +19604,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 169, - column: 18, - }, - end: Position { - line: 169, - column: 19, - }, + Semicolon( + Position { + line: 169, + column: 18, }, - }, + ), ), }, ), @@ -27117,19 +19618,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 169, - column: 20, - }, - end: Position { - line: 169, - column: 23, - }, + Var( + Position { + line: 169, + column: 20, }, - }, + ), ), ), decls: [ @@ -27156,19 +19650,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 169, - column: 26, - }, - end: Position { - line: 169, - column: 27, - }, + Comma( + Position { + line: 169, + column: 26, }, - }, + ), ), }, ListEntry { @@ -27194,19 +19681,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 169, - column: 29, - }, - end: Position { - line: 169, - column: 30, - }, + Comma( + Position { + line: 169, + column: 29, }, - }, + ), ), }, ListEntry { @@ -27236,19 +19716,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 169, - column: 32, - }, - end: Position { - line: 169, - column: 33, - }, + Semicolon( + Position { + line: 169, + column: 32, }, - }, + ), ), }, ), @@ -27257,19 +19730,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 170, - column: 1, - }, - end: Position { - line: 170, - column: 4, - }, + Var( + Position { + line: 170, + column: 1, }, - }, + ), ), ), decls: [ @@ -27293,19 +19759,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 170, - column: 7, - }, - end: Position { - line: 170, - column: 8, - }, + Equal( + Position { + line: 170, + column: 7, }, - }, + ), ), init: Some( Lit( @@ -27332,19 +19791,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 170, - column: 9, - }, - end: Position { - line: 170, - column: 10, - }, + Semicolon( + Position { + line: 170, + column: 9, }, - }, + ), ), }, ), @@ -27353,19 +19805,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 170, - column: 11, - }, - end: Position { - line: 170, - column: 14, - }, + Var( + Position { + line: 170, + column: 11, }, - }, + ), ), ), decls: [ @@ -27389,19 +19834,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 170, - column: 17, - }, - end: Position { - line: 170, - column: 18, - }, + Equal( + Position { + line: 170, + column: 17, }, - }, + ), ), init: Some( Lit( @@ -27424,19 +19862,12 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 170, - column: 19, - }, - end: Position { - line: 170, - column: 20, - }, + Comma( + Position { + line: 170, + column: 19, }, - }, + ), ), }, ListEntry { @@ -27466,19 +19897,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 170, - column: 22, - }, - end: Position { - line: 170, - column: 23, - }, + Semicolon( + Position { + line: 170, + column: 22, }, - }, + ), ), }, ), @@ -27487,19 +19911,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 170, - column: 24, - }, - end: Position { - line: 170, - column: 27, - }, + Var( + Position { + line: 170, + column: 24, }, - }, + ), ), ), decls: [ @@ -27526,19 +19943,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 170, - column: 30, - }, - end: Position { - line: 170, - column: 31, - }, + Comma( + Position { + line: 170, + column: 30, }, - }, + ), ), }, ListEntry { @@ -27561,19 +19971,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 170, - column: 34, - }, - end: Position { - line: 170, - column: 35, - }, + Equal( + Position { + line: 170, + column: 34, }, - }, + ), ), init: Some( Lit( @@ -27600,19 +20003,12 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 170, - column: 36, - }, - end: Position { - line: 170, - column: 37, - }, + Semicolon( + Position { + line: 170, + column: 36, }, - }, + ), ), }, ), @@ -27621,19 +20017,12 @@ Mod( decls: VarDecls { keyword: Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 170, - column: 38, - }, - end: Position { - line: 170, - column: 41, - }, + Var( + Position { + line: 170, + column: 38, }, - }, + ), ), ), decls: [ @@ -27657,19 +20046,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 170, - column: 45, - }, - end: Position { - line: 170, - column: 46, - }, + Equal( + Position { + line: 170, + column: 45, }, - }, + ), ), init: Some( Lit( @@ -27692,19 +20074,12 @@ Mod( ), }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 170, - column: 47, - }, - end: Position { - line: 170, - column: 48, - }, + Comma( + Position { + line: 170, + column: 47, }, - }, + ), ), }, ListEntry { @@ -27727,19 +20102,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 170, - column: 51, - }, - end: Position { - line: 170, - column: 52, - }, + Equal( + Position { + line: 170, + column: 51, }, - }, + ), ), init: Some( Lit( @@ -27766,68 +20134,40 @@ Mod( ], }, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 170, - column: 53, - }, - end: Position { - line: 170, - column: 54, - }, + Semicolon( + Position { + line: 170, + column: 53, }, - }, + ), ), }, ), Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 172, - column: 1, - }, - end: Position { - line: 172, - column: 2, - }, + Semicolon( + Position { + line: 172, + column: 1, }, - }, + ), ), ), Stmt( If( IfStmt { - keyword: Slice { - source: "if", - loc: SourceLocation { - start: Position { - line: 174, - column: 1, - }, - end: Position { - line: 174, - column: 3, - }, + keyword: If( + Position { + line: 174, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 174, - column: 3, - }, - end: Position { - line: 174, - column: 4, - }, + ), + open_paren: OpenParen( + Position { + line: 174, + column: 3, }, - }, + ), test: Lit( Number( Slice { @@ -27845,33 +20185,19 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 174, - column: 5, - }, - end: Position { - line: 174, - column: 6, - }, + close_paren: CloseParen( + Position { + line: 174, + column: 5, }, - }, + ), consequent: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 174, - column: 6, - }, - end: Position { - line: 174, - column: 7, - }, + Semicolon( + Position { + line: 174, + column: 6, }, - }, + ), ), alternate: None, }, @@ -27880,32 +20206,18 @@ Mod( Stmt( If( IfStmt { - keyword: Slice { - source: "if", - loc: SourceLocation { - start: Position { - line: 174, - column: 8, - }, - end: Position { - line: 174, - column: 10, - }, + keyword: If( + Position { + line: 174, + column: 8, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 174, - column: 10, - }, - end: Position { - line: 174, - column: 11, - }, + ), + open_paren: OpenParen( + Position { + line: 174, + column: 10, }, - }, + ), test: Lit( Number( Slice { @@ -27923,63 +20235,35 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 174, - column: 12, - }, - end: Position { - line: 174, - column: 13, - }, + close_paren: CloseParen( + Position { + line: 174, + column: 12, }, - }, + ), consequent: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 174, - column: 13, - }, - end: Position { - line: 174, - column: 14, - }, + Semicolon( + Position { + line: 174, + column: 13, }, - }, + ), ), alternate: Some( ElseStmt { - keyword: Slice { - source: "else", - loc: SourceLocation { - start: Position { - line: 174, - column: 14, - }, - end: Position { - line: 174, - column: 18, - }, + keyword: Else( + Position { + line: 174, + column: 14, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 174, - column: 18, - }, - end: Position { - line: 174, - column: 19, - }, + Semicolon( + Position { + line: 174, + column: 18, }, - }, + ), ), }, ), @@ -27989,60 +20273,32 @@ Mod( Stmt( DoWhile( DoWhileStmt { - keyword_do: Slice { - source: "do", - loc: SourceLocation { - start: Position { - line: 176, - column: 1, - }, - end: Position { - line: 176, - column: 3, - }, - }, - }, - body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 176, - column: 3, - }, - end: Position { - line: 176, - column: 4, - }, - }, + keyword_do: Do( + Position { + line: 176, + column: 1, }, ), - keyword_while: Slice { - source: "while", - loc: SourceLocation { - start: Position { - line: 176, - column: 4, - }, - end: Position { + body: Empty( + Semicolon( + Position { line: 176, - column: 9, + column: 3, }, + ), + ), + keyword_while: While( + Position { + line: 176, + column: 4, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 176, - column: 9, - }, - end: Position { - line: 176, - column: 10, - }, + ), + open_paren: OpenParen( + Position { + line: 176, + column: 9, }, - }, + ), test: Lit( Number( Slice { @@ -28060,19 +20316,12 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 176, - column: 11, - }, - end: Position { - line: 176, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 176, + column: 11, }, - }, + ), semi_colon: None, }, ), @@ -28097,79 +20346,44 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 176, - column: 14, - }, - end: Position { - line: 176, - column: 15, - }, + Semicolon( + Position { + line: 176, + column: 14, }, - }, + ), ), }, ), Stmt( DoWhile( DoWhileStmt { - keyword_do: Slice { - source: "do", - loc: SourceLocation { - start: Position { - line: 177, - column: 1, - }, - end: Position { - line: 177, - column: 3, - }, - }, - }, - body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 177, - column: 3, - }, - end: Position { - line: 177, - column: 4, - }, - }, + keyword_do: Do( + Position { + line: 177, + column: 1, }, ), - keyword_while: Slice { - source: "while", - loc: SourceLocation { - start: Position { - line: 177, - column: 4, - }, - end: Position { + body: Empty( + Semicolon( + Position { line: 177, - column: 9, + column: 3, }, + ), + ), + keyword_while: While( + Position { + line: 177, + column: 4, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 177, - column: 9, - }, - end: Position { - line: 177, - column: 10, - }, + ), + open_paren: OpenParen( + Position { + line: 177, + column: 9, }, - }, + ), test: Lit( Number( Slice { @@ -28187,33 +20401,19 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 177, - column: 11, - }, - end: Position { - line: 177, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 177, + column: 11, }, - }, + ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 177, - column: 12, - }, - end: Position { - line: 177, - column: 13, - }, + Semicolon( + Position { + line: 177, + column: 12, }, - }, + ), ), }, ), @@ -28221,60 +20421,32 @@ Mod( Stmt( DoWhile( DoWhileStmt { - keyword_do: Slice { - source: "do", - loc: SourceLocation { - start: Position { - line: 178, - column: 1, - }, - end: Position { - line: 178, - column: 3, - }, - }, - }, - body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 178, - column: 3, - }, - end: Position { - line: 178, - column: 4, - }, - }, + keyword_do: Do( + Position { + line: 178, + column: 1, }, ), - keyword_while: Slice { - source: "while", - loc: SourceLocation { - start: Position { - line: 178, - column: 4, - }, - end: Position { + body: Empty( + Semicolon( + Position { line: 178, - column: 9, + column: 3, }, + ), + ), + keyword_while: While( + Position { + line: 178, + column: 4, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 178, - column: 9, - }, - end: Position { - line: 178, - column: 10, - }, + ), + open_paren: OpenParen( + Position { + line: 178, + column: 9, }, - }, + ), test: Lit( Number( Slice { @@ -28292,19 +20464,12 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 178, - column: 11, - }, - end: Position { - line: 178, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 178, + column: 11, }, - }, + ), semi_colon: None, }, ), @@ -28334,32 +20499,18 @@ Mod( Stmt( While( WhileStmt { - keyword: Slice { - source: "while", - loc: SourceLocation { - start: Position { - line: 179, - column: 1, - }, - end: Position { - line: 179, - column: 6, - }, + keyword: While( + Position { + line: 179, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 179, - column: 6, - }, - end: Position { - line: 179, - column: 7, - }, + ), + open_paren: OpenParen( + Position { + line: 179, + column: 6, }, - }, + ), test: Lit( Number( Slice { @@ -28377,137 +20528,74 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 179, - column: 8, - }, - end: Position { + close_paren: CloseParen( + Position { + line: 179, + column: 8, + }, + ), + body: Empty( + Semicolon( + Position { line: 179, column: 9, }, - }, - }, - body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 179, - column: 9, - }, - end: Position { - line: 179, - column: 10, - }, - }, + ), + ), + }, + ), + ), + Stmt( + For( + ForStmt { + keyword: For( + Position { + line: 180, + column: 1, }, ), - }, - ), - ), - Stmt( - For( - ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 180, - column: 1, - }, - end: Position { - line: 180, - column: 4, - }, - }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 180, - column: 4, - }, - end: Position { - line: 180, - column: 5, - }, + open_paren: OpenParen( + Position { + line: 180, + column: 4, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 5, - }, - end: Position { - line: 180, - column: 6, - }, + semi1: Semicolon( + Position { + line: 180, + column: 5, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 6, - }, - end: Position { - line: 180, - column: 7, - }, + semi2: Semicolon( + Position { + line: 180, + column: 6, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 180, - column: 7, - }, - end: Position { - line: 180, - column: 8, - }, + close_paren: CloseParen( + Position { + line: 180, + column: 7, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 180, - column: 8, - }, - end: Position { - line: 180, - column: 13, - }, + keyword: Break( + Position { + line: 180, + column: 8, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 13, - }, - end: Position { - line: 180, - column: 14, - }, + Semicolon( + Position { + line: 180, + column: 13, }, - }, + ), ), }, }, @@ -28516,32 +20604,18 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 180, - column: 15, - }, - end: Position { - line: 180, - column: 18, - }, + keyword: For( + Position { + line: 180, + column: 15, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 180, - column: 18, - }, - end: Position { - line: 180, - column: 19, - }, + ), + open_paren: OpenParen( + Position { + line: 180, + column: 18, }, - }, + ), init: Some( Expr( Lit( @@ -28563,19 +20637,12 @@ Mod( ), ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 20, - }, - end: Position { - line: 180, - column: 21, - }, + semi1: Semicolon( + Position { + line: 180, + column: 20, }, - }, + ), test: Some( Lit( Number( @@ -28595,19 +20662,12 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 22, - }, - end: Position { - line: 180, - column: 23, - }, + semi2: Semicolon( + Position { + line: 180, + column: 22, }, - }, + ), update: Some( Lit( Number( @@ -28627,33 +20687,19 @@ Mod( ), ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 180, - column: 24, - }, - end: Position { - line: 180, - column: 25, - }, + close_paren: CloseParen( + Position { + line: 180, + column: 24, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 25, - }, - end: Position { - line: 180, - column: 26, - }, + Semicolon( + Position { + line: 180, + column: 25, }, - }, + ), ), }, ), @@ -28661,65 +20707,37 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 180, - column: 27, - }, - end: Position { - line: 180, - column: 30, - }, + keyword: For( + Position { + line: 180, + column: 27, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 180, - column: 30, - }, - end: Position { - line: 180, - column: 31, - }, + ), + open_paren: OpenParen( + Position { + line: 180, + column: 30, }, - }, + ), init: Some( Expr( Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 180, - column: 31, - }, - end: Position { - line: 180, - column: 32, - }, + open_paren: OpenParen( + Position { + line: 180, + column: 31, }, - }, + ), expr: Binary( BinaryExpr { operator: In( - Slice { - source: "in", - loc: SourceLocation { - start: Position { - line: 180, - column: 34, - }, - end: Position { - line: 180, - column: 36, - }, + In( + Position { + line: 180, + column: 34, }, - }, + ), ), left: Lit( Number( @@ -28740,67 +20758,39 @@ Mod( ), right: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 180, - column: 36, - }, - end: Position { - line: 180, - column: 37, - }, + open_bracket: OpenBracket( + Position { + line: 180, + column: 36, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 180, - column: 37, - }, - end: Position { - line: 180, - column: 38, - }, + close_bracket: CloseBracket( + Position { + line: 180, + column: 37, }, - }, + ), }, ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 180, - column: 38, - }, - end: Position { - line: 180, - column: 39, - }, + close_paren: CloseParen( + Position { + line: 180, + column: 38, }, - }, + ), }, ), ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 39, - }, - end: Position { - line: 180, - column: 40, - }, + semi1: Semicolon( + Position { + line: 180, + column: 39, }, - }, + ), test: Some( Lit( Number( @@ -28820,47 +20810,26 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 41, - }, - end: Position { - line: 180, - column: 42, - }, + semi2: Semicolon( + Position { + line: 180, + column: 41, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 180, - column: 42, - }, - end: Position { - line: 180, - column: 43, - }, + close_paren: CloseParen( + Position { + line: 180, + column: 42, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 180, - column: 43, - }, - end: Position { - line: 180, - column: 44, - }, + Semicolon( + Position { + line: 180, + column: 43, }, - }, + ), ), }, ), @@ -28868,49 +20837,28 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 181, - column: 1, - }, - end: Position { - line: 181, - column: 4, - }, + keyword: For( + Position { + line: 181, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 181, - column: 4, - }, - end: Position { - line: 181, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 181, + column: 4, }, - }, + ), init: Some( Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 181, - column: 5, - }, - end: Position { - line: 181, - column: 8, - }, + Var( + Position { + line: 181, + column: 5, }, - }, + ), ), ), [ @@ -28941,76 +20889,41 @@ Mod( ], ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 11, - }, - end: Position { - line: 181, - column: 12, - }, + semi1: Semicolon( + Position { + line: 181, + column: 11, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 12, - }, - end: Position { - line: 181, - column: 13, - }, + semi2: Semicolon( + Position { + line: 181, + column: 12, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 181, - column: 13, - }, - end: Position { - line: 181, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 181, + column: 13, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 181, - column: 14, - }, - end: Position { - line: 181, - column: 19, - }, + keyword: Break( + Position { + line: 181, + column: 14, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 19, - }, - end: Position { - line: 181, - column: 20, - }, + Semicolon( + Position { + line: 181, + column: 19, }, - }, + ), ), }, }, @@ -29019,49 +20932,28 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 181, - column: 21, - }, - end: Position { - line: 181, - column: 24, - }, + keyword: For( + Position { + line: 181, + column: 21, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 181, - column: 24, - }, - end: Position { - line: 181, - column: 25, - }, + ), + open_paren: OpenParen( + Position { + line: 181, + column: 24, }, - }, + ), init: Some( Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 181, - column: 25, - }, - end: Position { - line: 181, - column: 28, - }, + Var( + Position { + line: 181, + column: 25, }, - }, + ), ), ), [ @@ -29088,19 +20980,12 @@ Mod( init: None, }, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 181, - column: 31, - }, - end: Position { - line: 181, - column: 32, - }, + Comma( + Position { + line: 181, + column: 31, }, - }, + ), ), }, ListEntry { @@ -29130,19 +21015,12 @@ Mod( ], ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 34, - }, - end: Position { - line: 181, - column: 35, - }, + semi1: Semicolon( + Position { + line: 181, + column: 34, }, - }, + ), test: Some( Lit( Number( @@ -29162,19 +21040,12 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 36, - }, - end: Position { - line: 181, - column: 37, - }, + semi2: Semicolon( + Position { + line: 181, + column: 36, }, - }, + ), update: Some( Lit( Number( @@ -29194,33 +21065,19 @@ Mod( ), ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 181, - column: 38, - }, - end: Position { - line: 181, - column: 39, - }, + close_paren: CloseParen( + Position { + line: 181, + column: 38, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 181, - column: 39, - }, - end: Position { - line: 181, - column: 40, - }, + Semicolon( + Position { + line: 181, + column: 39, }, - }, + ), ), }, ), @@ -29228,49 +21085,28 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 182, - column: 1, - }, - end: Position { - line: 182, - column: 4, - }, + keyword: For( + Position { + line: 182, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 182, - column: 4, - }, - end: Position { - line: 182, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 182, + column: 4, }, - }, + ), init: Some( Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 182, - column: 5, - }, - end: Position { - line: 182, - column: 8, - }, + Var( + Position { + line: 182, + column: 5, }, - }, + ), ), ), [ @@ -29294,19 +21130,12 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 182, - column: 11, - }, - end: Position { - line: 182, - column: 12, - }, + Equal( + Position { + line: 182, + column: 11, }, - }, + ), ), init: Some( Lit( @@ -29333,76 +21162,41 @@ Mod( ], ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 13, - }, - end: Position { - line: 182, - column: 14, - }, + semi1: Semicolon( + Position { + line: 182, + column: 13, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 14, - }, - end: Position { - line: 182, - column: 15, - }, + semi2: Semicolon( + Position { + line: 182, + column: 14, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 182, - column: 15, - }, - end: Position { - line: 182, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 182, + column: 15, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 182, - column: 16, - }, - end: Position { - line: 182, - column: 21, - }, + keyword: Break( + Position { + line: 182, + column: 16, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 21, - }, - end: Position { - line: 182, - column: 22, - }, + Semicolon( + Position { + line: 182, + column: 21, }, - }, + ), ), }, }, @@ -29411,49 +21205,28 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 182, - column: 23, - }, - end: Position { - line: 182, - column: 26, - }, + keyword: For( + Position { + line: 182, + column: 23, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 182, - column: 26, - }, - end: Position { - line: 182, - column: 27, - }, + ), + open_paren: OpenParen( + Position { + line: 182, + column: 26, }, - }, + ), init: Some( Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 182, - column: 27, - }, - end: Position { - line: 182, - column: 30, - }, + Var( + Position { + line: 182, + column: 27, }, - }, + ), ), ), [ @@ -29477,52 +21250,31 @@ Mod( }, ), eq: Some( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 182, - column: 33, - }, - end: Position { - line: 182, - column: 34, - }, + Equal( + Position { + line: 182, + column: 33, }, - }, + ), ), init: Some( Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 182, - column: 34, - }, - end: Position { - line: 182, - column: 35, - }, + open_paren: OpenParen( + Position { + line: 182, + column: 34, }, - }, + ), expr: Binary( BinaryExpr { operator: In( - Slice { - source: "in", - loc: SourceLocation { - start: Position { - line: 182, - column: 37, - }, - end: Position { - line: 182, - column: 39, - }, + In( + Position { + line: 182, + column: 37, }, - }, + ), ), left: Lit( Number( @@ -29543,50 +21295,29 @@ Mod( ), right: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 182, - column: 39, - }, - end: Position { - line: 182, - column: 40, - }, + open_bracket: OpenBracket( + Position { + line: 182, + column: 39, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 182, - column: 40, - }, - end: Position { - line: 182, - column: 41, - }, + close_bracket: CloseBracket( + Position { + line: 182, + column: 40, }, - }, + ), }, ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 182, - column: 41, - }, - end: Position { - line: 182, - column: 42, - }, + close_paren: CloseParen( + Position { + line: 182, + column: 41, }, - }, + ), }, ), ), @@ -29596,19 +21327,12 @@ Mod( ], ), ), - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 42, - }, - end: Position { - line: 182, - column: 43, - }, + semi1: Semicolon( + Position { + line: 182, + column: 42, }, - }, + ), test: Some( Lit( Number( @@ -29628,47 +21352,26 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 44, - }, - end: Position { - line: 182, - column: 45, - }, + semi2: Semicolon( + Position { + line: 182, + column: 44, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 182, - column: 45, - }, - end: Position { - line: 182, - column: 46, - }, + close_paren: CloseParen( + Position { + line: 182, + column: 45, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 182, - column: 46, - }, - end: Position { - line: 182, - column: 47, - }, + Semicolon( + Position { + line: 182, + column: 46, }, - }, + ), ), }, ), @@ -29676,32 +21379,18 @@ Mod( Stmt( ForIn( ForInStmt { - keyword_for: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 183, - column: 1, - }, - end: Position { - line: 183, - column: 4, - }, + keyword_for: For( + Position { + line: 183, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 183, - column: 4, - }, - end: Position { - line: 183, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 183, + column: 4, }, - }, + ), left: Expr( Ident( Ident { @@ -29721,77 +21410,42 @@ Mod( }, ), ), - keyword_in: Slice { - source: "in", - loc: SourceLocation { - start: Position { - line: 183, - column: 7, - }, - end: Position { - line: 183, - column: 9, - }, + keyword_in: In( + Position { + line: 183, + column: 7, }, - }, + ), right: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 183, - column: 9, - }, - end: Position { - line: 183, - column: 10, - }, + open_brace: OpenBrace( + Position { + line: 183, + column: 9, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 183, - column: 10, - }, - end: Position { - line: 183, - column: 11, - }, + close_brace: CloseBrace( + Position { + line: 183, + column: 10, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 183, - column: 11, - }, - end: Position { - line: 183, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 183, + column: 11, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 183, - column: 12, - }, - end: Position { - line: 183, - column: 13, - }, + Semicolon( + Position { + line: 183, + column: 12, }, - }, + ), ), }, ), @@ -29799,48 +21453,27 @@ Mod( Stmt( ForIn( ForInStmt { - keyword_for: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 183, - column: 14, - }, - end: Position { - line: 183, - column: 17, - }, + keyword_for: For( + Position { + line: 183, + column: 14, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 183, - column: 17, - }, - end: Position { - line: 183, - column: 18, - }, + ), + open_paren: OpenParen( + Position { + line: 183, + column: 17, }, - }, + ), left: Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 183, - column: 18, - }, - end: Position { - line: 183, - column: 21, - }, + Var( + Position { + line: 183, + column: 18, }, - }, + ), ), ), VarDecl { @@ -29865,77 +21498,42 @@ Mod( init: None, }, ), - keyword_in: Slice { - source: "in", - loc: SourceLocation { - start: Position { - line: 183, - column: 26, - }, - end: Position { - line: 183, - column: 28, - }, + keyword_in: In( + Position { + line: 183, + column: 26, }, - }, + ), right: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 183, - column: 28, - }, - end: Position { - line: 183, - column: 29, - }, + open_brace: OpenBrace( + Position { + line: 183, + column: 28, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 183, - column: 29, - }, - end: Position { - line: 183, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 183, + column: 29, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 183, - column: 30, - }, - end: Position { - line: 183, - column: 31, - }, + close_paren: CloseParen( + Position { + line: 183, + column: 30, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 183, - column: 31, - }, - end: Position { - line: 183, - column: 32, - }, + Semicolon( + Position { + line: 183, + column: 31, }, - }, + ), ), }, ), @@ -29943,32 +21541,18 @@ Mod( Stmt( ForOf( ForOfStmt { - keyword_for: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 184, - column: 1, - }, - end: Position { - line: 184, - column: 4, - }, + keyword_for: For( + Position { + line: 184, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 184, - column: 4, - }, - end: Position { - line: 184, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 184, + column: 4, }, - }, + ), left: Expr( Ident( Ident { @@ -29988,77 +21572,42 @@ Mod( }, ), ), - keyword_of: Slice { - source: "of", - loc: SourceLocation { - start: Position { - line: 184, - column: 7, - }, - end: Position { - line: 184, - column: 9, - }, + keyword_of: Of( + Position { + line: 184, + column: 7, }, - }, + ), right: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 184, - column: 9, - }, - end: Position { - line: 184, - column: 10, - }, + open_bracket: OpenBracket( + Position { + line: 184, + column: 9, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 184, - column: 10, - }, - end: Position { - line: 184, - column: 11, - }, + close_bracket: CloseBracket( + Position { + line: 184, + column: 10, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 184, - column: 11, - }, - end: Position { - line: 184, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 184, + column: 11, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 184, - column: 12, - }, - end: Position { - line: 184, - column: 13, - }, + Semicolon( + Position { + line: 184, + column: 12, }, - }, + ), ), is_await: false, }, @@ -30067,48 +21616,27 @@ Mod( Stmt( ForOf( ForOfStmt { - keyword_for: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 184, - column: 14, - }, - end: Position { - line: 184, - column: 17, - }, + keyword_for: For( + Position { + line: 184, + column: 14, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 184, - column: 17, - }, - end: Position { - line: 184, - column: 18, - }, + ), + open_paren: OpenParen( + Position { + line: 184, + column: 17, }, - }, + ), left: Variable( Var( Some( - Slice { - source: "var", - loc: SourceLocation { - start: Position { - line: 184, - column: 18, - }, - end: Position { - line: 184, - column: 21, - }, + Var( + Position { + line: 184, + column: 18, }, - }, + ), ), ), VarDecl { @@ -30133,77 +21661,42 @@ Mod( init: None, }, ), - keyword_of: Slice { - source: "of", - loc: SourceLocation { - start: Position { - line: 184, - column: 26, - }, - end: Position { - line: 184, - column: 28, - }, + keyword_of: Of( + Position { + line: 184, + column: 26, }, - }, + ), right: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 184, - column: 28, - }, - end: Position { - line: 184, - column: 29, - }, + open_bracket: OpenBracket( + Position { + line: 184, + column: 28, }, - }, + ), elements: [], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 184, - column: 29, - }, - end: Position { - line: 184, - column: 30, - }, + close_bracket: CloseBracket( + Position { + line: 184, + column: 29, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 184, - column: 30, - }, - end: Position { - line: 184, - column: 31, - }, + close_paren: CloseParen( + Position { + line: 184, + column: 30, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 184, - column: 31, - }, - end: Position { - line: 184, - column: 32, - }, + Semicolon( + Position { + line: 184, + column: 31, }, - }, + ), ), is_await: false, }, @@ -30212,46 +21705,25 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 186, - column: 1, - }, - end: Position { - line: 186, - column: 4, - }, + keyword: For( + Position { + line: 186, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 186, - column: 4, - }, - end: Position { - line: 186, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 186, + column: 4, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 5, - }, - end: Position { - line: 186, - column: 6, - }, + semi1: Semicolon( + Position { + line: 186, + column: 5, }, - }, + ), test: Some( Lit( Number( @@ -30271,62 +21743,34 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 7, - }, - end: Position { - line: 186, - column: 8, - }, + semi2: Semicolon( + Position { + line: 186, + column: 7, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 186, - column: 8, - }, - end: Position { - line: 186, - column: 9, - }, + close_paren: CloseParen( + Position { + line: 186, + column: 8, }, - }, + ), body: Continue { - keyword: Slice { - source: "continue", - loc: SourceLocation { - start: Position { - line: 186, - column: 9, - }, - end: Position { - line: 186, - column: 17, - }, + keyword: Continue( + Position { + line: 186, + column: 9, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 17, - }, - end: Position { - line: 186, - column: 18, - }, + Semicolon( + Position { + line: 186, + column: 17, }, - }, + ), ), }, }, @@ -30350,61 +21794,33 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 186, - column: 20, - }, - end: Position { - line: 186, - column: 21, - }, + colon: Colon( + Position { + line: 186, + column: 20, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 186, - column: 21, - }, - end: Position { - line: 186, - column: 24, - }, + keyword: For( + Position { + line: 186, + column: 21, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 186, - column: 24, - }, - end: Position { - line: 186, - column: 25, - }, + ), + open_paren: OpenParen( + Position { + line: 186, + column: 24, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 25, - }, - end: Position { - line: 186, - column: 26, - }, + semi1: Semicolon( + Position { + line: 186, + column: 25, }, - }, + ), test: Some( Lit( Number( @@ -30424,47 +21840,26 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 27, - }, - end: Position { - line: 186, - column: 28, - }, + semi2: Semicolon( + Position { + line: 186, + column: 27, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 186, - column: 28, - }, - end: Position { - line: 186, - column: 29, - }, + close_paren: CloseParen( + Position { + line: 186, + column: 28, }, - }, + ), body: Continue { - keyword: Slice { - source: "continue", - loc: SourceLocation { - start: Position { - line: 186, - column: 29, - }, - end: Position { - line: 186, - column: 37, - }, + keyword: Continue( + Position { + line: 186, + column: 29, }, - }, + ), label: Some( Ident { slice: Slice { @@ -30483,19 +21878,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 186, - column: 39, - }, - end: Position { - line: 186, - column: 40, - }, + Semicolon( + Position { + line: 186, + column: 39, }, - }, + ), ), }, }, @@ -30506,103 +21894,54 @@ Mod( Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 188, - column: 1, - }, - end: Position { - line: 188, - column: 4, - }, + keyword: For( + Position { + line: 188, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 188, - column: 4, - }, - end: Position { - line: 188, - column: 5, - }, + ), + open_paren: OpenParen( + Position { + line: 188, + column: 4, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 5, - }, - end: Position { - line: 188, - column: 6, - }, + semi1: Semicolon( + Position { + line: 188, + column: 5, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 6, - }, - end: Position { - line: 188, - column: 7, - }, + semi2: Semicolon( + Position { + line: 188, + column: 6, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 188, - column: 7, - }, - end: Position { - line: 188, - column: 8, - }, + close_paren: CloseParen( + Position { + line: 188, + column: 7, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 188, - column: 8, - }, - end: Position { - line: 188, - column: 13, - }, + keyword: Break( + Position { + line: 188, + column: 8, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 13, - }, - end: Position { - line: 188, - column: 14, - }, + Semicolon( + Position { + line: 188, + column: 13, }, - }, + ), ), }, }, @@ -30626,103 +21965,54 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 188, - column: 16, - }, - end: Position { - line: 188, - column: 17, - }, + colon: Colon( + Position { + line: 188, + column: 16, }, - }, + ), body: For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 188, - column: 17, - }, - end: Position { - line: 188, - column: 20, - }, + keyword: For( + Position { + line: 188, + column: 17, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 188, - column: 20, - }, - end: Position { - line: 188, - column: 21, - }, + ), + open_paren: OpenParen( + Position { + line: 188, + column: 20, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 21, - }, - end: Position { - line: 188, - column: 22, - }, + semi1: Semicolon( + Position { + line: 188, + column: 21, }, - }, + ), test: None, - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 22, - }, - end: Position { - line: 188, - column: 23, - }, + semi2: Semicolon( + Position { + line: 188, + column: 22, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 188, - column: 23, - }, - end: Position { - line: 188, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 188, + column: 23, }, - }, + ), body: Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 188, - column: 24, - }, - end: Position { - line: 188, - column: 29, - }, + keyword: Break( + Position { + line: 188, + column: 24, }, - }, + ), label: Some( Ident { slice: Slice { @@ -30741,19 +22031,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 188, - column: 31, - }, - end: Position { - line: 188, - column: 32, - }, + Semicolon( + Position { + line: 188, + column: 31, }, - }, + ), ), }, }, @@ -30764,32 +22047,18 @@ Mod( Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 189, - column: 1, - }, - end: Position { - line: 189, - column: 7, - }, + keyword: Switch( + Position { + line: 189, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 189, - column: 7, - }, - end: Position { - line: 189, - column: 8, - }, + ), + open_paren: OpenParen( + Position { + line: 189, + column: 7, }, - }, + ), discriminant: Lit( Number( Slice { @@ -30807,47 +22076,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 189, - column: 9, - }, - end: Position { - line: 189, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 189, + column: 9, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 189, - column: 10, - }, - end: Position { - line: 189, - column: 11, - }, + ), + open_brace: OpenBrace( + Position { + line: 189, + column: 10, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 189, column: 11, }, - end: Position { - line: 189, - column: 15, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -30867,88 +22117,53 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 189, - column: 17, - }, - end: Position { - line: 189, - column: 18, - }, + colon: Colon( + Position { + line: 189, + column: 17, }, - }, + ), consequent: [ Stmt( Break { - keyword: Slice { - source: "break", - loc: SourceLocation { - start: Position { - line: 189, - column: 18, - }, - end: Position { - line: 189, - column: 23, - }, + keyword: Break( + Position { + line: 189, + column: 18, }, - }, + ), label: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 189, - column: 23, - }, - end: Position { - line: 189, - column: 24, - }, + Semicolon( + Position { + line: 189, + column: 23, }, - }, + ), ), }, ), ], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 189, - column: 24, - }, - end: Position { - line: 189, - column: 25, - }, + close_brace: CloseBrace( + Position { + line: 189, + column: 24, }, - }, + ), }, ), ), Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 191, - column: 1, - }, - end: Position { - line: 191, - column: 9, - }, + keyword: Function( + Position { + line: 191, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -30966,95 +22181,53 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 191, - column: 12, - }, - end: Position { - line: 191, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 191, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 191, - column: 13, - }, - end: Position { - line: 191, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 191, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 191, - column: 14, - }, - end: Position { - line: 191, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 191, + column: 14, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 191, - column: 16, - }, - end: Position { - line: 191, - column: 22, - }, + keyword: Return( + Position { + line: 191, + column: 16, }, - }, + ), value: None, semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 191, - column: 22, - }, - end: Position { - line: 191, - column: 23, - }, + Semicolon( + Position { + line: 191, + column: 22, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 191, - column: 24, - }, - end: Position { - line: 191, - column: 25, - }, + close_brace: CloseBrace( + Position { + line: 191, + column: 24, }, - }, + ), }, star: None, keyword_async: None, @@ -31064,19 +22237,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 192, - column: 1, - }, - end: Position { - line: 192, - column: 9, - }, + keyword: Function( + Position { + line: 192, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -31094,63 +22260,35 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 192, - column: 12, - }, - end: Position { - line: 192, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 192, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 192, - column: 13, - }, - end: Position { - line: 192, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 192, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 192, - column: 14, - }, - end: Position { - line: 192, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 192, + column: 14, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 192, - column: 16, - }, - end: Position { - line: 192, - column: 22, - }, + keyword: Return( + Position { + line: 192, + column: 16, }, - }, + ), value: Some( Lit( Number( @@ -31171,36 +22309,22 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 192, - column: 24, - }, - end: Position { - line: 192, - column: 25, - }, + Semicolon( + Position { + line: 192, + column: 24, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 192, - column: 26, - }, - end: Position { - line: 192, - column: 27, - }, + close_brace: CloseBrace( + Position { + line: 192, + column: 26, }, - }, + ), }, star: None, keyword_async: None, @@ -31210,32 +22334,18 @@ Mod( Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 194, - column: 1, - }, - end: Position { - line: 194, - column: 7, - }, + keyword: Switch( + Position { + line: 194, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 194, - column: 7, - }, - end: Position { - line: 194, - column: 8, - }, + ), + open_paren: OpenParen( + Position { + line: 194, + column: 7, }, - }, + ), discriminant: Lit( Number( Slice { @@ -31253,78 +22363,43 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 194, - column: 9, - }, - end: Position { - line: 194, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 194, + column: 9, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 194, - column: 10, - }, - end: Position { - line: 194, - column: 11, - }, + ), + open_brace: OpenBrace( + Position { + line: 194, + column: 10, }, - }, + ), cases: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 194, - column: 11, - }, - end: Position { - line: 194, - column: 12, - }, + close_brace: CloseBrace( + Position { + line: 194, + column: 11, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 194, - column: 13, - }, - end: Position { - line: 194, - column: 19, - }, + keyword: Switch( + Position { + line: 194, + column: 13, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 194, - column: 19, - }, - end: Position { - line: 194, - column: 20, - }, + ), + open_paren: OpenParen( + Position { + line: 194, + column: 19, }, - }, + ), discriminant: Lit( Number( Slice { @@ -31342,47 +22417,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 194, - column: 21, - }, - end: Position { - line: 194, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 194, + column: 21, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 194, - column: 22, - }, - end: Position { - line: 194, - column: 23, - }, + ), + open_brace: OpenBrace( + Position { + line: 194, + column: 22, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 194, column: 23, }, - end: Position { - line: 194, - column: 27, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -31402,67 +22458,39 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 194, - column: 29, - }, - end: Position { - line: 194, - column: 30, - }, + colon: Colon( + Position { + line: 194, + column: 29, }, - }, + ), consequent: [], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 194, - column: 30, - }, - end: Position { - line: 194, - column: 31, - }, + close_brace: CloseBrace( + Position { + line: 194, + column: 30, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 194, - column: 32, - }, - end: Position { - line: 194, - column: 38, - }, + keyword: Switch( + Position { + line: 194, + column: 32, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 194, - column: 38, - }, - end: Position { - line: 194, - column: 39, - }, + ), + open_paren: OpenParen( + Position { + line: 194, + column: 38, }, - }, + ), discriminant: Lit( Number( Slice { @@ -31480,47 +22508,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 194, - column: 40, - }, - end: Position { - line: 194, - column: 41, - }, + close_paren: CloseParen( + Position { + line: 194, + column: 40, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 194, - column: 41, - }, - end: Position { - line: 194, - column: 42, - }, + ), + open_brace: OpenBrace( + Position { + line: 194, + column: 41, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 194, column: 42, }, - end: Position { - line: 194, - column: 46, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -31540,35 +22549,23 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 194, - column: 48, - }, - end: Position { - line: 194, - column: 49, - }, + colon: Colon( + Position { + line: 194, + column: 48, }, - }, + ), consequent: [], }, SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 194, column: 49, }, - end: Position { - line: 194, - column: 53, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -31588,67 +22585,39 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 194, - column: 55, - }, - end: Position { - line: 194, - column: 56, - }, + colon: Colon( + Position { + line: 194, + column: 55, }, - }, + ), consequent: [], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 194, - column: 56, - }, - end: Position { - line: 194, - column: 57, - }, + close_brace: CloseBrace( + Position { + line: 194, + column: 56, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 195, - column: 1, - }, - end: Position { - line: 195, - column: 7, - }, + keyword: Switch( + Position { + line: 195, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 195, - column: 7, - }, - end: Position { - line: 195, - column: 8, - }, + ), + open_paren: OpenParen( + Position { + line: 195, + column: 7, }, - }, + ), discriminant: Lit( Number( Slice { @@ -31666,109 +22635,62 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 195, - column: 9, - }, - end: Position { - line: 195, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 195, + column: 9, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 195, - column: 10, - }, - end: Position { - line: 195, - column: 11, - }, + ), + open_brace: OpenBrace( + Position { + line: 195, + column: 10, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "default", - loc: SourceLocation { - start: Position { + keyword: Default( + Default( + Position { line: 195, column: 11, }, - end: Position { - line: 195, - column: 18, - }, - }, - }, + ), + ), test: None, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 195, - column: 18, - }, - end: Position { - line: 195, - column: 19, - }, + colon: Colon( + Position { + line: 195, + column: 18, }, - }, + ), consequent: [], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 195, - column: 19, - }, - end: Position { - line: 195, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 195, + column: 19, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 195, - column: 21, - }, - end: Position { - line: 195, - column: 27, - }, + keyword: Switch( + Position { + line: 195, + column: 21, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 195, - column: 27, - }, - end: Position { - line: 195, - column: 28, - }, + ), + open_paren: OpenParen( + Position { + line: 195, + column: 27, }, - }, + ), discriminant: Lit( Number( Slice { @@ -31786,47 +22708,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 195, - column: 29, - }, - end: Position { - line: 195, - column: 30, - }, + close_paren: CloseParen( + Position { + line: 195, + column: 29, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 195, - column: 30, - }, - end: Position { - line: 195, - column: 31, - }, + ), + open_brace: OpenBrace( + Position { + line: 195, + column: 30, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 195, column: 31, }, - end: Position { - line: 195, - column: 35, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -31846,65 +22749,41 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 195, - column: 37, - }, - end: Position { - line: 195, - column: 38, - }, + colon: Colon( + Position { + line: 195, + column: 37, }, - }, + ), consequent: [], }, SwitchCase { - keyword: Slice { - source: "default", - loc: SourceLocation { - start: Position { + keyword: Default( + Default( + Position { line: 195, column: 38, }, - end: Position { - line: 195, - column: 45, - }, - }, - }, + ), + ), test: None, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 195, - column: 45, - }, - end: Position { - line: 195, - column: 46, - }, + colon: Colon( + Position { + line: 195, + column: 45, }, - }, + ), consequent: [], }, SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 195, column: 46, }, - end: Position { - line: 195, - column: 50, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -31924,67 +22803,39 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 195, - column: 52, - }, - end: Position { - line: 195, - column: 53, - }, + colon: Colon( + Position { + line: 195, + column: 52, }, - }, + ), consequent: [], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 195, - column: 53, - }, - end: Position { - line: 195, - column: 54, - }, + close_brace: CloseBrace( + Position { + line: 195, + column: 53, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 196, - column: 1, - }, - end: Position { - line: 196, - column: 7, - }, + keyword: Switch( + Position { + line: 196, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 196, - column: 7, - }, - end: Position { - line: 196, - column: 8, - }, + ), + open_paren: OpenParen( + Position { + line: 196, + column: 7, }, - }, + ), discriminant: Lit( Number( Slice { @@ -32002,47 +22853,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 196, - column: 9, - }, - end: Position { - line: 196, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 196, + column: 9, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 196, - column: 10, - }, - end: Position { - line: 196, - column: 11, - }, + ), + open_brace: OpenBrace( + Position { + line: 196, + column: 10, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 196, column: 11, }, - end: Position { - line: 196, - column: 15, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -32062,85 +22894,50 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 196, - column: 17, - }, - end: Position { - line: 196, - column: 18, - }, + colon: Colon( + Position { + line: 196, + column: 17, }, - }, + ), consequent: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 196, - column: 18, - }, - end: Position { - line: 196, - column: 19, - }, + Semicolon( + Position { + line: 196, + column: 18, }, - }, + ), ), ), ], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 196, - column: 19, - }, - end: Position { - line: 196, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 196, + column: 19, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 196, - column: 21, - }, - end: Position { - line: 196, - column: 27, - }, + keyword: Switch( + Position { + line: 196, + column: 21, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 196, - column: 27, - }, - end: Position { - line: 196, - column: 28, - }, + ), + open_paren: OpenParen( + Position { + line: 196, + column: 27, }, - }, + ), discriminant: Lit( Number( Slice { @@ -32158,47 +22955,28 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 196, - column: 29, - }, - end: Position { - line: 196, - column: 30, - }, + close_paren: CloseParen( + Position { + line: 196, + column: 29, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 196, - column: 30, - }, - end: Position { - line: 196, - column: 31, - }, + ), + open_brace: OpenBrace( + Position { + line: 196, + column: 30, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "case", - loc: SourceLocation { - start: Position { + keyword: Case( + Case( + Position { line: 196, column: 31, }, - end: Position { - line: 196, - column: 35, - }, - }, - }, + ), + ), test: Some( Lit( Number( @@ -32218,102 +22996,60 @@ Mod( ), ), ), - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 196, - column: 37, - }, - end: Position { - line: 196, - column: 38, - }, + colon: Colon( + Position { + line: 196, + column: 37, }, - }, + ), consequent: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 196, - column: 38, - }, - end: Position { - line: 196, - column: 39, - }, + Semicolon( + Position { + line: 196, + column: 38, }, - }, + ), ), ), Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 196, - column: 39, - }, - end: Position { - line: 196, - column: 40, - }, + Semicolon( + Position { + line: 196, + column: 39, }, - }, + ), ), ), ], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 196, - column: 40, - }, - end: Position { - line: 196, - column: 41, - }, + close_brace: CloseBrace( + Position { + line: 196, + column: 40, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 197, - column: 1, - }, - end: Position { - line: 197, - column: 7, - }, + keyword: Switch( + Position { + line: 197, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 197, - column: 7, - }, - end: Position { - line: 197, - column: 8, - }, + ), + open_paren: OpenParen( + Position { + line: 197, + column: 7, }, - }, + ), discriminant: Lit( Number( Slice { @@ -32331,127 +23067,73 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 197, - column: 9, - }, - end: Position { - line: 197, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 197, + column: 9, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 197, - column: 10, - }, - end: Position { - line: 197, - column: 11, - }, + ), + open_brace: OpenBrace( + Position { + line: 197, + column: 10, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "default", - loc: SourceLocation { - start: Position { + keyword: Default( + Default( + Position { line: 197, column: 11, }, - end: Position { - line: 197, - column: 18, - }, - }, - }, + ), + ), test: None, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 197, - column: 18, - }, - end: Position { - line: 197, - column: 19, - }, + colon: Colon( + Position { + line: 197, + column: 18, }, - }, + ), consequent: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 197, - column: 19, - }, - end: Position { - line: 197, - column: 20, - }, + Semicolon( + Position { + line: 197, + column: 19, }, - }, + ), ), ), ], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 197, - column: 20, - }, - end: Position { - line: 197, - column: 21, - }, + close_brace: CloseBrace( + Position { + line: 197, + column: 20, }, - }, + ), }, ), ), Stmt( Switch( SwitchStmt { - keyword: Slice { - source: "switch", - loc: SourceLocation { - start: Position { - line: 197, - column: 22, - }, - end: Position { - line: 197, - column: 28, - }, + keyword: Switch( + Position { + line: 197, + column: 22, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 197, - column: 28, - }, - end: Position { - line: 197, - column: 29, - }, + ), + open_paren: OpenParen( + Position { + line: 197, + column: 28, }, - }, + ), discriminant: Lit( Number( Slice { @@ -32469,112 +23151,65 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 197, - column: 30, - }, - end: Position { - line: 197, - column: 31, - }, + close_paren: CloseParen( + Position { + line: 197, + column: 30, }, - }, - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 197, - column: 31, - }, - end: Position { - line: 197, - column: 32, - }, + ), + open_brace: OpenBrace( + Position { + line: 197, + column: 31, }, - }, + ), cases: [ SwitchCase { - keyword: Slice { - source: "default", - loc: SourceLocation { - start: Position { + keyword: Default( + Default( + Position { line: 197, column: 32, }, - end: Position { - line: 197, - column: 39, - }, - }, - }, + ), + ), test: None, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 197, - column: 39, - }, - end: Position { - line: 197, - column: 40, - }, + colon: Colon( + Position { + line: 197, + column: 39, }, - }, + ), consequent: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 197, - column: 40, - }, - end: Position { - line: 197, - column: 41, - }, + Semicolon( + Position { + line: 197, + column: 40, }, - }, + ), ), ), Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 197, - column: 41, - }, - end: Position { - line: 197, - column: 42, - }, + Semicolon( + Position { + line: 197, + column: 41, }, - }, + ), ), ), ], }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 197, - column: 42, - }, - end: Position { - line: 197, - column: 43, - }, + close_brace: CloseBrace( + Position { + line: 197, + column: 42, }, - }, + ), }, ), ), @@ -32596,33 +23231,19 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 199, - column: 2, - }, - end: Position { - line: 199, - column: 3, - }, + colon: Colon( + Position { + line: 199, + column: 2, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 199, - column: 3, - }, - end: Position { - line: 199, - column: 4, - }, + Semicolon( + Position { + line: 199, + column: 3, }, - }, + ), ), }, ), @@ -32645,19 +23266,12 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 199, - column: 6, - }, - end: Position { - line: 199, - column: 7, - }, + colon: Colon( + Position { + line: 199, + column: 6, }, - }, + ), body: Labeled( LabeledStmt { label: Ident { @@ -32675,33 +23289,19 @@ Mod( }, }, }, - colon: Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 199, - column: 8, - }, - end: Position { - line: 199, - column: 9, - }, + colon: Colon( + Position { + line: 199, + column: 8, }, - }, + ), body: Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 199, - column: 9, - }, - end: Position { - line: 199, - column: 10, - }, + Semicolon( + Position { + line: 199, + column: 9, }, - }, + ), ), }, ), @@ -32711,49 +23311,28 @@ Mod( Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 201, - column: 1, - }, - end: Position { - line: 201, - column: 4, - }, + keyword: Try( + Position { + line: 201, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 201, - column: 5, - }, - end: Position { - line: 201, - column: 6, - }, + open_brace: OpenBrace( + Position { + line: 201, + column: 5, }, - }, + ), stmts: [ Stmt( Throw { - keyword: Slice { - source: "throw", - loc: SourceLocation { - start: Position { - line: 201, - column: 7, - }, - end: Position { - line: 201, - column: 12, - }, + keyword: Throw( + Position { + line: 201, + column: 7, }, - }, + ), expr: Lit( Number( Slice { @@ -32772,67 +23351,39 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 201, - column: 14, - }, - end: Position { - line: 201, - column: 15, - }, + Semicolon( + Position { + line: 201, + column: 14, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 201, - column: 16, - }, - end: Position { - line: 201, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 201, + column: 16, }, - }, + ), }, handler: Some( CatchClause { - keyword: Slice { - source: "catch", - loc: SourceLocation { - start: Position { - line: 201, - column: 17, - }, - end: Position { - line: 201, - column: 22, - }, + keyword: Catch( + Position { + line: 201, + column: 17, }, - }, + ), param: Some( CatchArg { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 201, - column: 22, - }, - end: Position { - line: 201, - column: 23, - }, + open_paren: OpenParen( + Position { + line: 201, + column: 22, }, - }, + ), param: Ident( Ident { slice: Slice { @@ -32850,49 +23401,28 @@ Mod( }, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 201, - column: 24, - }, - end: Position { - line: 201, - column: 25, - }, + close_paren: CloseParen( + Position { + line: 201, + column: 24, }, - }, + ), }, ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 201, - column: 25, - }, - end: Position { - line: 201, - column: 26, - }, + open_brace: OpenBrace( + Position { + line: 201, + column: 25, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 201, - column: 26, - }, - end: Position { - line: 201, - column: 27, - }, + close_brace: CloseBrace( + Position { + line: 201, + column: 26, }, - }, + ), }, }, ), @@ -32903,78 +23433,43 @@ Mod( Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 203, - column: 1, - }, - end: Position { - line: 203, - column: 4, - }, + keyword: Try( + Position { + line: 203, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 203, - column: 4, - }, - end: Position { - line: 203, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 203, + column: 4, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 203, - column: 5, - }, - end: Position { - line: 203, - column: 6, - }, + close_brace: CloseBrace( + Position { + line: 203, + column: 5, }, - }, + ), }, handler: Some( CatchClause { - keyword: Slice { - source: "catch", - loc: SourceLocation { - start: Position { - line: 203, - column: 6, - }, - end: Position { - line: 203, - column: 11, - }, + keyword: Catch( + Position { + line: 203, + column: 6, }, - }, + ), param: Some( CatchArg { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 203, - column: 11, - }, - end: Position { - line: 203, - column: 12, - }, + open_paren: OpenParen( + Position { + line: 203, + column: 11, }, - }, + ), param: Ident( Ident { slice: Slice { @@ -32992,49 +23487,28 @@ Mod( }, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 203, - column: 13, - }, - end: Position { - line: 203, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 203, + column: 13, }, - }, + ), }, ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 203, - column: 14, - }, - end: Position { - line: 203, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 203, + column: 14, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 203, - column: 15, - }, - end: Position { - line: 203, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 203, + column: 15, }, - }, + ), }, }, ), @@ -33045,92 +23519,50 @@ Mod( Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 204, - column: 1, - }, - end: Position { - line: 204, - column: 4, - }, + keyword: Try( + Position { + line: 204, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 204, - column: 4, - }, - end: Position { - line: 204, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 204, + column: 4, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 204, - column: 5, - }, - end: Position { - line: 204, - column: 6, - }, + close_brace: CloseBrace( + Position { + line: 204, + column: 5, }, - }, + ), }, handler: None, finalizer: Some( FinallyClause { - keyword: Slice { - source: "finally", - loc: SourceLocation { - start: Position { - line: 204, - column: 6, - }, - end: Position { - line: 204, - column: 13, - }, + keyword: Finally( + Position { + line: 204, + column: 6, }, - }, + ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 204, - column: 13, - }, - end: Position { - line: 204, - column: 14, - }, + open_brace: OpenBrace( + Position { + line: 204, + column: 13, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 204, - column: 14, - }, - end: Position { - line: 204, - column: 15, - }, + close_brace: CloseBrace( + Position { + line: 204, + column: 14, }, - }, + ), }, }, ), @@ -33140,78 +23572,43 @@ Mod( Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 205, - column: 1, - }, - end: Position { - line: 205, - column: 4, - }, + keyword: Try( + Position { + line: 205, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 205, - column: 4, - }, - end: Position { - line: 205, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 205, + column: 4, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 205, - column: 5, - }, - end: Position { - line: 205, - column: 6, - }, + close_brace: CloseBrace( + Position { + line: 205, + column: 5, }, - }, + ), }, handler: Some( CatchClause { - keyword: Slice { - source: "catch", - loc: SourceLocation { - start: Position { - line: 205, - column: 6, - }, - end: Position { - line: 205, - column: 11, - }, + keyword: Catch( + Position { + line: 205, + column: 6, }, - }, + ), param: Some( CatchArg { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 205, - column: 11, - }, - end: Position { - line: 205, - column: 12, - }, + open_paren: OpenParen( + Position { + line: 205, + column: 11, }, - }, + ), param: Ident( Ident { slice: Slice { @@ -33229,95 +23626,53 @@ Mod( }, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 205, - column: 13, - }, - end: Position { - line: 205, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 205, + column: 13, }, - }, + ), }, ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 205, - column: 14, - }, - end: Position { - line: 205, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 205, + column: 14, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 205, - column: 15, - }, - end: Position { - line: 205, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 205, + column: 15, }, - }, + ), }, }, ), finalizer: Some( FinallyClause { - keyword: Slice { - source: "finally", - loc: SourceLocation { - start: Position { - line: 205, - column: 16, - }, - end: Position { - line: 205, - column: 23, - }, + keyword: Finally( + Position { + line: 205, + column: 16, }, - }, + ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 205, - column: 23, - }, - end: Position { - line: 205, - column: 24, - }, + open_brace: OpenBrace( + Position { + line: 205, + column: 23, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 205, - column: 24, - }, - end: Position { - line: 205, - column: 25, - }, + close_brace: CloseBrace( + Position { + line: 205, + column: 24, }, - }, + ), }, }, ), @@ -33326,52 +23681,31 @@ Mod( ), Stmt( Debugger { - keyword: Slice { - source: "debugger", - loc: SourceLocation { - start: Position { - line: 207, - column: 1, - }, - end: Position { - line: 207, - column: 9, - }, + keyword: Debugger( + Position { + line: 207, + column: 1, }, - }, + ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 207, - column: 9, - }, - end: Position { - line: 207, - column: 10, - }, + Semicolon( + Position { + line: 207, + column: 9, }, - }, + ), ), }, ), Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 209, - column: 1, - }, - end: Position { - line: 209, - column: 9, - }, + keyword: Function( + Position { + line: 209, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33383,67 +23717,39 @@ Mod( }, end: Position { line: 209, - column: 12, - }, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 209, - column: 12, - }, - end: Position { - line: 209, - column: 13, - }, - }, - }, - params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 209, - column: 13, - }, - end: Position { - line: 209, - column: 14, - }, - }, - }, - body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 209, - column: 14, - }, - end: Position { - line: 209, - column: 15, + column: 12, + }, }, }, }, + ), + open_paren: OpenParen( + Position { + line: 209, + column: 12, + }, + ), + params: [], + close_paren: CloseParen( + Position { + line: 209, + column: 13, + }, + ), + body: FuncBody { + open_brace: OpenBrace( + Position { + line: 209, + column: 14, + }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 209, - column: 15, - }, - end: Position { - line: 209, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 209, + column: 15, }, - }, + ), }, star: None, keyword_async: None, @@ -33453,19 +23759,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 210, - column: 1, - }, - end: Position { - line: 210, - column: 9, - }, + keyword: Function( + Position { + line: 210, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33483,19 +23782,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 210, - column: 12, - }, - end: Position { - line: 210, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 210, + column: 12, }, - }, + ), params: [ ListEntry { item: Pat( @@ -33520,47 +23812,26 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 210, - column: 14, - }, - end: Position { - line: 210, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 210, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 210, - column: 15, - }, - end: Position { - line: 210, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 210, + column: 15, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 210, - column: 16, - }, - end: Position { - line: 210, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 210, + column: 16, }, - }, + ), }, star: None, keyword_async: None, @@ -33570,19 +23841,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 211, - column: 1, - }, - end: Position { - line: 211, - column: 9, - }, + keyword: Function( + Position { + line: 211, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33600,19 +23864,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 211, - column: 12, - }, - end: Position { - line: 211, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 211, + column: 12, }, - }, + ), params: [ ListEntry { item: Pat( @@ -33635,19 +23892,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 211, - column: 14, - }, - end: Position { - line: 211, - column: 15, - }, + Comma( + Position { + line: 211, + column: 14, }, - }, + ), ), }, ListEntry { @@ -33673,47 +23923,26 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 211, - column: 16, - }, - end: Position { - line: 211, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 211, + column: 16, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 211, - column: 17, - }, - end: Position { - line: 211, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 211, + column: 17, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 211, - column: 18, - }, - end: Position { - line: 211, - column: 19, - }, + close_brace: CloseBrace( + Position { + line: 211, + column: 18, }, - }, + ), }, star: None, keyword_async: None, @@ -33723,19 +23952,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 212, - column: 1, - }, - end: Position { - line: 212, - column: 9, - }, + keyword: Function( + Position { + line: 212, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33753,64 +23975,36 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 212, - column: 12, - }, - end: Position { - line: 212, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 212, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 212, - column: 13, - }, - end: Position { - line: 212, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 212, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 212, - column: 14, - }, - end: Position { - line: 212, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 212, + column: 14, }, - }, + ), stmts: [ Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 212, - column: 16, - }, - end: Position { - line: 212, - column: 24, - }, + keyword: Function( + Position { + line: 212, + column: 16, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33828,61 +24022,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 212, - column: 27, - }, - end: Position { - line: 212, - column: 28, - }, + open_paren: OpenParen( + Position { + line: 212, + column: 27, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 212, - column: 28, - }, - end: Position { - line: 212, - column: 29, - }, + close_paren: CloseParen( + Position { + line: 212, + column: 28, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 212, - column: 29, - }, - end: Position { - line: 212, - column: 30, - }, + open_brace: OpenBrace( + Position { + line: 212, + column: 29, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 212, - column: 30, - }, - end: Position { - line: 212, - column: 31, - }, + close_brace: CloseBrace( + Position { + line: 212, + column: 30, }, - }, + ), }, star: None, keyword_async: None, @@ -33890,19 +24056,12 @@ Mod( ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 212, - column: 32, - }, - end: Position { - line: 212, - column: 33, - }, + close_brace: CloseBrace( + Position { + line: 212, + column: 32, }, - }, + ), }, star: None, keyword_async: None, @@ -33912,36 +24071,22 @@ Mod( Stmt( Block( BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 213, - column: 1, - }, - end: Position { - line: 213, - column: 2, - }, + open_brace: OpenBrace( + Position { + line: 213, + column: 1, }, - }, + ), stmts: [ Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 213, - column: 3, - }, - end: Position { - line: 213, - column: 11, - }, + keyword: Function( + Position { + line: 213, + column: 3, }, - }, + ), id: Some( Ident { slice: Slice { @@ -33959,61 +24104,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 213, - column: 14, - }, - end: Position { - line: 213, - column: 15, - }, + open_paren: OpenParen( + Position { + line: 213, + column: 14, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 213, - column: 15, - }, - end: Position { - line: 213, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 213, + column: 15, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 213, - column: 16, - }, - end: Position { - line: 213, - column: 17, - }, + open_brace: OpenBrace( + Position { + line: 213, + column: 16, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 213, - column: 17, - }, - end: Position { - line: 213, - column: 18, - }, + close_brace: CloseBrace( + Position { + line: 213, + column: 17, }, - }, + ), }, star: None, keyword_async: None, @@ -34021,82 +24138,47 @@ Mod( ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 213, - column: 19, - }, - end: Position { - line: 213, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 213, + column: 19, }, - }, + ), }, ), ), Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 213, - column: 20, - }, - end: Position { - line: 213, - column: 21, - }, + Semicolon( + Position { + line: 213, + column: 20, }, - }, + ), ), ), Stmt( For( ForStmt { - keyword: Slice { - source: "for", - loc: SourceLocation { - start: Position { - line: 214, - column: 1, - }, - end: Position { - line: 214, - column: 4, - }, + keyword: For( + Position { + line: 214, + column: 1, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 214, - column: 5, - }, - end: Position { - line: 214, - column: 6, - }, + ), + open_paren: OpenParen( + Position { + line: 214, + column: 5, }, - }, + ), init: None, - semi1: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 214, - column: 6, - }, - end: Position { - line: 214, - column: 7, - }, + semi1: Semicolon( + Position { + line: 214, + column: 6, }, - }, + ), test: Some( Lit( Number( @@ -34116,66 +24198,38 @@ Mod( ), ), ), - semi2: Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 214, - column: 8, - }, - end: Position { - line: 214, - column: 9, - }, + semi2: Semicolon( + Position { + line: 214, + column: 8, }, - }, + ), update: None, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 214, - column: 9, - }, - end: Position { - line: 214, - column: 10, - }, + close_paren: CloseParen( + Position { + line: 214, + column: 9, }, - }, + ), body: Expr { expr: Unary( UnaryExpr { operator: Plus( - Slice { - source: "+", - loc: SourceLocation { - start: Position { - line: 214, - column: 11, - }, - end: Position { - line: 214, - column: 12, - }, + Plus( + Position { + line: 214, + column: 11, }, - }, + ), ), argument: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 214, - column: 12, - }, - end: Position { - line: 214, - column: 20, - }, + keyword: Function( + Position { + line: 214, + column: 12, }, - }, + ), id: Some( Ident { slice: Slice { @@ -34193,61 +24247,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 214, - column: 23, - }, - end: Position { - line: 214, - column: 24, - }, + open_paren: OpenParen( + Position { + line: 214, + column: 23, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 214, - column: 24, - }, - end: Position { - line: 214, - column: 25, - }, + close_paren: CloseParen( + Position { + line: 214, + column: 24, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 214, - column: 25, - }, - end: Position { - line: 214, - column: 26, - }, + open_brace: OpenBrace( + Position { + line: 214, + column: 25, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 214, - column: 26, - }, - end: Position { - line: 214, - column: 27, - }, + close_brace: CloseBrace( + Position { + line: 214, + column: 26, }, - }, + ), }, star: None, keyword_async: None, @@ -34256,19 +24282,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 214, - column: 27, - }, - end: Position { - line: 214, - column: 28, - }, + Semicolon( + Position { + line: 214, + column: 27, }, - }, + ), ), }, }, @@ -34299,52 +24318,31 @@ Mod( Stmt( DoWhile( DoWhileStmt { - keyword_do: Slice { - source: "do", - loc: SourceLocation { - start: Position { - line: 215, - column: 1, - }, - end: Position { - line: 215, - column: 3, - }, + keyword_do: Do( + Position { + line: 215, + column: 1, }, - }, + ), body: Expr { expr: Unary( UnaryExpr { operator: Plus( - Slice { - source: "+", - loc: SourceLocation { - start: Position { - line: 215, - column: 4, - }, - end: Position { - line: 215, - column: 5, - }, + Plus( + Position { + line: 215, + column: 4, }, - }, + ), ), argument: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 215, - column: 5, - }, - end: Position { - line: 215, - column: 13, - }, + keyword: Function( + Position { + line: 215, + column: 5, }, - }, + ), id: Some( Ident { slice: Slice { @@ -34362,61 +24360,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 215, - column: 16, - }, - end: Position { - line: 215, - column: 17, - }, + open_paren: OpenParen( + Position { + line: 215, + column: 16, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 215, - column: 17, - }, - end: Position { - line: 215, - column: 18, - }, + close_paren: CloseParen( + Position { + line: 215, + column: 17, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 215, - column: 18, - }, - end: Position { - line: 215, - column: 19, - }, + open_brace: OpenBrace( + Position { + line: 215, + column: 18, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 215, - column: 19, - }, - end: Position { - line: 215, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 215, + column: 19, }, - }, + ), }, star: None, keyword_async: None, @@ -34425,47 +24395,26 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 215, - column: 20, - }, - end: Position { - line: 215, - column: 21, - }, + Semicolon( + Position { + line: 215, + column: 20, }, - }, + ), ), }, - keyword_while: Slice { - source: "while", - loc: SourceLocation { - start: Position { - line: 215, - column: 22, - }, - end: Position { - line: 215, - column: 27, - }, + keyword_while: While( + Position { + line: 215, + column: 22, }, - }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 215, - column: 27, - }, - end: Position { - line: 215, - column: 28, - }, + ), + open_paren: OpenParen( + Position { + line: 215, + column: 27, }, - }, + ), test: Lit( Number( Slice { @@ -34483,19 +24432,12 @@ Mod( }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 215, - column: 29, - }, - end: Position { - line: 215, - column: 30, - }, + close_paren: CloseParen( + Position { + line: 215, + column: 29, }, - }, + ), semi_colon: None, }, ), @@ -34503,19 +24445,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 217, - column: 1, - }, - end: Position { - line: 217, - column: 9, - }, + keyword: Function( + Position { + line: 217, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -34533,19 +24468,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 217, - column: 13, - }, - end: Position { - line: 217, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 217, + column: 13, }, - }, + ), params: [ ListEntry { item: Pat( @@ -34568,19 +24496,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 15, - }, - end: Position { - line: 217, - column: 16, - }, + Comma( + Position { + line: 217, + column: 15, }, - }, + ), ), }, ListEntry { @@ -34605,19 +24526,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 217, - column: 19, - }, - end: Position { - line: 217, - column: 20, - }, + Equal( + Position { + line: 217, + column: 19, }, - }, + ), ), right: Lit( Number( @@ -34640,38 +24554,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 22, - }, - end: Position { - line: 217, - column: 23, - }, + Comma( + Position { + line: 217, + column: 22, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 217, - column: 24, - }, - end: Position { - line: 217, - column: 25, - }, + open_bracket: OpenBracket( + Position { + line: 217, + column: 24, }, - }, + ), elements: [ ListEntry { item: Some( @@ -34696,37 +24596,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 26, - }, - end: Position { - line: 217, - column: 27, - }, + Comma( + Position { + line: 217, + column: 26, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 27, - }, - end: Position { - line: 217, - column: 28, - }, + Comma( + Position { + line: 217, + column: 27, }, - }, + ), ), }, ListEntry { @@ -34752,19 +24638,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 217, - column: 31, - }, - end: Position { - line: 217, - column: 32, - }, + Equal( + Position { + line: 217, + column: 31, }, - }, + ), ), right: Lit( Number( @@ -34788,38 +24667,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 34, - }, - end: Position { - line: 217, - column: 35, - }, + Comma( + Position { + line: 217, + column: 34, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 217, - column: 36, - }, - end: Position { - line: 217, - column: 39, - }, + dots: Ellipsis( + Position { + line: 217, + column: 36, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -34843,55 +24708,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 217, - column: 40, - }, - end: Position { - line: 217, - column: 41, - }, + close_bracket: CloseBracket( + Position { + line: 217, + column: 40, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 41, - }, - end: Position { - line: 217, - column: 42, - }, + Comma( + Position { + line: 217, + column: 41, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 217, - column: 43, - }, - end: Position { - line: 217, - column: 44, - }, + open_brace: OpenBrace( + Position { + line: 217, + column: 43, }, - }, + ), props: [ ListEntry { item: Assign( @@ -34925,19 +24769,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 45, - }, - end: Position { - line: 217, - column: 46, - }, + Comma( + Position { + line: 217, + column: 45, }, - }, + ), ), }, ListEntry { @@ -34967,19 +24804,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 217, - column: 48, - }, - end: Position { - line: 217, - column: 49, - }, + Colon( + Position { + line: 217, + column: 48, }, - }, + ), ), value: Some( Pat( @@ -35006,19 +24836,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 51, - }, - end: Position { - line: 217, - column: 52, - }, + Comma( + Position { + line: 217, + column: 51, }, - }, + ), ), }, ListEntry { @@ -35070,19 +24893,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 217, - column: 55, - }, - end: Position { - line: 217, - column: 56, - }, + Equal( + Position { + line: 217, + column: 55, }, - }, + ), ), right: Lit( Number( @@ -35109,19 +24925,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 58, - }, - end: Position { - line: 217, - column: 59, - }, + Comma( + Position { + line: 217, + column: 58, }, - }, + ), ), }, ListEntry { @@ -35151,19 +24960,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 217, - column: 61, - }, - end: Position { - line: 217, - column: 62, - }, + Colon( + Position { + line: 217, + column: 61, }, - }, + ), ), value: Some( Pat( @@ -35187,19 +24989,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 217, - column: 65, - }, - end: Position { - line: 217, - column: 66, - }, + Equal( + Position { + line: 217, + column: 65, }, - }, + ), ), right: Lit( Number( @@ -35228,54 +25023,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 217, - column: 68, - }, - end: Position { - line: 217, - column: 69, - }, + close_brace: CloseBrace( + Position { + line: 217, + column: 68, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 217, - column: 69, - }, - end: Position { - line: 217, - column: 70, - }, + Comma( + Position { + line: 217, + column: 69, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 217, - column: 71, - }, - end: Position { - line: 217, - column: 74, - }, + dots: Ellipsis( + Position { + line: 217, + column: 71, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -35298,47 +25072,26 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 217, - column: 75, - }, - end: Position { - line: 217, - column: 76, - }, + close_paren: CloseParen( + Position { + line: 217, + column: 75, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 217, - column: 76, - }, - end: Position { - line: 217, - column: 77, - }, + open_brace: OpenBrace( + Position { + line: 217, + column: 76, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 217, - column: 77, - }, - end: Position { - line: 217, - column: 78, - }, + close_brace: CloseBrace( + Position { + line: 217, + column: 77, }, - }, + ), }, star: None, keyword_async: None, @@ -35348,19 +25101,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 218, - column: 1, - }, - end: Position { - line: 218, - column: 9, - }, + keyword: Function( + Position { + line: 218, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -35378,65 +25124,39 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 218, - column: 13, - }, - end: Position { - line: 218, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 218, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 218, - column: 14, - }, - end: Position { - line: 218, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 218, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 218, - column: 15, - }, - end: Position { - line: 218, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 218, + column: 15, }, - }, + ), stmts: [ Dir( Dir { expr: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 218, column: 17, }, - end: Position { - line: 218, - column: 18, - }, - }, - }, + ), + ), content: Slice { source: "use strict", loc: SourceLocation { @@ -35450,19 +25170,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 218, column: 28, }, - end: Position { - line: 218, - column: 29, - }, - }, - }, + ), + ), }, ), dir: "use strict", @@ -35470,19 +25185,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 218, - column: 30, - }, - end: Position { - line: 218, - column: 31, - }, + close_brace: CloseBrace( + Position { + line: 218, + column: 30, }, - }, + ), }, star: None, keyword_async: None, @@ -35492,19 +25200,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 219, - column: 1, - }, - end: Position { - line: 219, - column: 9, - }, + keyword: Function( + Position { + line: 219, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -35522,65 +25223,39 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 219, - column: 13, - }, - end: Position { - line: 219, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 219, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 219, - column: 14, - }, - end: Position { - line: 219, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 219, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 219, - column: 15, - }, - end: Position { - line: 219, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 219, + column: 15, }, - }, + ), stmts: [ Dir( Dir { expr: String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 219, column: 17, }, - end: Position { - line: 219, - column: 18, - }, - }, - }, + ), + ), content: Slice { source: "use strict", loc: SourceLocation { @@ -35594,19 +25269,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 219, column: 28, }, - end: Position { - line: 219, - column: 29, - }, - }, - }, + ), + ), }, ), dir: "use strict", @@ -35614,19 +25284,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 219, - column: 30, - }, - end: Position { - line: 219, - column: 31, - }, + close_brace: CloseBrace( + Position { + line: 219, + column: 30, }, - }, + ), }, star: None, keyword_async: None, @@ -35636,19 +25299,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 220, - column: 1, - }, - end: Position { - line: 220, - column: 9, - }, + keyword: Function( + Position { + line: 220, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -35666,65 +25322,39 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 220, - column: 13, - }, - end: Position { - line: 220, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 220, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 220, - column: 14, - }, - end: Position { - line: 220, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 220, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 220, - column: 15, - }, - end: Position { - line: 220, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 220, + column: 15, }, - }, + ), stmts: [ Dir( Dir { expr: String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 220, column: 17, }, - end: Position { - line: 220, - column: 18, - }, - }, - }, + ), + ), content: Slice { source: "other directive", loc: SourceLocation { @@ -35738,19 +25368,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 220, column: 33, }, - end: Position { - line: 220, - column: 34, - }, - }, - }, + ), + ), }, ), dir: "other directive", @@ -35758,19 +25383,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 220, - column: 35, - }, - end: Position { - line: 220, - column: 36, - }, + close_brace: CloseBrace( + Position { + line: 220, + column: 35, }, - }, + ), }, star: None, keyword_async: None, @@ -35780,19 +25398,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 221, - column: 1, - }, - end: Position { - line: 221, - column: 9, - }, + keyword: Function( + Position { + line: 221, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -35810,65 +25421,39 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 221, - column: 13, - }, - end: Position { - line: 221, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 221, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 221, - column: 14, - }, - end: Position { - line: 221, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 221, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 221, - column: 15, - }, - end: Position { - line: 221, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 221, + column: 15, }, - }, + ), stmts: [ Dir( Dir { expr: String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 221, column: 17, }, - end: Position { - line: 221, - column: 18, - }, - }, - }, + ), + ), content: Slice { source: "other directive", loc: SourceLocation { @@ -35882,19 +25467,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 221, column: 33, }, - end: Position { - line: 221, - column: 34, - }, - }, - }, + ), + ), }, ), dir: "other directive", @@ -35902,19 +25482,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 221, - column: 35, - }, - end: Position { - line: 221, - column: 36, - }, + close_brace: CloseBrace( + Position { + line: 221, + column: 35, }, - }, + ), }, star: None, keyword_async: None, @@ -35924,19 +25497,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 222, - column: 1, - }, - end: Position { - line: 222, - column: 9, - }, + keyword: Function( + Position { + line: 222, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -35954,81 +25520,48 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 222, - column: 13, - }, - end: Position { - line: 222, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 222, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 222, - column: 14, - }, - end: Position { - line: 222, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 222, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 222, - column: 15, - }, - end: Position { - line: 222, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 222, + column: 15, }, - }, + ), stmts: [ Stmt( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 222, - column: 17, - }, - end: Position { - line: 222, - column: 18, - }, + open_paren: OpenParen( + Position { + line: 222, + column: 17, }, - }, + ), expr: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 222, column: 18, }, - end: Position { - line: 222, - column: 19, - }, - }, - }, + ), + ), content: Slice { source: "string", loc: SourceLocation { @@ -36042,54 +25575,35 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 222, column: 25, }, - end: Position { - line: 222, - column: 26, - }, - }, - }, + ), + ), }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 222, - column: 26, - }, - end: Position { - line: 222, - column: 27, - }, + close_paren: CloseParen( + Position { + line: 222, + column: 26, }, - }, + ), }, ), semi_colon: None, }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 222, - column: 28, - }, - end: Position { - line: 222, - column: 29, - }, + close_brace: CloseBrace( + Position { + line: 222, + column: 28, }, - }, + ), }, star: None, keyword_async: None, @@ -36099,19 +25613,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 223, - column: 1, - }, - end: Position { - line: 223, - column: 9, - }, + keyword: Function( + Position { + line: 223, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -36129,81 +25636,48 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 223, - column: 13, - }, - end: Position { - line: 223, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 223, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 223, - column: 14, - }, - end: Position { - line: 223, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 223, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 223, - column: 15, - }, - end: Position { - line: 223, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 223, + column: 15, }, - }, + ), stmts: [ Stmt( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 223, - column: 17, - }, - end: Position { - line: 223, - column: 18, - }, + open_paren: OpenParen( + Position { + line: 223, + column: 17, }, - }, + ), expr: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 223, column: 18, }, - end: Position { - line: 223, - column: 19, - }, - }, - }, + ), + ), content: Slice { source: "string", loc: SourceLocation { @@ -36217,54 +25691,35 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 223, column: 25, }, - end: Position { - line: 223, - column: 26, - }, - }, - }, + ), + ), }, ), ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 223, - column: 26, - }, - end: Position { - line: 223, - column: 27, - }, + close_paren: CloseParen( + Position { + line: 223, + column: 26, }, - }, + ), }, ), semi_colon: None, }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 223, - column: 28, - }, - end: Position { - line: 223, - column: 29, - }, + close_brace: CloseBrace( + Position { + line: 223, + column: 28, }, - }, + ), }, star: None, keyword_async: None, @@ -36274,19 +25729,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 224, - column: 1, - }, - end: Position { - line: 224, - column: 9, - }, + keyword: Function( + Position { + line: 224, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -36304,83 +25752,50 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 224, - column: 13, - }, - end: Position { - line: 224, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 224, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 224, - column: 14, - }, - end: Position { - line: 224, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 224, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 224, - column: 15, - }, - end: Position { - line: 224, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 224, + column: 15, }, - }, + ), stmts: [ Stmt( Expr { expr: Binary( BinaryExpr { operator: Plus( - Slice { - source: "+", - loc: SourceLocation { - start: Position { - line: 226, - column: 3, - }, - end: Position { - line: 226, - column: 4, - }, + Plus( + Position { + line: 226, + column: 3, }, - }, + ), ), left: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 225, column: 3, }, - end: Position { - line: 225, - column: 4, - }, - }, - }, + ), + ), content: Slice { source: "string", loc: SourceLocation { @@ -36394,19 +25809,14 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 225, column: 10, }, - end: Position { - line: 225, - column: 11, - }, - }, - }, + ), + ), }, ), ), @@ -36433,19 +25843,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 227, - column: 1, - }, - end: Position { - line: 227, - column: 2, - }, + close_brace: CloseBrace( + Position { + line: 227, + column: 1, }, - }, + ), }, star: None, keyword_async: None, @@ -36455,19 +25858,12 @@ Mod( Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 229, - column: 1, - }, - end: Position { - line: 229, - column: 9, - }, + keyword: Function( + Position { + line: 229, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -36485,19 +25881,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 229, - column: 12, - }, - end: Position { - line: 229, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 229, + column: 12, }, - }, + ), params: [ ListEntry { item: Pat( @@ -36520,19 +25909,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 14, - }, - end: Position { - line: 229, - column: 15, - }, + Comma( + Position { + line: 229, + column: 14, }, - }, + ), ), }, ListEntry { @@ -36557,19 +25939,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 229, - column: 18, - }, - end: Position { - line: 229, - column: 19, - }, + Equal( + Position { + line: 229, + column: 18, }, - }, + ), ), right: Lit( Number( @@ -36592,38 +25967,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 21, - }, - end: Position { - line: 229, - column: 22, - }, + Comma( + Position { + line: 229, + column: 21, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 229, - column: 23, - }, - end: Position { - line: 229, - column: 24, - }, + open_bracket: OpenBracket( + Position { + line: 229, + column: 23, }, - }, + ), elements: [ ListEntry { item: Some( @@ -36648,37 +26009,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 25, - }, - end: Position { - line: 229, - column: 26, - }, + Comma( + Position { + line: 229, + column: 25, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 26, - }, - end: Position { - line: 229, - column: 27, - }, + Comma( + Position { + line: 229, + column: 26, }, - }, + ), ), }, ListEntry { @@ -36704,19 +26051,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 229, - column: 30, - }, - end: Position { - line: 229, - column: 31, - }, + Equal( + Position { + line: 229, + column: 30, }, - }, + ), ), right: Lit( Number( @@ -36740,38 +26080,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 33, - }, - end: Position { - line: 229, - column: 34, - }, + Comma( + Position { + line: 229, + column: 33, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 229, - column: 35, - }, - end: Position { - line: 229, - column: 38, - }, + dots: Ellipsis( + Position { + line: 229, + column: 35, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -36795,55 +26121,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 229, - column: 39, - }, - end: Position { - line: 229, - column: 40, - }, - }, - }, - }, - ), - ), - comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 40, - }, - end: Position { - line: 229, - column: 41, - }, + close_bracket: CloseBracket( + Position { + line: 229, + column: 39, + }, + ), }, - }, + ), + ), + comma: Some( + Comma( + Position { + line: 229, + column: 40, + }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 229, - column: 42, - }, - end: Position { - line: 229, - column: 43, - }, + open_brace: OpenBrace( + Position { + line: 229, + column: 42, }, - }, + ), props: [ ListEntry { item: Assign( @@ -36877,19 +26182,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 44, - }, - end: Position { - line: 229, - column: 45, - }, + Comma( + Position { + line: 229, + column: 44, }, - }, + ), ), }, ListEntry { @@ -36919,19 +26217,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 229, - column: 47, - }, - end: Position { - line: 229, - column: 48, - }, + Colon( + Position { + line: 229, + column: 47, }, - }, + ), ), value: Some( Pat( @@ -36958,19 +26249,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 50, - }, - end: Position { - line: 229, - column: 51, - }, + Comma( + Position { + line: 229, + column: 50, }, - }, + ), ), }, ListEntry { @@ -37022,19 +26306,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 229, - column: 54, - }, - end: Position { - line: 229, - column: 55, - }, + Equal( + Position { + line: 229, + column: 54, }, - }, + ), ), right: Lit( Number( @@ -37061,19 +26338,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 57, - }, - end: Position { - line: 229, - column: 58, - }, + Comma( + Position { + line: 229, + column: 57, }, - }, + ), ), }, ListEntry { @@ -37103,19 +26373,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 229, - column: 60, - }, - end: Position { - line: 229, - column: 61, - }, + Colon( + Position { + line: 229, + column: 60, }, - }, + ), ), value: Some( Pat( @@ -37139,19 +26402,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 229, - column: 64, - }, - end: Position { - line: 229, - column: 65, - }, + Equal( + Position { + line: 229, + column: 64, }, - }, + ), ), right: Lit( Number( @@ -37180,54 +26436,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 229, - column: 67, - }, - end: Position { - line: 229, - column: 68, - }, + close_brace: CloseBrace( + Position { + line: 229, + column: 67, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 229, - column: 68, - }, - end: Position { - line: 229, - column: 69, - }, + Comma( + Position { + line: 229, + column: 68, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 229, - column: 70, - }, - end: Position { - line: 229, - column: 73, - }, + dots: Ellipsis( + Position { + line: 229, + column: 70, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -37250,66 +26485,38 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 229, - column: 74, - }, - end: Position { - line: 229, - column: 75, - }, + close_paren: CloseParen( + Position { + line: 229, + column: 74, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 229, - column: 75, - }, - end: Position { - line: 229, - column: 76, - }, + open_brace: OpenBrace( + Position { + line: 229, + column: 75, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 230, - column: 3, - }, - end: Position { - line: 230, - column: 9, - }, + keyword: Return( + Position { + line: 230, + column: 3, }, - }, + ), value: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 230, - column: 12, - }, - end: Position { - line: 230, - column: 13, - }, + Equal( + Position { + line: 230, + column: 12, }, - }, + ), ), left: Expr( Ident( @@ -37332,36 +26539,22 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 230, - column: 14, - }, - end: Position { - line: 230, - column: 19, - }, + keyword: Yield( + Position { + line: 230, + column: 14, }, - }, + ), argument: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 230, - column: 23, - }, - end: Position { - line: 230, - column: 24, - }, + Equal( + Position { + line: 230, + column: 23, }, - }, + ), ), left: Expr( Ident( @@ -37384,36 +26577,22 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 230, - column: 25, - }, - end: Position { - line: 230, - column: 30, - }, + keyword: Yield( + Position { + line: 230, + column: 25, }, - }, + ), argument: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 230, - column: 33, - }, - end: Position { - line: 230, - column: 34, - }, + Equal( + Position { + line: 230, + column: 33, }, - }, + ), ), left: Expr( Ident( @@ -37436,35 +26615,21 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 230, - column: 35, - }, - end: Position { - line: 230, - column: 40, - }, + keyword: Yield( + Position { + line: 230, + column: 35, }, - }, + ), argument: Some( Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 230, - column: 41, - }, - end: Position { - line: 230, - column: 46, - }, + keyword: Yield( + Position { + line: 230, + column: 41, }, - }, + ), argument: None, star: None, }, @@ -37483,19 +26648,12 @@ Mod( ), ), star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 230, - column: 19, - }, - end: Position { - line: 230, - column: 20, - }, + Asterisk( + Position { + line: 230, + column: 19, }, - }, + ), ), }, ), @@ -37503,51 +26661,30 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 230, - column: 46, - }, - end: Position { - line: 230, - column: 47, - }, + Semicolon( + Position { + line: 230, + column: 46, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 231, - column: 1, - }, - end: Position { - line: 231, - column: 2, - }, + close_brace: CloseBrace( + Position { + line: 231, + column: 1, }, - }, + ), }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 229, - column: 9, - }, - end: Position { - line: 229, - column: 10, - }, + Asterisk( + Position { + line: 229, + column: 9, }, - }, + ), ), keyword_async: None, }, @@ -37559,34 +26696,20 @@ Mod( CallExpr { callee: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 232, - column: 1, - }, - end: Position { - line: 232, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 232, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 232, - column: 2, - }, - end: Position { - line: 232, - column: 10, - }, + keyword: Function( + Position { + line: 232, + column: 2, }, - }, + ), id: Some( Ident { slice: Slice { @@ -37604,19 +26727,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 232, - column: 15, - }, - end: Position { - line: 232, - column: 16, - }, + open_paren: OpenParen( + Position { + line: 232, + column: 15, }, - }, + ), params: [ ListEntry { item: Pat( @@ -37639,19 +26755,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 17, - }, - end: Position { - line: 232, - column: 18, - }, + Comma( + Position { + line: 232, + column: 17, }, - }, + ), ), }, ListEntry { @@ -37676,19 +26785,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 232, - column: 21, - }, - end: Position { - line: 232, - column: 22, - }, + Equal( + Position { + line: 232, + column: 21, }, - }, + ), ), right: Lit( Number( @@ -37711,38 +26813,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 24, - }, - end: Position { - line: 232, - column: 25, - }, + Comma( + Position { + line: 232, + column: 24, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 232, - column: 26, - }, - end: Position { - line: 232, - column: 27, - }, + open_bracket: OpenBracket( + Position { + line: 232, + column: 26, }, - }, + ), elements: [ ListEntry { item: Some( @@ -37767,37 +26855,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 28, - }, - end: Position { - line: 232, - column: 29, - }, + Comma( + Position { + line: 232, + column: 28, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 29, - }, - end: Position { - line: 232, - column: 30, - }, + Comma( + Position { + line: 232, + column: 29, }, - }, + ), ), }, ListEntry { @@ -37823,19 +26897,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 232, - column: 33, - }, - end: Position { - line: 232, - column: 34, - }, + Equal( + Position { + line: 232, + column: 33, }, - }, + ), ), right: Lit( Number( @@ -37859,38 +26926,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 36, - }, - end: Position { - line: 232, - column: 37, - }, + Comma( + Position { + line: 232, + column: 36, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 232, - column: 38, - }, - end: Position { - line: 232, - column: 41, - }, + dots: Ellipsis( + Position { + line: 232, + column: 38, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -37914,55 +26967,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 232, - column: 42, - }, - end: Position { - line: 232, - column: 43, - }, + close_bracket: CloseBracket( + Position { + line: 232, + column: 42, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 43, - }, - end: Position { - line: 232, - column: 44, - }, + Comma( + Position { + line: 232, + column: 43, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 232, - column: 45, - }, - end: Position { - line: 232, - column: 46, - }, + open_brace: OpenBrace( + Position { + line: 232, + column: 45, }, - }, + ), props: [ ListEntry { item: Assign( @@ -37996,19 +27028,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 47, - }, - end: Position { - line: 232, - column: 48, - }, + Comma( + Position { + line: 232, + column: 47, }, - }, + ), ), }, ListEntry { @@ -38038,19 +27063,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 232, - column: 50, - }, - end: Position { - line: 232, - column: 51, - }, + Colon( + Position { + line: 232, + column: 50, }, - }, + ), ), value: Some( Pat( @@ -38077,19 +27095,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 53, - }, - end: Position { - line: 232, - column: 54, - }, + Comma( + Position { + line: 232, + column: 53, }, - }, + ), ), }, ListEntry { @@ -38141,19 +27152,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 232, - column: 57, - }, - end: Position { - line: 232, - column: 58, - }, + Equal( + Position { + line: 232, + column: 57, }, - }, + ), ), right: Lit( Number( @@ -38180,19 +27184,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 60, - }, - end: Position { - line: 232, - column: 61, - }, + Comma( + Position { + line: 232, + column: 60, }, - }, + ), ), }, ListEntry { @@ -38222,19 +27219,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 232, - column: 63, - }, - end: Position { - line: 232, - column: 64, - }, + Colon( + Position { + line: 232, + column: 63, }, - }, + ), ), value: Some( Pat( @@ -38258,19 +27248,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 232, - column: 67, - }, - end: Position { - line: 232, - column: 68, - }, + Equal( + Position { + line: 232, + column: 67, }, - }, + ), ), right: Lit( Number( @@ -38299,54 +27282,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 232, - column: 70, - }, - end: Position { - line: 232, - column: 71, - }, + close_brace: CloseBrace( + Position { + line: 232, + column: 70, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 232, - column: 71, - }, - end: Position { - line: 232, - column: 72, - }, + Comma( + Position { + line: 232, + column: 71, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 232, - column: 73, - }, - end: Position { - line: 232, - column: 76, - }, + dots: Ellipsis( + Position { + line: 232, + column: 73, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -38369,66 +27331,38 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 232, - column: 77, - }, - end: Position { - line: 232, - column: 78, - }, + close_paren: CloseParen( + Position { + line: 232, + column: 77, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 232, - column: 78, - }, - end: Position { - line: 232, - column: 79, - }, + open_brace: OpenBrace( + Position { + line: 232, + column: 78, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 233, - column: 3, - }, - end: Position { - line: 233, - column: 9, - }, + keyword: Return( + Position { + line: 233, + column: 3, }, - }, + ), value: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 233, - column: 12, - }, - end: Position { - line: 233, - column: 13, - }, + Equal( + Position { + line: 233, + column: 12, }, - }, + ), ), left: Expr( Ident( @@ -38451,36 +27385,22 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 233, - column: 14, - }, - end: Position { - line: 233, - column: 19, - }, + keyword: Yield( + Position { + line: 233, + column: 14, }, - }, + ), argument: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 233, - column: 23, - }, - end: Position { - line: 233, - column: 24, - }, + Equal( + Position { + line: 233, + column: 23, }, - }, + ), ), left: Expr( Ident( @@ -38503,36 +27423,22 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 233, - column: 25, - }, - end: Position { - line: 233, - column: 30, - }, + keyword: Yield( + Position { + line: 233, + column: 25, }, - }, + ), argument: Some( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 233, - column: 33, - }, - end: Position { - line: 233, - column: 34, - }, + Equal( + Position { + line: 233, + column: 33, }, - }, + ), ), left: Expr( Ident( @@ -38555,35 +27461,21 @@ Mod( ), right: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 233, - column: 35, - }, - end: Position { - line: 233, - column: 40, - }, + keyword: Yield( + Position { + line: 233, + column: 35, }, - }, + ), argument: Some( Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 233, - column: 41, - }, - end: Position { - line: 233, - column: 46, - }, + keyword: Yield( + Position { + line: 233, + column: 41, }, - }, + ), argument: None, star: None, }, @@ -38602,19 +27494,12 @@ Mod( ), ), star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 233, - column: 19, - }, - end: Position { - line: 233, - column: 20, - }, + Asterisk( + Position { + line: 233, + column: 19, }, - }, + ), ), }, ), @@ -38622,156 +27507,86 @@ Mod( ), ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 233, - column: 46, - }, - end: Position { - line: 233, - column: 47, - }, + Semicolon( + Position { + line: 233, + column: 46, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 234, - column: 1, - }, - end: Position { - line: 234, - column: 2, - }, + close_brace: CloseBrace( + Position { + line: 234, + column: 1, }, - }, + ), }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 232, - column: 11, - }, - end: Position { - line: 232, - column: 12, - }, + Asterisk( + Position { + line: 232, + column: 11, }, - }, + ), ), keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 234, - column: 2, - }, - end: Position { - line: 234, - column: 3, - }, + close_paren: CloseParen( + Position { + line: 234, + column: 2, }, - }, + ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 236, - column: 1, - }, - end: Position { - line: 236, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 236, + column: 1, }, - }, + ), arguments: [ ListEntry { item: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 236, - column: 2, - }, - end: Position { - line: 236, - column: 10, - }, + keyword: Function( + Position { + line: 236, + column: 2, }, - }, + ), id: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 236, - column: 10, - }, - end: Position { - line: 236, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 236, + column: 10, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 236, - column: 11, - }, - end: Position { - line: 236, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 236, + column: 11, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 236, - column: 12, - }, - end: Position { - line: 236, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 236, + column: 12, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 236, - column: 13, - }, - end: Position { - line: 236, - column: 14, - }, + close_brace: CloseBrace( + Position { + line: 236, + column: 13, }, - }, + ), }, star: None, keyword_async: None, @@ -38780,35 +27595,21 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 236, - column: 14, - }, - end: Position { - line: 236, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 236, + column: 14, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 236, - column: 15, - }, - end: Position { - line: 236, - column: 16, - }, + Semicolon( + Position { + line: 236, + column: 15, }, - }, + ), ), }, ), @@ -38816,48 +27617,27 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 237, - column: 1, - }, - end: Position { - line: 237, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 237, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 237, - column: 2, - }, - end: Position { - line: 237, - column: 10, - }, + keyword: Function( + Position { + line: 237, + column: 2, }, - }, + ), id: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 237, - column: 10, - }, - end: Position { - line: 237, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 237, + column: 10, }, - }, + ), params: [ ListEntry { item: Pat( @@ -38882,81 +27662,46 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 237, - column: 12, - }, - end: Position { - line: 237, - column: 13, - }, + close_paren: CloseParen( + Position { + line: 237, + column: 12, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 237, - column: 13, - }, - end: Position { - line: 237, - column: 14, - }, + open_brace: OpenBrace( + Position { + line: 237, + column: 13, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 237, - column: 14, - }, - end: Position { - line: 237, - column: 15, - }, + close_brace: CloseBrace( + Position { + line: 237, + column: 14, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 237, - column: 15, - }, - end: Position { - line: 237, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 237, + column: 15, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 237, - column: 16, - }, - end: Position { - line: 237, - column: 17, - }, + Semicolon( + Position { + line: 237, + column: 16, }, - }, + ), ), }, ), @@ -38964,48 +27709,27 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 238, - column: 1, - }, - end: Position { - line: 238, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 238, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 238, - column: 2, - }, - end: Position { - line: 238, - column: 10, - }, + keyword: Function( + Position { + line: 238, + column: 2, }, - }, + ), id: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 238, - column: 10, - }, - end: Position { - line: 238, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 238, + column: 10, }, - }, + ), params: [ ListEntry { item: Pat( @@ -39028,19 +27752,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 238, - column: 12, - }, - end: Position { - line: 238, - column: 13, - }, + Comma( + Position { + line: 238, + column: 12, }, - }, + ), ), }, ListEntry { @@ -39066,175 +27783,98 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 238, - column: 14, - }, - end: Position { - line: 238, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 238, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 238, - column: 15, - }, - end: Position { - line: 238, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 238, + column: 15, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 238, - column: 16, - }, - end: Position { - line: 238, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 238, + column: 16, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 238, - column: 17, - }, - end: Position { - line: 238, - column: 18, - }, + close_paren: CloseParen( + Position { + line: 238, + column: 17, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 238, - column: 18, - }, - end: Position { - line: 238, - column: 19, - }, + Semicolon( + Position { + line: 238, + column: 18, }, - }, + ), ), }, ), - Stmt( - Expr { - expr: Wrapped( - WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 239, - column: 1, - }, - end: Position { - line: 239, - column: 2, - }, + Stmt( + Expr { + expr: Wrapped( + WrappedExpr { + open_paren: OpenParen( + Position { + line: 239, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 239, - column: 2, - }, - end: Position { - line: 239, - column: 10, - }, + keyword: Function( + Position { + line: 239, + column: 2, }, - }, + ), id: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 239, - column: 10, - }, - end: Position { - line: 239, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 239, + column: 10, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 239, - column: 11, - }, - end: Position { - line: 239, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 239, + column: 11, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 239, - column: 12, - }, - end: Position { - line: 239, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 239, + column: 12, }, - }, + ), stmts: [ Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 239, - column: 14, - }, - end: Position { - line: 239, - column: 22, - }, + keyword: Function( + Position { + line: 239, + column: 14, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39252,61 +27892,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 239, - column: 24, - }, - end: Position { - line: 239, - column: 25, - }, + open_paren: OpenParen( + Position { + line: 239, + column: 24, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 239, - column: 25, - }, - end: Position { - line: 239, - column: 26, - }, + close_paren: CloseParen( + Position { + line: 239, + column: 25, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 239, - column: 26, - }, - end: Position { - line: 239, - column: 27, - }, + open_brace: OpenBrace( + Position { + line: 239, + column: 26, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 239, - column: 27, - }, - end: Position { - line: 239, - column: 28, - }, + close_brace: CloseBrace( + Position { + line: 239, + column: 27, }, - }, + ), }, star: None, keyword_async: None, @@ -39314,53 +27926,32 @@ Mod( ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 239, - column: 29, - }, - end: Position { - line: 239, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 239, + column: 29, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 239, - column: 30, - }, - end: Position { - line: 239, - column: 31, - }, + close_paren: CloseParen( + Position { + line: 239, + column: 30, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 239, - column: 31, - }, - end: Position { - line: 239, - column: 32, - }, + Semicolon( + Position { + line: 239, + column: 31, }, - }, + ), ), }, ), @@ -39368,34 +27959,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 240, - column: 1, - }, - end: Position { - line: 240, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 240, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 240, - column: 2, - }, - end: Position { - line: 240, - column: 10, - }, + keyword: Function( + Position { + line: 240, + column: 2, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39413,95 +27990,53 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 240, - column: 12, - }, - end: Position { - line: 240, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 240, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 240, - column: 13, - }, - end: Position { - line: 240, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 240, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 240, - column: 14, - }, - end: Position { - line: 240, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 240, + column: 14, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 240, - column: 15, - }, - end: Position { - line: 240, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 240, + column: 15, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 240, - column: 16, - }, - end: Position { - line: 240, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 240, + column: 16, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 240, - column: 17, - }, - end: Position { - line: 240, - column: 18, - }, + Semicolon( + Position { + line: 240, + column: 17, }, - }, + ), ), }, ), @@ -39509,34 +28044,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 241, - column: 1, - }, - end: Position { - line: 241, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 241, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 241, - column: 2, - }, - end: Position { - line: 241, - column: 10, - }, + keyword: Function( + Position { + line: 241, + column: 2, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39554,19 +28075,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 241, - column: 12, - }, - end: Position { - line: 241, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 241, + column: 12, }, - }, + ), params: [ ListEntry { item: Pat( @@ -39591,81 +28105,46 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 241, - column: 14, - }, - end: Position { - line: 241, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 241, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 241, - column: 15, - }, - end: Position { - line: 241, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 241, + column: 15, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 241, - column: 16, - }, - end: Position { - line: 241, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 241, + column: 16, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 241, - column: 17, - }, - end: Position { - line: 241, - column: 18, - }, + close_paren: CloseParen( + Position { + line: 241, + column: 17, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 241, - column: 18, - }, - end: Position { - line: 241, - column: 19, - }, + Semicolon( + Position { + line: 241, + column: 18, }, - }, + ), ), }, ), @@ -39673,34 +28152,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 242, - column: 1, - }, - end: Position { - line: 242, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 242, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 242, - column: 2, - }, - end: Position { - line: 242, - column: 10, - }, + keyword: Function( + Position { + line: 242, + column: 2, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39718,19 +28183,12 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 242, - column: 12, - }, - end: Position { - line: 242, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 242, + column: 12, }, - }, + ), params: [ ListEntry { item: Pat( @@ -39753,19 +28211,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 242, - column: 14, - }, - end: Position { - line: 242, - column: 15, - }, + Comma( + Position { + line: 242, + column: 14, }, - }, + ), ), }, ListEntry { @@ -39791,81 +28242,46 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 242, - column: 16, - }, - end: Position { - line: 242, - column: 17, - }, + close_paren: CloseParen( + Position { + line: 242, + column: 16, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 242, - column: 17, - }, - end: Position { - line: 242, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 242, + column: 17, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 242, - column: 18, - }, - end: Position { - line: 242, - column: 19, - }, + close_brace: CloseBrace( + Position { + line: 242, + column: 18, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 242, - column: 19, - }, - end: Position { - line: 242, - column: 20, - }, + close_paren: CloseParen( + Position { + line: 242, + column: 19, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 242, - column: 20, - }, - end: Position { - line: 242, - column: 21, - }, + Semicolon( + Position { + line: 242, + column: 20, }, - }, + ), ), }, ), @@ -39873,34 +28289,20 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 243, - column: 1, - }, - end: Position { - line: 243, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 243, + column: 1, }, - }, + ), expr: Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 243, - column: 2, - }, - end: Position { - line: 243, - column: 10, - }, + keyword: Function( + Position { + line: 243, + column: 2, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39918,64 +28320,36 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 243, - column: 12, - }, - end: Position { - line: 243, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 243, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 243, - column: 13, - }, - end: Position { - line: 243, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 243, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 243, - column: 14, - }, - end: Position { - line: 243, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 243, + column: 14, }, - }, + ), stmts: [ Decl( Func( Func { - keyword: Slice { - source: "function", - loc: SourceLocation { - start: Position { - line: 243, - column: 16, - }, - end: Position { - line: 243, - column: 24, - }, + keyword: Function( + Position { + line: 243, + column: 16, }, - }, + ), id: Some( Ident { slice: Slice { @@ -39993,61 +28367,33 @@ Mod( }, }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 243, - column: 26, - }, - end: Position { - line: 243, - column: 27, - }, + open_paren: OpenParen( + Position { + line: 243, + column: 26, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 243, - column: 27, - }, - end: Position { - line: 243, - column: 28, - }, + close_paren: CloseParen( + Position { + line: 243, + column: 27, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 243, - column: 28, - }, - end: Position { - line: 243, - column: 29, - }, + open_brace: OpenBrace( + Position { + line: 243, + column: 28, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 243, - column: 29, - }, - end: Position { - line: 243, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 243, + column: 29, }, - }, + ), }, star: None, keyword_async: None, @@ -40055,53 +28401,32 @@ Mod( ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 243, - column: 31, - }, - end: Position { - line: 243, - column: 32, - }, + close_brace: CloseBrace( + Position { + line: 243, + column: 31, }, - }, + ), }, star: None, keyword_async: None, }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 243, - column: 32, - }, - end: Position { - line: 243, - column: 33, - }, + close_paren: CloseParen( + Position { + line: 243, + column: 32, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 243, - column: 33, - }, - end: Position { - line: 243, - column: 34, - }, + Semicolon( + Position { + line: 243, + column: 33, }, - }, + ), ), }, ), @@ -40112,49 +28437,28 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 245, - column: 1, - }, - end: Position { - line: 245, - column: 2, - }, + OpenParen( + Position { + line: 245, + column: 1, }, - }, + ), ), params: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 245, - column: 2, - }, - end: Position { - line: 245, - column: 3, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 245, - column: 4, - }, - end: Position { + CloseParen( + Position { line: 245, - column: 6, + column: 2, }, + ), + ), + arrow: FatArrow( + Position { + line: 245, + column: 4, }, - }, + ), body: Expr( Lit( Number( @@ -40177,19 +28481,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 245, - column: 8, - }, - end: Position { - line: 245, - column: 9, - }, + Semicolon( + Position { + line: 245, + column: 8, }, - }, + ), ), }, ), @@ -40200,96 +28497,54 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 246, - column: 1, - }, - end: Position { - line: 246, - column: 2, - }, + OpenParen( + Position { + line: 246, + column: 1, }, - }, + ), ), params: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 246, - column: 2, - }, - end: Position { - line: 246, - column: 3, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 246, - column: 4, - }, - end: Position { + CloseParen( + Position { line: 246, - column: 6, + column: 2, }, + ), + ), + arrow: FatArrow( + Position { + line: 246, + column: 4, }, - }, + ), body: FuncBody( FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 246, - column: 7, - }, - end: Position { - line: 246, - column: 8, - }, + open_brace: OpenBrace( + Position { + line: 246, + column: 7, }, - }, + ), stmts: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 246, - column: 8, - }, - end: Position { - line: 246, - column: 9, - }, + Semicolon( + Position { + line: 246, + column: 8, }, - }, + ), ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 246, - column: 9, - }, - end: Position { - line: 246, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 246, + column: 9, }, - }, + ), }, ), }, @@ -40329,19 +28584,12 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 247, - column: 3, - }, - end: Position { - line: 247, - column: 5, - }, + arrow: FatArrow( + Position { + line: 247, + column: 3, }, - }, + ), body: Expr( Ident( Ident { @@ -40398,36 +28646,22 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 248, - column: 3, - }, - end: Position { - line: 248, - column: 5, - }, + arrow: FatArrow( + Position { + line: 248, + column: 3, }, - }, + ), body: Expr( Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 248, - column: 8, - }, - end: Position { - line: 248, - column: 9, - }, + Equal( + Position { + line: 248, + column: 8, }, - }, + ), ), left: Expr( Ident( @@ -40505,19 +28739,12 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 249, - column: 3, - }, - end: Position { - line: 249, - column: 5, - }, + arrow: FatArrow( + Position { + line: 249, + column: 3, }, - }, + ), body: Expr( ArrowFunc( ArrowFuncExpr { @@ -40549,19 +28776,12 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 249, - column: 8, - }, - end: Position { - line: 249, - column: 10, - }, + arrow: FatArrow( + Position { + line: 249, + column: 8, }, - }, + ), body: Expr( Ident( Ident { @@ -40621,34 +28841,20 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 250, - column: 3, - }, - end: Position { - line: 250, - column: 5, - }, + arrow: FatArrow( + Position { + line: 250, + column: 3, }, - }, + ), body: FuncBody( FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 250, - column: 6, - }, - end: Position { - line: 250, - column: 7, - }, + open_brace: OpenBrace( + Position { + line: 250, + column: 6, }, - }, + ), stmts: [ Stmt( Expr { @@ -40673,19 +28879,12 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 250, - column: 8, - }, - end: Position { - line: 250, - column: 9, - }, + close_brace: CloseBrace( + Position { + line: 250, + column: 8, }, - }, + ), }, ), }, @@ -40725,50 +28924,29 @@ Mod( }, ], close_paren: None, - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 251, - column: 3, - }, - end: Position { - line: 251, - column: 5, - }, + arrow: FatArrow( + Position { + line: 251, + column: 3, }, - }, + ), body: Expr( Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 251, - column: 6, - }, - end: Position { - line: 251, - column: 7, - }, + open_paren: OpenParen( + Position { + line: 251, + column: 6, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 251, - column: 7, - }, - end: Position { - line: 251, - column: 8, - }, + open_brace: OpenBrace( + Position { + line: 251, + column: 7, }, - }, + ), props: [ ListEntry { item: Prop( @@ -40804,53 +28982,32 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 251, - column: 9, - }, - end: Position { - line: 251, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 251, + column: 9, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 251, - column: 10, - }, - end: Position { - line: 251, - column: 11, - }, + close_paren: CloseParen( + Position { + line: 251, + column: 10, }, - }, + ), }, ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 251, - column: 11, - }, - end: Position { - line: 251, - column: 12, - }, + Semicolon( + Position { + line: 251, + column: 11, }, - }, + ), ), }, ), @@ -40861,19 +29018,12 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 252, - column: 1, - }, - end: Position { - line: 252, - column: 2, - }, + OpenParen( + Position { + line: 252, + column: 1, }, - }, + ), ), params: [ ListEntry { @@ -40900,33 +29050,19 @@ Mod( }, ], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 252, - column: 3, - }, - end: Position { - line: 252, - column: 4, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 252, - column: 5, - }, - end: Position { + CloseParen( + Position { line: 252, - column: 7, + column: 3, }, + ), + ), + arrow: FatArrow( + Position { + line: 252, + column: 5, }, - }, + ), body: Expr( Ident( Ident { @@ -40949,19 +29085,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 252, - column: 9, - }, - end: Position { - line: 252, - column: 10, - }, + Semicolon( + Position { + line: 252, + column: 9, }, - }, + ), ), }, ), @@ -40972,19 +29101,12 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 253, - column: 1, - }, - end: Position { - line: 253, - column: 2, - }, + OpenParen( + Position { + line: 253, + column: 1, }, - }, + ), ), params: [ ListEntry { @@ -41011,64 +29133,36 @@ Mod( }, ], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 253, - column: 3, - }, - end: Position { - line: 253, - column: 4, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 253, - column: 5, - }, - end: Position { + CloseParen( + Position { line: 253, - column: 7, + column: 3, }, + ), + ), + arrow: FatArrow( + Position { + line: 253, + column: 5, }, - }, + ), body: FuncBody( FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 253, - column: 8, - }, - end: Position { - line: 253, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 253, + column: 8, }, - }, + ), stmts: [ Stmt( Return { - keyword: Slice { - source: "return", - loc: SourceLocation { - start: Position { - line: 253, - column: 9, - }, - end: Position { - line: 253, - column: 15, - }, + keyword: Return( + Position { + line: 253, + column: 9, }, - }, + ), value: Some( Ident( Ident { @@ -41092,37 +29186,23 @@ Mod( }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 253, - column: 17, - }, - end: Position { - line: 253, - column: 18, - }, + close_brace: CloseBrace( + Position { + line: 253, + column: 17, }, - }, + ), }, ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 253, - column: 18, - }, - end: Position { - line: 253, - column: 19, - }, + Semicolon( + Position { + line: 253, + column: 18, }, - }, + ), ), }, ), @@ -41133,19 +29213,12 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 254, - column: 1, - }, - end: Position { - line: 254, - column: 2, - }, + OpenParen( + Position { + line: 254, + column: 1, }, - }, + ), ), params: [ ListEntry { @@ -41172,64 +29245,36 @@ Mod( }, ], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 254, - column: 3, - }, - end: Position { - line: 254, - column: 4, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 254, - column: 5, - }, - end: Position { + CloseParen( + Position { line: 254, - column: 7, + column: 3, }, + ), + ), + arrow: FatArrow( + Position { + line: 254, + column: 5, }, - }, + ), body: Expr( Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 254, - column: 8, - }, - end: Position { - line: 254, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 254, + column: 8, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 254, - column: 9, - }, - end: Position { - line: 254, - column: 10, - }, + open_brace: OpenBrace( + Position { + line: 254, + column: 9, }, - }, + ), props: [ ListEntry { item: Prop( @@ -41264,54 +29309,33 @@ Mod( ), comma: None, }, - ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 254, - column: 11, - }, - end: Position { - line: 254, - column: 12, - }, - }, - }, + ], + close_brace: CloseBrace( + Position { + line: 254, + column: 11, + }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 254, - column: 12, - }, - end: Position { - line: 254, - column: 13, - }, + close_paren: CloseParen( + Position { + line: 254, + column: 12, }, - }, + ), }, ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 254, - column: 13, - }, - end: Position { - line: 254, - column: 14, - }, + Semicolon( + Position { + line: 254, + column: 13, }, - }, + ), ), }, ), @@ -41322,38 +29346,24 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 255, - column: 1, - }, - end: Position { - line: 255, - column: 2, - }, + OpenParen( + Position { + line: 255, + column: 1, }, - }, + ), ), params: [ ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 255, - column: 2, - }, - end: Position { - line: 255, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 255, + column: 2, }, - }, + ), props: [ ListEntry { item: Assign( @@ -41389,19 +29399,12 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 255, - column: 4, - }, - end: Position { - line: 255, - column: 5, - }, + close_brace: CloseBrace( + Position { + line: 255, + column: 4, }, - }, + ), }, ), ), @@ -41409,64 +29412,36 @@ Mod( }, ], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 255, - column: 5, - }, - end: Position { - line: 255, - column: 6, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 255, - column: 7, - }, - end: Position { + CloseParen( + Position { line: 255, - column: 9, + column: 5, }, + ), + ), + arrow: FatArrow( + Position { + line: 255, + column: 7, }, - }, + ), body: Expr( Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 255, - column: 10, - }, - end: Position { - line: 255, - column: 11, - }, + open_paren: OpenParen( + Position { + line: 255, + column: 10, }, - }, + ), expr: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 255, - column: 11, - }, - end: Position { - line: 255, - column: 12, - }, + open_brace: OpenBrace( + Position { + line: 255, + column: 11, }, - }, + ), props: [ ListEntry { item: Prop( @@ -41502,53 +29477,32 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 255, - column: 13, - }, - end: Position { - line: 255, - column: 14, - }, + close_brace: CloseBrace( + Position { + line: 255, + column: 13, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 255, - column: 14, - }, - end: Position { - line: 255, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 255, + column: 14, }, - }, + ), }, ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 255, - column: 15, - }, - end: Position { - line: 255, - column: 16, - }, + Semicolon( + Position { + line: 255, + column: 15, }, - }, + ), ), }, ), @@ -41559,19 +29513,12 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 256, - column: 1, - }, - end: Position { - line: 256, - column: 2, - }, + OpenParen( + Position { + line: 256, + column: 1, }, - }, + ), ), params: [ ListEntry { @@ -41595,19 +29542,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 3, - }, - end: Position { - line: 256, - column: 4, - }, + Comma( + Position { + line: 256, + column: 3, }, - }, + ), ), }, ListEntry { @@ -41632,19 +29572,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 256, - column: 7, - }, - end: Position { - line: 256, - column: 8, - }, + Equal( + Position { + line: 256, + column: 7, }, - }, + ), ), right: Lit( Number( @@ -41667,38 +29600,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 10, - }, - end: Position { - line: 256, - column: 11, - }, + Comma( + Position { + line: 256, + column: 10, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 256, - column: 12, - }, - end: Position { - line: 256, - column: 13, - }, + open_bracket: OpenBracket( + Position { + line: 256, + column: 12, }, - }, + ), elements: [ ListEntry { item: Some( @@ -41723,37 +29642,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 14, - }, - end: Position { - line: 256, - column: 15, - }, + Comma( + Position { + line: 256, + column: 14, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 15, - }, - end: Position { - line: 256, - column: 16, - }, + Comma( + Position { + line: 256, + column: 15, }, - }, + ), ), }, ListEntry { @@ -41779,19 +29684,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 256, - column: 19, - }, - end: Position { - line: 256, - column: 20, - }, + Equal( + Position { + line: 256, + column: 19, }, - }, + ), ), right: Lit( Number( @@ -41815,38 +29713,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 22, - }, - end: Position { - line: 256, - column: 23, - }, + Comma( + Position { + line: 256, + column: 22, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 256, - column: 24, - }, - end: Position { - line: 256, - column: 27, - }, + dots: Ellipsis( + Position { + line: 256, + column: 24, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -41870,55 +29754,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 256, - column: 28, - }, - end: Position { - line: 256, - column: 29, - }, + close_bracket: CloseBracket( + Position { + line: 256, + column: 28, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 29, - }, - end: Position { - line: 256, - column: 30, - }, + Comma( + Position { + line: 256, + column: 29, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 256, - column: 31, - }, - end: Position { - line: 256, - column: 32, - }, + open_brace: OpenBrace( + Position { + line: 256, + column: 31, }, - }, + ), props: [ ListEntry { item: Assign( @@ -41952,19 +29815,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 33, - }, - end: Position { - line: 256, - column: 34, - }, + Comma( + Position { + line: 256, + column: 33, }, - }, + ), ), }, ListEntry { @@ -41994,19 +29850,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 256, - column: 36, - }, - end: Position { - line: 256, - column: 37, - }, + Colon( + Position { + line: 256, + column: 36, }, - }, + ), ), value: Some( Pat( @@ -42033,19 +29882,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 39, - }, - end: Position { - line: 256, - column: 40, - }, + Comma( + Position { + line: 256, + column: 39, }, - }, + ), ), }, ListEntry { @@ -42097,19 +29939,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 256, - column: 43, - }, - end: Position { - line: 256, - column: 44, - }, + Equal( + Position { + line: 256, + column: 43, }, - }, + ), ), right: Lit( Number( @@ -42136,19 +29971,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 46, - }, - end: Position { - line: 256, - column: 47, - }, + Comma( + Position { + line: 256, + column: 46, }, - }, + ), ), }, ListEntry { @@ -42178,19 +30006,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 256, - column: 49, - }, - end: Position { - line: 256, - column: 50, - }, + Colon( + Position { + line: 256, + column: 49, }, - }, + ), ), value: Some( Pat( @@ -42214,19 +30035,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 256, - column: 53, - }, - end: Position { - line: 256, - column: 54, - }, + Equal( + Position { + line: 256, + column: 53, }, - }, + ), ), right: Lit( Number( @@ -42255,54 +30069,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 256, - column: 56, - }, - end: Position { - line: 256, - column: 57, - }, + close_brace: CloseBrace( + Position { + line: 256, + column: 56, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 256, - column: 57, - }, - end: Position { - line: 256, - column: 58, - }, + Comma( + Position { + line: 256, + column: 57, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 256, - column: 59, - }, - end: Position { - line: 256, - column: 62, - }, + dots: Ellipsis( + Position { + line: 256, + column: 59, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -42326,98 +30119,56 @@ Mod( }, ], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 256, - column: 63, - }, - end: Position { - line: 256, - column: 64, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { + CloseParen( + Position { line: 256, - column: 65, - }, - end: Position { - line: 256, - column: 67, + column: 63, }, + ), + ), + arrow: FatArrow( + Position { + line: 256, + column: 65, }, - }, + ), body: FuncBody( FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 256, - column: 68, - }, - end: Position { - line: 256, - column: 69, - }, + open_brace: OpenBrace( + Position { + line: 256, + column: 68, }, - }, + ), stmts: [ Stmt( Empty( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 256, - column: 69, - }, - end: Position { - line: 256, - column: 70, - }, + Semicolon( + Position { + line: 256, + column: 69, }, - }, + ), ), ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 256, - column: 70, - }, - end: Position { - line: 256, - column: 71, - }, + close_brace: CloseBrace( + Position { + line: 256, + column: 70, }, - }, + ), }, ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 256, - column: 71, - }, - end: Position { - line: 256, - column: 72, - }, + Semicolon( + Position { + line: 256, + column: 71, }, - }, + ), ), }, ), @@ -42426,36 +30177,22 @@ Mod( expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 258, - column: 5, - }, - end: Position { - line: 258, - column: 6, - }, + Equal( + Position { + line: 258, + column: 5, }, - }, + ), ), left: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 258, - column: 1, - }, - end: Position { - line: 258, - column: 2, - }, + open_bracket: OpenBracket( + Position { + line: 258, + column: 1, }, - }, + ), elements: [ ListEntry { item: Some( @@ -42482,70 +30219,42 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 258, - column: 3, - }, - end: Position { - line: 258, - column: 4, - }, + close_bracket: CloseBracket( + Position { + line: 258, + column: 3, }, - }, + ), }, ), ), right: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 258, - column: 7, - }, - end: Position { - line: 258, - column: 8, - }, + open_bracket: OpenBracket( + Position { + line: 258, + column: 7, }, - }, + ), elements: [ ListEntry { item: Some( Spread( SpreadExpr { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 258, - column: 8, - }, - end: Position { - line: 258, - column: 11, - }, + dots: Ellipsis( + Position { + line: 258, + column: 8, }, - }, + ), expr: Array( ArrayExpr { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 258, - column: 11, - }, - end: Position { - line: 258, - column: 12, - }, + open_bracket: OpenBracket( + Position { + line: 258, + column: 11, }, - }, + ), elements: [ ListEntry { item: Some( @@ -42570,19 +30279,12 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 258, - column: 13, - }, - end: Position { - line: 258, - column: 14, - }, + close_bracket: CloseBracket( + Position { + line: 258, + column: 13, }, - }, + ), }, ), }, @@ -42591,37 +30293,23 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 258, - column: 14, - }, - end: Position { - line: 258, - column: 15, - }, + close_bracket: CloseBracket( + Position { + line: 258, + column: 14, }, - }, + ), }, ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 258, - column: 15, - }, - end: Position { - line: 258, - column: 16, - }, + Semicolon( + Position { + line: 258, + column: 15, }, - }, + ), ), }, ), @@ -42629,52 +30317,31 @@ Mod( Expr { expr: Wrapped( WrappedExpr { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 259, - column: 1, - }, - end: Position { - line: 259, - column: 2, - }, + open_paren: OpenParen( + Position { + line: 259, + column: 1, }, - }, + ), expr: Assign( AssignExpr { operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 259, - column: 6, - }, - end: Position { - line: 259, - column: 7, - }, + Equal( + Position { + line: 259, + column: 6, }, - }, + ), ), left: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 259, - column: 2, - }, - end: Position { - line: 259, - column: 3, - }, + open_brace: OpenBrace( + Position { + line: 259, + column: 2, }, - }, + ), props: [ ListEntry { item: Assign( @@ -42710,177 +30377,100 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 259, - column: 4, - }, - end: Position { - line: 259, - column: 5, - }, + close_brace: CloseBrace( + Position { + line: 259, + column: 4, }, - }, + ), }, ), ), right: Obj( ObjExpr { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 259, - column: 8, - }, - end: Position { - line: 259, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 259, + column: 8, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 259, - column: 9, - }, - end: Position { - line: 259, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 259, + column: 9, }, - }, + ), }, ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 259, - column: 10, - }, - end: Position { - line: 259, - column: 11, - }, + close_paren: CloseParen( + Position { + line: 259, + column: 10, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 259, - column: 11, - }, - end: Position { - line: 259, - column: 12, - }, + Semicolon( + Position { + line: 259, + column: 11, }, - }, + ), ), }, ), Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 260, - column: 1, - }, - end: Position { - line: 260, - column: 4, - }, + keyword: Try( + Position { + line: 260, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 260, - column: 4, - }, - end: Position { - line: 260, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 260, + column: 4, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 260, - column: 5, - }, - end: Position { - line: 260, - column: 6, - }, + close_brace: CloseBrace( + Position { + line: 260, + column: 5, }, - }, + ), }, handler: Some( CatchClause { - keyword: Slice { - source: "catch", - loc: SourceLocation { - start: Position { - line: 260, - column: 6, - }, - end: Position { - line: 260, - column: 11, - }, + keyword: Catch( + Position { + line: 260, + column: 6, }, - }, + ), param: Some( CatchArg { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 260, - column: 11, - }, - end: Position { - line: 260, - column: 12, - }, + open_paren: OpenParen( + Position { + line: 260, + column: 11, }, - }, + ), param: Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 260, - column: 12, - }, - end: Position { - line: 260, - column: 13, - }, + open_bracket: OpenBracket( + Position { + line: 260, + column: 12, }, - }, + ), elements: [ ListEntry { item: Some( @@ -42907,64 +30497,36 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 260, - column: 14, - }, - end: Position { - line: 260, - column: 15, - }, + close_bracket: CloseBracket( + Position { + line: 260, + column: 14, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 260, - column: 15, - }, - end: Position { - line: 260, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 260, + column: 15, }, - }, + ), }, ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 260, - column: 16, - }, - end: Position { - line: 260, - column: 17, - }, + open_brace: OpenBrace( + Position { + line: 260, + column: 16, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 260, - column: 17, - }, - end: Position { - line: 260, - column: 18, - }, + close_brace: CloseBrace( + Position { + line: 260, + column: 17, }, - }, + ), }, }, ), @@ -42975,93 +30537,51 @@ Mod( Stmt( Try( TryStmt { - keyword: Slice { - source: "try", - loc: SourceLocation { - start: Position { - line: 261, - column: 1, - }, - end: Position { - line: 261, - column: 4, - }, + keyword: Try( + Position { + line: 261, + column: 1, }, - }, + ), block: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 261, - column: 4, - }, - end: Position { - line: 261, - column: 5, - }, + open_brace: OpenBrace( + Position { + line: 261, + column: 4, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 261, - column: 5, - }, - end: Position { - line: 261, - column: 6, - }, + close_brace: CloseBrace( + Position { + line: 261, + column: 5, }, - }, + ), }, handler: Some( CatchClause { - keyword: Slice { - source: "catch", - loc: SourceLocation { - start: Position { - line: 261, - column: 6, - }, - end: Position { - line: 261, - column: 11, - }, + keyword: Catch( + Position { + line: 261, + column: 6, }, - }, + ), param: Some( CatchArg { - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 261, - column: 11, - }, - end: Position { - line: 261, - column: 12, - }, + open_paren: OpenParen( + Position { + line: 261, + column: 11, }, - }, + ), param: Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 261, - column: 12, - }, - end: Position { - line: 261, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 261, + column: 12, }, - }, + ), props: [ ListEntry { item: Assign( @@ -43097,64 +30617,36 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 261, - column: 14, - }, - end: Position { - line: 261, - column: 15, - }, + close_brace: CloseBrace( + Position { + line: 261, + column: 14, }, - }, + ), }, ), - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 261, - column: 15, - }, - end: Position { - line: 261, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 261, + column: 15, }, - }, + ), }, ), body: BlockStmt { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 261, - column: 16, - }, - end: Position { - line: 261, - column: 17, - }, + open_brace: OpenBrace( + Position { + line: 261, + column: 16, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 261, - column: 17, - }, - end: Position { - line: 261, - column: 18, - }, + close_brace: CloseBrace( + Position { + line: 261, + column: 17, }, - }, + ), }, }, ), @@ -43165,19 +30657,12 @@ Mod( Decl( Class( Class { - keyword: Slice { - source: "class", - loc: SourceLocation { - start: Position { - line: 263, - column: 1, - }, - end: Position { - line: 263, - column: 6, - }, + keyword: Class( + Position { + line: 263, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -43197,33 +30682,19 @@ Mod( ), super_class: None, body: ClassBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 263, - column: 9, - }, - end: Position { - line: 263, - column: 10, - }, + open_brace: OpenBrace( + Position { + line: 263, + column: 9, }, - }, + ), props: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 263, - column: 10, - }, - end: Position { - line: 263, - column: 11, - }, + close_brace: CloseBrace( + Position { + line: 263, + column: 10, }, - }, + ), }, }, ), @@ -43231,19 +30702,12 @@ Mod( Decl( Class( Class { - keyword: Slice { - source: "class", - loc: SourceLocation { - start: Position { - line: 264, - column: 1, - }, - end: Position { - line: 264, - column: 6, - }, + keyword: Class( + Position { + line: 264, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -43263,34 +30727,20 @@ Mod( ), super_class: Some( SuperClass { - keyword_extends: Slice { - source: "extends", - loc: SourceLocation { - start: Position { - line: 264, - column: 9, - }, - end: Position { - line: 264, - column: 16, - }, + keyword_extends: Extends( + Position { + line: 264, + column: 9, }, - }, + ), expr: New( NewExpr { - keyword: Slice { - source: "new", - loc: SourceLocation { - start: Position { - line: 264, - column: 17, - }, - end: Position { - line: 264, - column: 20, - }, + keyword: New( + Position { + line: 264, + column: 17, }, - }, + ), callee: Ident( Ident { slice: Slice { @@ -43316,19 +30766,12 @@ Mod( }, ), body: ClassBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 264, - column: 23, - }, - end: Position { - line: 264, - column: 24, - }, + open_brace: OpenBrace( + Position { + line: 264, + column: 23, }, - }, + ), props: [ Ctor( PropCtor { @@ -43354,19 +30797,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 265, - column: 14, - }, - end: Position { - line: 265, - column: 15, - }, + open_paren: OpenParen( + Position { + line: 265, + column: 14, }, - }, + ), params: [ ListEntry { item: Pat( @@ -43389,19 +30825,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 16, - }, - end: Position { - line: 265, - column: 17, - }, + Comma( + Position { + line: 265, + column: 16, }, - }, + ), ), }, ListEntry { @@ -43426,19 +30855,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 265, - column: 20, - }, - end: Position { - line: 265, - column: 21, - }, + Equal( + Position { + line: 265, + column: 20, }, - }, + ), ), right: Lit( Number( @@ -43461,38 +30883,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 23, - }, - end: Position { - line: 265, - column: 24, - }, + Comma( + Position { + line: 265, + column: 23, }, - }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 265, - column: 25, - }, - end: Position { - line: 265, - column: 26, - }, + open_bracket: OpenBracket( + Position { + line: 265, + column: 25, }, - }, + ), elements: [ ListEntry { item: Some( @@ -43517,37 +30925,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 27, - }, - end: Position { - line: 265, - column: 28, - }, + Comma( + Position { + line: 265, + column: 27, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 28, - }, - end: Position { - line: 265, - column: 29, - }, + Comma( + Position { + line: 265, + column: 28, }, - }, + ), ), }, ListEntry { @@ -43573,19 +30967,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 265, - column: 32, - }, - end: Position { - line: 265, - column: 33, - }, + Equal( + Position { + line: 265, + column: 32, }, - }, + ), ), right: Lit( Number( @@ -43609,38 +30996,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 35, - }, - end: Position { - line: 265, - column: 36, - }, + Comma( + Position { + line: 265, + column: 35, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 265, - column: 37, - }, - end: Position { - line: 265, - column: 40, - }, + dots: Ellipsis( + Position { + line: 265, + column: 37, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -43664,55 +31037,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 265, - column: 41, - }, - end: Position { - line: 265, - column: 42, - }, + close_bracket: CloseBracket( + Position { + line: 265, + column: 41, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 42, - }, - end: Position { - line: 265, - column: 43, - }, + Comma( + Position { + line: 265, + column: 42, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 265, - column: 44, - }, - end: Position { - line: 265, - column: 45, - }, + open_brace: OpenBrace( + Position { + line: 265, + column: 44, }, - }, + ), props: [ ListEntry { item: Assign( @@ -43746,19 +31098,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 46, - }, - end: Position { - line: 265, - column: 47, - }, + Comma( + Position { + line: 265, + column: 46, }, - }, + ), ), }, ListEntry { @@ -43788,19 +31133,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 265, - column: 49, - }, - end: Position { - line: 265, - column: 50, - }, + Colon( + Position { + line: 265, + column: 49, }, - }, + ), ), value: Some( Pat( @@ -43827,19 +31165,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 52, - }, - end: Position { - line: 265, - column: 53, - }, + Comma( + Position { + line: 265, + column: 52, }, - }, + ), ), }, ListEntry { @@ -43891,19 +31222,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 265, - column: 56, - }, - end: Position { - line: 265, - column: 57, - }, + Equal( + Position { + line: 265, + column: 56, }, - }, + ), ), right: Lit( Number( @@ -43930,19 +31254,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 59, - }, - end: Position { - line: 265, - column: 60, - }, + Comma( + Position { + line: 265, + column: 59, }, - }, + ), ), }, ListEntry { @@ -43972,19 +31289,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 265, - column: 62, - }, - end: Position { - line: 265, - column: 63, - }, + Colon( + Position { + line: 265, + column: 62, }, - }, + ), ), value: Some( Pat( @@ -44008,19 +31318,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 265, - column: 66, - }, - end: Position { - line: 265, - column: 67, - }, + Equal( + Position { + line: 265, + column: 66, }, - }, + ), ), right: Lit( Number( @@ -44049,54 +31352,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 265, - column: 69, - }, - end: Position { - line: 265, - column: 70, - }, + close_brace: CloseBrace( + Position { + line: 265, + column: 69, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 265, - column: 70, - }, - end: Position { - line: 265, - column: 71, - }, + Comma( + Position { + line: 265, + column: 70, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 265, - column: 72, - }, - end: Position { - line: 265, - column: 75, - }, + dots: Ellipsis( + Position { + line: 265, + column: 72, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -44119,66 +31401,38 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 265, - column: 76, - }, - end: Position { - line: 265, - column: 77, - }, + close_paren: CloseParen( + Position { + line: 265, + column: 76, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 265, - column: 78, - }, - end: Position { - line: 265, - column: 79, - }, + open_brace: OpenBrace( + Position { + line: 265, + column: 78, }, - }, + ), stmts: [ Stmt( Expr { expr: Call( CallExpr { callee: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 266, - column: 5, - }, - end: Position { - line: 266, - column: 10, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 266, - column: 10, - }, - end: Position { + Super( + Position { line: 266, - column: 11, + column: 5, }, + ), + ), + open_paren: OpenParen( + Position { + line: 266, + column: 10, }, - }, + ), arguments: [ ListEntry { item: MetaProp( @@ -44198,19 +31452,12 @@ Mod( }, }, }, - dot: Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 266, - column: 14, - }, - end: Position { - line: 266, - column: 15, - }, + dot: Period( + Position { + line: 266, + column: 14, }, - }, + ), property: Ident { slice: Slice { source: "target", @@ -44231,35 +31478,21 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 266, - column: 21, - }, - end: Position { - line: 266, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 266, + column: 21, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 266, - column: 22, - }, - end: Position { - line: 266, - column: 23, - }, + Semicolon( + Position { + line: 266, + column: 22, }, - }, + ), ), }, ), @@ -44270,66 +31503,40 @@ Mod( tag: Call( CallExpr { callee: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 267, - column: 5, - }, - end: Position { - line: 267, - column: 10, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 267, - column: 10, - }, - end: Position { + Super( + Position { line: 267, - column: 11, + column: 5, }, + ), + ), + open_paren: OpenParen( + Position { + line: 267, + column: 10, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 267, - column: 11, - }, - end: Position { - line: 267, - column: 12, - }, + close_paren: CloseParen( + Position { + line: 267, + column: 11, }, - }, + ), }, ), quasi: TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`template`", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 267, column: 12, }, - end: Position { - line: 267, - column: 22, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "template", loc: SourceLocation { start: Position { @@ -44342,6 +31549,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 267, + column: 21, + }, + ), + ), }, ], expressions: [], @@ -44349,19 +31564,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 267, - column: 22, - }, - end: Position { - line: 267, - column: 23, - }, + Semicolon( + Position { + line: 267, + column: 22, }, - }, + ), ), }, ), @@ -44372,149 +31580,86 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 268, - column: 5, - }, - end: Position { - line: 268, - column: 6, - }, + OpenParen( + Position { + line: 268, + column: 5, }, - }, + ), ), params: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 268, - column: 6, - }, - end: Position { - line: 268, - column: 7, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { - line: 268, - column: 8, - }, - end: Position { + CloseParen( + Position { line: 268, - column: 10, + column: 6, }, + ), + ), + arrow: FatArrow( + Position { + line: 268, + column: 8, }, - }, + ), body: Expr( Call( CallExpr { callee: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 268, - column: 11, - }, - end: Position { - line: 268, - column: 16, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + Super( + Position { line: 268, - column: 16, - }, - end: Position { - line: 268, - column: 17, + column: 11, }, + ), + ), + open_paren: OpenParen( + Position { + line: 268, + column: 16, }, - }, + ), arguments: [ ListEntry { item: This( - Slice { - source: "this", - loc: SourceLocation { - start: Position { - line: 268, - column: 17, - }, - end: Position { - line: 268, - column: 21, - }, + This( + Position { + line: 268, + column: 17, }, - }, + ), ), comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 268, - column: 21, - }, - end: Position { - line: 268, - column: 22, - }, + close_paren: CloseParen( + Position { + line: 268, + column: 21, }, - }, + ), }, ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 268, - column: 22, - }, - end: Position { - line: 268, - column: 23, - }, + Semicolon( + Position { + line: 268, + column: 22, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 269, - column: 3, - }, - end: Position { - line: 269, - column: 4, - }, + close_brace: CloseBrace( + Position { + line: 269, + column: 3, }, - }, + ), }, }, ), @@ -44545,19 +31690,12 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 270, - column: 4, - }, - end: Position { - line: 270, - column: 5, - }, + open_paren: OpenParen( + Position { + line: 270, + column: 4, }, - }, + ), params: [ ListEntry { item: Pat( @@ -44580,19 +31718,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 6, - }, - end: Position { - line: 270, - column: 7, - }, + Comma( + Position { + line: 270, + column: 6, }, - }, + ), ), }, ListEntry { @@ -44617,19 +31748,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 270, - column: 10, - }, - end: Position { - line: 270, - column: 11, - }, + Equal( + Position { + line: 270, + column: 10, }, - }, + ), ), right: Lit( Number( @@ -44649,41 +31773,27 @@ Mod( ), ), }, - ), - ), - comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 13, - }, - end: Position { - line: 270, - column: 14, - }, - }, - }, + ), + ), + comma: Some( + Comma( + Position { + line: 270, + column: 13, + }, + ), ), }, ListEntry { item: Pat( Array( ArrayPat { - open_bracket: Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 270, - column: 15, - }, - end: Position { - line: 270, - column: 16, - }, + open_bracket: OpenBracket( + Position { + line: 270, + column: 15, }, - }, + ), elements: [ ListEntry { item: Some( @@ -44708,37 +31818,23 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 17, - }, - end: Position { - line: 270, - column: 18, - }, + Comma( + Position { + line: 270, + column: 17, }, - }, + ), ), }, ListEntry { item: None, comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 18, - }, - end: Position { - line: 270, - column: 19, - }, + Comma( + Position { + line: 270, + column: 18, }, - }, + ), ), }, ListEntry { @@ -44764,19 +31860,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 270, - column: 22, - }, - end: Position { - line: 270, - column: 23, - }, + Equal( + Position { + line: 270, + column: 22, }, - }, + ), ), right: Lit( Number( @@ -44800,38 +31889,24 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 25, - }, - end: Position { - line: 270, - column: 26, - }, + Comma( + Position { + line: 270, + column: 25, }, - }, + ), ), }, ListEntry { item: Some( Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 270, - column: 27, - }, - end: Position { - line: 270, - column: 30, - }, + dots: Ellipsis( + Position { + line: 270, + column: 27, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -44855,55 +31930,34 @@ Mod( comma: None, }, ], - close_bracket: Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 270, - column: 31, - }, - end: Position { - line: 270, - column: 32, - }, + close_bracket: CloseBracket( + Position { + line: 270, + column: 31, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 32, - }, - end: Position { - line: 270, - column: 33, - }, + Comma( + Position { + line: 270, + column: 32, }, - }, + ), ), }, ListEntry { item: Pat( Obj( ObjPat { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 270, - column: 34, - }, - end: Position { - line: 270, - column: 35, - }, + open_brace: OpenBrace( + Position { + line: 270, + column: 34, }, - }, + ), props: [ ListEntry { item: Assign( @@ -44937,19 +31991,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 36, - }, - end: Position { - line: 270, - column: 37, - }, + Comma( + Position { + line: 270, + column: 36, }, - }, + ), ), }, ListEntry { @@ -44979,19 +32026,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 270, - column: 39, - }, - end: Position { - line: 270, - column: 40, - }, + Colon( + Position { + line: 270, + column: 39, }, - }, + ), ), value: Some( Pat( @@ -45018,19 +32058,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 42, - }, - end: Position { - line: 270, - column: 43, - }, + Comma( + Position { + line: 270, + column: 42, }, - }, + ), ), }, ListEntry { @@ -45082,19 +32115,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 270, - column: 46, - }, - end: Position { - line: 270, - column: 47, - }, + Equal( + Position { + line: 270, + column: 46, }, - }, + ), ), right: Lit( Number( @@ -45121,19 +32147,12 @@ Mod( ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 49, - }, - end: Position { - line: 270, - column: 50, - }, + Comma( + Position { + line: 270, + column: 49, }, - }, + ), ), }, ListEntry { @@ -45163,19 +32182,12 @@ Mod( brackets: None, }, colon: Some( - Slice { - source: ":", - loc: SourceLocation { - start: Position { - line: 270, - column: 52, - }, - end: Position { - line: 270, - column: 53, - }, + Colon( + Position { + line: 270, + column: 52, }, - }, + ), ), value: Some( Pat( @@ -45199,19 +32211,12 @@ Mod( }, ), operator: Equal( - Slice { - source: "=", - loc: SourceLocation { - start: Position { - line: 270, - column: 56, - }, - end: Position { - line: 270, - column: 57, - }, + Equal( + Position { + line: 270, + column: 56, }, - }, + ), ), right: Lit( Number( @@ -45240,54 +32245,33 @@ Mod( comma: None, }, ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 270, - column: 59, - }, - end: Position { - line: 270, - column: 60, - }, + close_brace: CloseBrace( + Position { + line: 270, + column: 59, }, - }, + ), }, ), ), comma: Some( - Slice { - source: ",", - loc: SourceLocation { - start: Position { - line: 270, - column: 60, - }, - end: Position { - line: 270, - column: 61, - }, + Comma( + Position { + line: 270, + column: 60, }, - }, + ), ), }, ListEntry { item: Rest( RestPat { - dots: Slice { - source: "...", - loc: SourceLocation { - start: Position { - line: 270, - column: 62, - }, - end: Position { - line: 270, - column: 65, - }, + dots: Ellipsis( + Position { + line: 270, + column: 62, }, - }, + ), pat: Ident( Ident { slice: Slice { @@ -45310,33 +32294,19 @@ Mod( comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 270, - column: 66, - }, - end: Position { - line: 270, - column: 67, - }, + close_paren: CloseParen( + Position { + line: 270, + column: 66, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 270, - column: 68, - }, - end: Position { - line: 270, - column: 69, - }, + open_brace: OpenBrace( + Position { + line: 270, + column: 68, }, - }, + ), stmts: [ Stmt( Expr { @@ -45345,19 +32315,12 @@ Mod( callee: Member( MemberExpr { object: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 271, - column: 5, - }, - end: Position { - line: 271, - column: 10, - }, + Super( + Position { + line: 271, + column: 5, }, - }, + ), ), property: Ident( Ident { @@ -45377,65 +32340,37 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 271, - column: 10, - }, - end: Position { - line: 271, - column: 11, - }, + Period( + Position { + line: 271, + column: 10, }, - }, + ), ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 271, - column: 12, - }, - end: Position { - line: 271, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 271, + column: 12, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 271, - column: 13, - }, - end: Position { - line: 271, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 271, + column: 13, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 271, - column: 14, - }, - end: Position { - line: 271, - column: 15, - }, + Semicolon( + Position { + line: 271, + column: 14, }, - }, + ), ), }, ), @@ -45446,19 +32381,12 @@ Mod( tag: Member( MemberExpr { object: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 272, - column: 5, - }, - end: Position { - line: 272, - column: 10, - }, + Super( + Position { + line: 272, + column: 5, }, - }, + ), ), property: Ident( Ident { @@ -45478,39 +32406,27 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 272, - column: 10, - }, - end: Position { - line: 272, - column: 11, - }, + Period( + Position { + line: 272, + column: 10, }, - }, + ), ), }, ), quasi: TemplateLit { quasis: [ TemplateElement { - raw: Slice { - source: "`template`", - loc: SourceLocation { - start: Position { + open_quote: BackTick( + BackTick( + Position { line: 272, column: 12, }, - end: Position { - line: 272, - column: 22, - }, - }, - }, - cooked: Slice { + ), + ), + content: Slice { source: "template", loc: SourceLocation { start: Position { @@ -45523,6 +32439,14 @@ Mod( }, }, }, + close_quote: BackTick( + BackTick( + Position { + line: 272, + column: 21, + }, + ), + ), }, ], expressions: [], @@ -45530,19 +32454,12 @@ Mod( }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 272, - column: 22, - }, - end: Position { - line: 272, - column: 23, - }, + Semicolon( + Position { + line: 272, + column: 22, }, - }, + ), ), }, ), @@ -45553,68 +32470,40 @@ Mod( keyword: None, star: None, open_paren: Some( - Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 273, - column: 5, - }, - end: Position { - line: 273, - column: 6, - }, + OpenParen( + Position { + line: 273, + column: 5, }, - }, + ), ), params: [], close_paren: Some( - Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 273, - column: 6, - }, - end: Position { - line: 273, - column: 7, - }, - }, - }, - ), - arrow: Slice { - source: "=>", - loc: SourceLocation { - start: Position { + CloseParen( + Position { line: 273, - column: 8, - }, - end: Position { - line: 273, - column: 10, + column: 6, }, + ), + ), + arrow: FatArrow( + Position { + line: 273, + column: 8, }, - }, + ), body: Expr( Call( CallExpr { callee: Member( MemberExpr { object: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 273, - column: 11, - }, - end: Position { - line: 273, - column: 16, - }, + Super( + Position { + line: 273, + column: 11, }, - }, + ), ), property: Ident( Ident { @@ -45634,123 +32523,74 @@ Mod( }, ), indexer: Period( - Slice { - source: ".", - loc: SourceLocation { - start: Position { - line: 273, - column: 16, - }, - end: Position { - line: 273, - column: 17, - }, + Period( + Position { + line: 273, + column: 16, }, - }, + ), ), }, ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 273, - column: 18, - }, - end: Position { - line: 273, - column: 19, - }, + open_paren: OpenParen( + Position { + line: 273, + column: 18, }, - }, + ), arguments: [ ListEntry { item: This( - Slice { - source: "this", - loc: SourceLocation { - start: Position { - line: 273, - column: 19, - }, - end: Position { - line: 273, - column: 23, - }, + This( + Position { + line: 273, + column: 19, }, - }, + ), ), comma: None, }, ], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 273, - column: 23, - }, - end: Position { - line: 273, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 273, + column: 23, }, - }, + ), }, ), ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 273, - column: 24, - }, - end: Position { - line: 273, - column: 25, - }, + Semicolon( + Position { + line: 273, + column: 24, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 274, - column: 3, - }, - end: Position { - line: 274, - column: 4, - }, + close_brace: CloseBrace( + Position { + line: 274, + column: 3, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 278, - column: 3, - }, - end: Position { - line: 278, - column: 9, - }, + Static( + Position { + line: 278, + column: 3, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -45776,99 +32616,59 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 278, - column: 11, - }, - end: Position { - line: 278, - column: 12, - }, + open_paren: OpenParen( + Position { + line: 278, + column: 11, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 278, - column: 12, - }, - end: Position { - line: 278, - column: 13, - }, + close_paren: CloseParen( + Position { + line: 278, + column: 12, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 278, - column: 13, - }, - end: Position { - line: 278, - column: 14, - }, + open_brace: OpenBrace( + Position { + line: 278, + column: 13, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 278, - column: 14, - }, - end: Position { - line: 278, - column: 15, - }, + close_brace: CloseBrace( + Position { + line: 278, + column: 14, }, - }, + ), }, }, ), Method( - PropMethod { - keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 278, - column: 16, - }, - end: Position { - line: 278, - column: 22, - }, + PropMethod { + keyword_static: Some( + Static( + Position { + line: 278, + column: 16, }, - }, + ), ), keyword_async: None, id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 278, column: 23, }, - end: Position { - line: 278, - column: 24, - }, - }, - }, + ), + ), content: Slice { source: "b", loc: SourceLocation { @@ -45882,99 +32682,59 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 278, column: 25, }, - end: Position { - line: 278, - column: 26, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 278, - column: 26, - }, - end: Position { - line: 278, - column: 27, - }, + open_paren: OpenParen( + Position { + line: 278, + column: 26, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 278, - column: 27, - }, - end: Position { - line: 278, - column: 28, - }, + close_paren: CloseParen( + Position { + line: 278, + column: 27, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 278, - column: 28, - }, - end: Position { - line: 278, - column: 29, - }, + open_brace: OpenBrace( + Position { + line: 278, + column: 28, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 278, - column: 29, - }, - end: Position { - line: 278, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 278, + column: 29, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 278, - column: 31, - }, - end: Position { - line: 278, - column: 37, - }, + Static( + Position { + line: 278, + column: 31, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -45998,80 +32758,45 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 278, - column: 39, - }, - end: Position { - line: 278, - column: 40, - }, + open_paren: OpenParen( + Position { + line: 278, + column: 39, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 278, - column: 40, - }, - end: Position { - line: 278, - column: 41, - }, + close_paren: CloseParen( + Position { + line: 278, + column: 40, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 278, - column: 41, - }, - end: Position { - line: 278, - column: 42, - }, + open_brace: OpenBrace( + Position { + line: 278, + column: 41, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 278, - column: 42, - }, - end: Position { - line: 278, - column: 43, - }, + close_brace: CloseBrace( + Position { + line: 278, + column: 42, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 278, - column: 44, - }, - end: Position { - line: 278, - column: 50, - }, + Static( + Position { + line: 278, + column: 44, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46094,110 +32819,61 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 278, - column: 51, - }, - end: Position { - line: 278, - column: 52, - }, + OpenBracket( + Position { + line: 278, + column: 51, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 278, - column: 53, - }, - end: Position { - line: 278, - column: 54, - }, + ), + CloseBracket( + Position { + line: 278, + column: 53, }, - }, + ), ), ), }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 278, - column: 54, - }, - end: Position { - line: 278, - column: 55, - }, + open_paren: OpenParen( + Position { + line: 278, + column: 54, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 278, - column: 55, - }, - end: Position { - line: 278, - column: 56, - }, + close_paren: CloseParen( + Position { + line: 278, + column: 55, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 278, - column: 56, - }, - end: Position { - line: 278, - column: 57, - }, + open_brace: OpenBrace( + Position { + line: 278, + column: 56, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 278, - column: 57, - }, - end: Position { - line: 278, - column: 58, - }, + close_brace: CloseBrace( + Position { + line: 278, + column: 57, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 279, - column: 3, - }, - end: Position { - line: 279, - column: 9, - }, + Static( + Position { + line: 279, + column: 3, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46223,152 +32899,91 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 279, - column: 10, - }, - end: Position { - line: 279, - column: 11, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 279, - column: 12, - }, - end: Position { + Asterisk( + Position { line: 279, - column: 13, + column: 10, }, + ), + ), + open_paren: OpenParen( + Position { + line: 279, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 279, - column: 13, - }, - end: Position { - line: 279, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 279, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 279, - column: 14, - }, - end: Position { - line: 279, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 279, + column: 14, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 279, - column: 16, - }, - end: Position { - line: 279, - column: 21, - }, + keyword: Yield( + Position { + line: 279, + column: 16, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 279, - column: 21, - }, - end: Position { - line: 279, - column: 22, - }, + Semicolon( + Position { + line: 279, + column: 21, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 279, - column: 23, - }, - end: Position { - line: 279, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 279, + column: 23, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 279, - column: 25, - }, - end: Position { - line: 279, - column: 31, - }, + Static( + Position { + line: 279, + column: 25, }, - }, + ), ), keyword_async: None, id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 279, column: 33, }, - end: Position { - line: 279, - column: 34, - }, - }, - }, + ), + ), content: Slice { source: "d", loc: SourceLocation { @@ -46382,152 +32997,91 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 279, column: 35, }, - end: Position { - line: 279, - column: 36, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 279, - column: 32, - }, - end: Position { - line: 279, - column: 33, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 279, - column: 36, - }, - end: Position { + Asterisk( + Position { line: 279, - column: 37, + column: 32, }, + ), + ), + open_paren: OpenParen( + Position { + line: 279, + column: 36, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 279, - column: 37, - }, - end: Position { - line: 279, - column: 38, - }, + close_paren: CloseParen( + Position { + line: 279, + column: 37, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 279, - column: 39, - }, - end: Position { - line: 279, - column: 40, - }, + open_brace: OpenBrace( + Position { + line: 279, + column: 39, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 279, - column: 41, - }, - end: Position { - line: 279, - column: 46, - }, + keyword: Yield( + Position { + line: 279, + column: 41, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 279, - column: 46, - }, - end: Position { - line: 279, - column: 47, - }, + Semicolon( + Position { + line: 279, + column: 46, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 279, - column: 48, - }, - end: Position { - line: 279, - column: 49, - }, + close_brace: CloseBrace( + Position { + line: 279, + column: 48, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 279, - column: 50, - }, - end: Position { - line: 279, - column: 56, - }, + Static( + Position { + line: 279, + column: 50, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46551,133 +33105,77 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 279, - column: 57, - }, - end: Position { - line: 279, - column: 58, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 279, - column: 59, - }, - end: Position { + Asterisk( + Position { line: 279, - column: 60, + column: 57, }, + ), + ), + open_paren: OpenParen( + Position { + line: 279, + column: 59, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 279, - column: 60, - }, - end: Position { - line: 279, - column: 61, - }, + close_paren: CloseParen( + Position { + line: 279, + column: 60, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 279, - column: 61, - }, - end: Position { - line: 279, - column: 62, - }, + open_brace: OpenBrace( + Position { + line: 279, + column: 61, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 279, - column: 63, - }, - end: Position { - line: 279, - column: 68, - }, + keyword: Yield( + Position { + line: 279, + column: 63, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 279, - column: 68, - }, - end: Position { - line: 279, - column: 69, - }, + Semicolon( + Position { + line: 279, + column: 68, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 279, - column: 70, - }, - end: Position { - line: 279, - column: 71, - }, + close_brace: CloseBrace( + Position { + line: 279, + column: 70, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 279, - column: 72, - }, - end: Position { - line: 279, - column: 78, - }, + Static( + Position { + line: 279, + column: 72, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46700,163 +33198,93 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 279, - column: 80, - }, - end: Position { - line: 279, - column: 81, - }, + OpenBracket( + Position { + line: 279, + column: 80, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 279, - column: 82, - }, - end: Position { - line: 279, - column: 83, - }, + ), + CloseBracket( + Position { + line: 279, + column: 82, }, - }, + ), ), ), }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 279, - column: 79, - }, - end: Position { - line: 279, - column: 80, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 279, - column: 83, - }, - end: Position { + Asterisk( + Position { line: 279, - column: 84, + column: 79, }, + ), + ), + open_paren: OpenParen( + Position { + line: 279, + column: 83, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 279, - column: 84, - }, - end: Position { - line: 279, - column: 85, - }, + close_paren: CloseParen( + Position { + line: 279, + column: 84, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 279, - column: 85, - }, - end: Position { - line: 279, - column: 86, - }, + open_brace: OpenBrace( + Position { + line: 279, + column: 85, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 279, - column: 87, - }, - end: Position { - line: 279, - column: 92, - }, + keyword: Yield( + Position { + line: 279, + column: 87, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 279, - column: 92, - }, - end: Position { - line: 279, - column: 93, - }, + Semicolon( + Position { + line: 279, + column: 92, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 279, - column: 94, - }, - end: Position { - line: 279, - column: 95, - }, + close_brace: CloseBrace( + Position { + line: 279, + column: 94, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 280, - column: 3, - }, - end: Position { - line: 280, - column: 9, - }, + Static( + Position { + line: 280, + column: 3, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46882,80 +33310,45 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 280, - column: 13, - }, - end: Position { - line: 280, - column: 14, - }, + open_paren: OpenParen( + Position { + line: 280, + column: 13, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 280, - column: 14, - }, - end: Position { - line: 280, - column: 15, - }, + close_paren: CloseParen( + Position { + line: 280, + column: 14, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 280, - column: 15, - }, - end: Position { - line: 280, - column: 16, - }, + open_brace: OpenBrace( + Position { + line: 280, + column: 15, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 280, - column: 16, - }, - end: Position { - line: 280, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 280, + column: 16, }, - }, + ), }, }, ), Method( PropMethod { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 280, - column: 18, - }, - end: Position { - line: 280, - column: 24, - }, + Static( + Position { + line: 280, + column: 18, }, - }, + ), ), keyword_async: None, id: PropInitKey { @@ -46981,108 +33374,59 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 280, - column: 25, - }, - end: Position { - line: 280, - column: 26, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 280, - column: 28, - }, - end: Position { + Asterisk( + Position { line: 280, - column: 29, + column: 25, }, + ), + ), + open_paren: OpenParen( + Position { + line: 280, + column: 28, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 280, - column: 29, - }, - end: Position { - line: 280, - column: 30, - }, + close_paren: CloseParen( + Position { + line: 280, + column: 29, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 280, - column: 30, - }, - end: Position { - line: 280, - column: 31, - }, + open_brace: OpenBrace( + Position { + line: 280, + column: 30, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 280, - column: 31, - }, - end: Position { - line: 280, - column: 32, - }, + close_brace: CloseBrace( + Position { + line: 280, + column: 31, }, - }, + ), }, }, ), Get( PropGet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 282, - column: 3, - }, - end: Position { - line: 282, - column: 9, - }, - }, - }, - ), - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 282, - column: 10, - }, - end: Position { + Static( + Position { line: 282, - column: 13, + column: 3, }, + ), + ), + keyword_get: Get( + Position { + line: 282, + column: 10, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -47105,110 +33449,63 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 282, - column: 15, - }, - end: Position { - line: 282, - column: 16, - }, + open_paren: OpenParen( + Position { + line: 282, + column: 15, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 282, - column: 16, - }, - end: Position { - line: 282, - column: 17, - }, + ), + close_paren: CloseParen( + Position { + line: 282, + column: 16, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 282, - column: 17, - }, - end: Position { - line: 282, - column: 18, - }, + open_brace: OpenBrace( + Position { + line: 282, + column: 17, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 282, - column: 18, - }, - end: Position { - line: 282, - column: 19, - }, + close_brace: CloseBrace( + Position { + line: 282, + column: 18, }, - }, + ), }, }, ), Get( PropGet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 282, - column: 20, - }, - end: Position { - line: 282, - column: 26, - }, - }, - }, - ), - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 282, - column: 27, - }, - end: Position { + Static( + Position { line: 282, - column: 30, + column: 20, }, + ), + ), + keyword_get: Get( + Position { + line: 282, + column: 27, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 282, column: 31, }, - end: Position { - line: 282, - column: 32, - }, - }, - }, + ), + ), content: Slice { source: "f", loc: SourceLocation { @@ -47222,111 +33519,64 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 282, column: 33, }, - end: Position { - line: 282, - column: 34, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 282, - column: 34, - }, - end: Position { - line: 282, - column: 35, - }, + open_paren: OpenParen( + Position { + line: 282, + column: 34, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 282, - column: 35, - }, - end: Position { - line: 282, - column: 36, - }, + ), + close_paren: CloseParen( + Position { + line: 282, + column: 35, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 282, - column: 36, - }, - end: Position { - line: 282, - column: 37, - }, + open_brace: OpenBrace( + Position { + line: 282, + column: 36, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 282, - column: 37, - }, - end: Position { - line: 282, - column: 38, - }, + close_brace: CloseBrace( + Position { + line: 282, + column: 37, }, - }, + ), }, }, ), Get( PropGet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 282, - column: 39, - }, - end: Position { - line: 282, - column: 45, - }, - }, - }, - ), - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 282, - column: 46, - }, - end: Position { + Static( + Position { line: 282, - column: 49, + column: 39, }, + ), + ), + keyword_get: Get( + Position { + line: 282, + column: 46, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -47347,93 +33597,51 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 282, - column: 51, - }, - end: Position { - line: 282, - column: 52, - }, + open_paren: OpenParen( + Position { + line: 282, + column: 51, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 282, - column: 52, - }, - end: Position { - line: 282, - column: 53, - }, + ), + close_paren: CloseParen( + Position { + line: 282, + column: 52, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 282, - column: 53, - }, - end: Position { - line: 282, - column: 54, - }, + open_brace: OpenBrace( + Position { + line: 282, + column: 53, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 282, - column: 54, - }, - end: Position { - line: 282, - column: 55, - }, + close_brace: CloseBrace( + Position { + line: 282, + column: 54, }, - }, + ), }, }, ), Get( PropGet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 282, - column: 56, - }, - end: Position { - line: 282, - column: 62, - }, - }, - }, - ), - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 282, - column: 63, - }, - end: Position { + Static( + Position { line: 282, - column: 66, + column: 56, }, + ), + ), + keyword_get: Get( + Position { + line: 282, + column: 63, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -47454,122 +33662,66 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 282, - column: 67, - }, - end: Position { - line: 282, - column: 68, - }, + OpenBracket( + Position { + line: 282, + column: 67, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 282, - column: 69, - }, - end: Position { - line: 282, - column: 70, - }, + ), + CloseBracket( + Position { + line: 282, + column: 69, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 282, - column: 70, - }, - end: Position { - line: 282, - column: 71, - }, - }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 282, - column: 71, - }, - end: Position { - line: 282, - column: 72, - }, + open_paren: OpenParen( + Position { + line: 282, + column: 70, }, - }, - body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 282, - column: 72, - }, - end: Position { - line: 282, - column: 73, - }, - }, + ), + close_paren: CloseParen( + Position { + line: 282, + column: 71, }, + ), + body: FuncBody { + open_brace: OpenBrace( + Position { + line: 282, + column: 72, + }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 282, - column: 73, - }, - end: Position { - line: 282, - column: 74, - }, + close_brace: CloseBrace( + Position { + line: 282, + column: 73, }, - }, + ), }, }, ), Set( PropSet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 283, - column: 3, - }, - end: Position { - line: 283, - column: 9, - }, - }, - }, - ), - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 283, - column: 10, - }, - end: Position { + Static( + Position { line: 283, - column: 13, + column: 3, }, + ), + ), + keyword_set: Set( + Position { + line: 283, + column: 10, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -47592,19 +33744,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 283, - column: 15, - }, - end: Position { - line: 283, - column: 16, - }, + open_paren: OpenParen( + Position { + line: 283, + column: 15, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -47627,97 +33772,57 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 283, - column: 17, - }, - end: Position { - line: 283, - column: 18, - }, + close_paren: CloseParen( + Position { + line: 283, + column: 17, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 283, - column: 18, - }, - end: Position { - line: 283, - column: 19, - }, + open_brace: OpenBrace( + Position { + line: 283, + column: 18, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 283, - column: 19, - }, - end: Position { - line: 283, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 283, + column: 19, }, - }, + ), }, }, ), Set( PropSet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 283, - column: 21, - }, - end: Position { - line: 283, - column: 27, - }, - }, - }, - ), - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 283, - column: 28, - }, - end: Position { + Static( + Position { line: 283, - column: 31, + column: 21, }, + ), + ), + keyword_set: Set( + Position { + line: 283, + column: 28, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 283, column: 32, }, - end: Position { - line: 283, - column: 33, - }, - }, - }, + ), + ), content: Slice { source: "h", loc: SourceLocation { @@ -47731,37 +33836,25 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 283, column: 34, }, - end: Position { - line: 283, - column: 35, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 283, - column: 35, - }, - end: Position { - line: 283, - column: 36, - }, + open_paren: OpenParen( + Position { + line: 283, + column: 35, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -47784,80 +33877,45 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 283, - column: 37, - }, - end: Position { - line: 283, - column: 38, - }, + close_paren: CloseParen( + Position { + line: 283, + column: 37, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 283, - column: 38, - }, - end: Position { - line: 283, - column: 39, - }, + open_brace: OpenBrace( + Position { + line: 283, + column: 38, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 283, - column: 39, - }, - end: Position { - line: 283, - column: 40, - }, + close_brace: CloseBrace( + Position { + line: 283, + column: 39, }, - }, + ), }, }, ), Set( PropSet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 283, - column: 41, - }, - end: Position { - line: 283, - column: 47, - }, - }, - }, - ), - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 283, - column: 48, - }, - end: Position { + Static( + Position { line: 283, - column: 51, + column: 41, }, + ), + ), + keyword_set: Set( + Position { + line: 283, + column: 48, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -47878,19 +33936,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 283, - column: 53, - }, - end: Position { - line: 283, - column: 54, - }, + open_paren: OpenParen( + Position { + line: 283, + column: 53, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -47913,80 +33964,45 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 283, - column: 55, - }, - end: Position { - line: 283, - column: 56, - }, + close_paren: CloseParen( + Position { + line: 283, + column: 55, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 283, - column: 56, - }, - end: Position { - line: 283, - column: 57, - }, + open_brace: OpenBrace( + Position { + line: 283, + column: 56, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 283, - column: 57, - }, - end: Position { - line: 283, - column: 58, - }, + close_brace: CloseBrace( + Position { + line: 283, + column: 57, }, - }, + ), }, }, ), Set( PropSet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 283, - column: 59, - }, - end: Position { - line: 283, - column: 65, - }, - }, - }, - ), - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 283, - column: 66, - }, - end: Position { + Static( + Position { line: 283, - column: 69, + column: 59, }, + ), + ), + keyword_set: Set( + Position { + line: 283, + column: 66, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -48007,48 +34023,27 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 283, - column: 70, - }, - end: Position { - line: 283, - column: 71, - }, + OpenBracket( + Position { + line: 283, + column: 70, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 283, - column: 72, - }, - end: Position { - line: 283, - column: 73, - }, + ), + CloseBracket( + Position { + line: 283, + column: 72, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 283, - column: 73, - }, - end: Position { - line: 283, - column: 74, - }, + open_paren: OpenParen( + Position { + line: 283, + column: 73, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -48071,80 +34066,45 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 283, - column: 75, - }, - end: Position { - line: 283, - column: 76, - }, + close_paren: CloseParen( + Position { + line: 283, + column: 75, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 283, - column: 76, - }, - end: Position { - line: 283, - column: 77, - }, + open_brace: OpenBrace( + Position { + line: 283, + column: 76, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 283, - column: 77, - }, - end: Position { - line: 283, - column: 78, - }, + close_brace: CloseBrace( + Position { + line: 283, + column: 77, }, - }, + ), }, }, ), Get( PropGet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 284, - column: 3, - }, - end: Position { - line: 284, - column: 9, - }, - }, - }, - ), - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 284, - column: 10, - }, - end: Position { + Static( + Position { line: 284, - column: 13, + column: 3, }, + ), + ), + keyword_get: Get( + Position { + line: 284, + column: 10, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -48167,93 +34127,51 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 284, - column: 16, - }, - end: Position { - line: 284, - column: 17, - }, + open_paren: OpenParen( + Position { + line: 284, + column: 16, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 284, - column: 17, - }, - end: Position { - line: 284, - column: 18, - }, + ), + close_paren: CloseParen( + Position { + line: 284, + column: 17, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 284, - column: 18, - }, - end: Position { - line: 284, - column: 19, - }, + open_brace: OpenBrace( + Position { + line: 284, + column: 18, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 284, - column: 19, - }, - end: Position { - line: 284, - column: 20, - }, + close_brace: CloseBrace( + Position { + line: 284, + column: 19, }, - }, + ), }, }, ), Set( PropSet { keyword_static: Some( - Slice { - source: "static", - loc: SourceLocation { - start: Position { - line: 284, - column: 21, - }, - end: Position { - line: 284, - column: 27, - }, - }, - }, - ), - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 284, - column: 28, - }, - end: Position { + Static( + Position { line: 284, - column: 31, + column: 21, }, + ), + ), + keyword_set: Set( + Position { + line: 284, + column: 28, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -48276,19 +34194,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 284, - column: 34, - }, - end: Position { - line: 284, - column: 35, - }, + open_paren: OpenParen( + Position { + line: 284, + column: 34, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -48311,47 +34222,26 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 284, - column: 36, - }, - end: Position { - line: 284, - column: 37, - }, + close_paren: CloseParen( + Position { + line: 284, + column: 36, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 284, - column: 37, - }, - end: Position { - line: 284, - column: 38, - }, + open_brace: OpenBrace( + Position { + line: 284, + column: 37, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 284, - column: 38, - }, - end: Position { - line: 284, - column: 39, - }, + close_brace: CloseBrace( + Position { + line: 284, + column: 38, }, - }, + ), }, }, ), @@ -48382,61 +34272,33 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 286, - column: 4, - }, - end: Position { - line: 286, - column: 5, - }, + open_paren: OpenParen( + Position { + line: 286, + column: 4, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 286, - column: 5, - }, - end: Position { - line: 286, - column: 6, - }, + close_paren: CloseParen( + Position { + line: 286, + column: 5, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 286, - column: 6, - }, - end: Position { - line: 286, - column: 7, - }, - }, - }, - stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 286, - column: 7, - }, - end: Position { - line: 286, - column: 8, - }, + open_brace: OpenBrace( + Position { + line: 286, + column: 6, }, - }, + ), + stmts: [], + close_brace: CloseBrace( + Position { + line: 286, + column: 7, + }, + ), }, }, ), @@ -48448,19 +34310,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 286, column: 9, }, - end: Position { - line: 286, - column: 10, - }, - }, - }, + ), + ), content: Slice { source: "b", loc: SourceLocation { @@ -48474,80 +34331,47 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 286, column: 11, }, - end: Position { - line: 286, - column: 12, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 286, - column: 12, - }, - end: Position { - line: 286, - column: 13, - }, + open_paren: OpenParen( + Position { + line: 286, + column: 12, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 286, - column: 13, - }, - end: Position { - line: 286, - column: 14, - }, + close_paren: CloseParen( + Position { + line: 286, + column: 13, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 286, - column: 14, - }, - end: Position { - line: 286, - column: 15, - }, + open_brace: OpenBrace( + Position { + line: 286, + column: 14, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 286, - column: 15, - }, - end: Position { - line: 286, - column: 16, - }, + close_brace: CloseBrace( + Position { + line: 286, + column: 15, }, - }, + ), }, }, ), @@ -48576,61 +34400,33 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 286, - column: 18, - }, - end: Position { - line: 286, - column: 19, - }, + open_paren: OpenParen( + Position { + line: 286, + column: 18, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 286, - column: 19, - }, - end: Position { - line: 286, - column: 20, - }, + close_paren: CloseParen( + Position { + line: 286, + column: 19, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 286, - column: 20, - }, - end: Position { - line: 286, - column: 21, - }, + open_brace: OpenBrace( + Position { + line: 286, + column: 20, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 286, - column: 21, - }, - end: Position { - line: 286, - column: 22, - }, + close_brace: CloseBrace( + Position { + line: 286, + column: 21, }, - }, + ), }, }, ), @@ -48658,91 +34454,49 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 286, - column: 23, - }, - end: Position { - line: 286, - column: 24, - }, + OpenBracket( + Position { + line: 286, + column: 23, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 286, - column: 25, - }, - end: Position { - line: 286, - column: 26, - }, + ), + CloseBracket( + Position { + line: 286, + column: 25, }, - }, + ), ), ), }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 286, - column: 26, - }, - end: Position { - line: 286, - column: 27, - }, + open_paren: OpenParen( + Position { + line: 286, + column: 26, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 286, - column: 27, - }, - end: Position { - line: 286, - column: 28, - }, + close_paren: CloseParen( + Position { + line: 286, + column: 27, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 286, - column: 28, - }, - end: Position { - line: 286, - column: 29, - }, + open_brace: OpenBrace( + Position { + line: 286, + column: 28, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 286, - column: 29, - }, - end: Position { - line: 286, - column: 30, - }, + close_brace: CloseBrace( + Position { + line: 286, + column: 29, }, - }, + ), }, }, ), @@ -48773,114 +34527,65 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 287, - column: 3, - }, - end: Position { - line: 287, - column: 4, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 287, - column: 5, - }, - end: Position { + Asterisk( + Position { line: 287, - column: 6, + column: 3, }, + ), + ), + open_paren: OpenParen( + Position { + line: 287, + column: 5, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 287, - column: 6, - }, - end: Position { - line: 287, - column: 7, - }, + close_paren: CloseParen( + Position { + line: 287, + column: 6, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 287, - column: 7, - }, - end: Position { - line: 287, - column: 8, - }, + open_brace: OpenBrace( + Position { + line: 287, + column: 7, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 287, - column: 9, - }, - end: Position { - line: 287, - column: 14, - }, + keyword: Yield( + Position { + line: 287, + column: 9, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 287, - column: 14, - }, - end: Position { - line: 287, - column: 15, - }, + Semicolon( + Position { + line: 287, + column: 14, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 287, - column: 16, - }, - end: Position { - line: 287, - column: 17, - }, + close_brace: CloseBrace( + Position { + line: 287, + column: 16, }, - }, + ), }, }, ), @@ -48892,19 +34597,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 287, column: 19, }, - end: Position { - line: 287, - column: 20, - }, - }, - }, + ), + ), content: Slice { source: "d", loc: SourceLocation { @@ -48918,133 +34618,79 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 287, column: 21, }, - end: Position { - line: 287, - column: 22, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 287, - column: 18, - }, - end: Position { - line: 287, - column: 19, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 287, - column: 22, - }, - end: Position { + Asterisk( + Position { line: 287, - column: 23, + column: 18, }, + ), + ), + open_paren: OpenParen( + Position { + line: 287, + column: 22, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 287, - column: 23, - }, - end: Position { - line: 287, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 287, + column: 23, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 287, - column: 24, - }, - end: Position { - line: 287, - column: 25, - }, + open_brace: OpenBrace( + Position { + line: 287, + column: 24, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 287, - column: 26, - }, - end: Position { - line: 287, - column: 31, - }, + keyword: Yield( + Position { + line: 287, + column: 26, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 287, - column: 31, - }, - end: Position { - line: 287, - column: 32, - }, + Semicolon( + Position { + line: 287, + column: 31, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 287, - column: 33, - }, - end: Position { - line: 287, - column: 34, - }, + close_brace: CloseBrace( + Position { + line: 287, + column: 33, }, - }, + ), }, }, ), @@ -49073,114 +34719,65 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 287, - column: 35, - }, - end: Position { - line: 287, - column: 36, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 287, - column: 37, - }, - end: Position { + Asterisk( + Position { line: 287, - column: 38, + column: 35, }, + ), + ), + open_paren: OpenParen( + Position { + line: 287, + column: 37, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 287, - column: 38, - }, - end: Position { - line: 287, - column: 39, - }, + close_paren: CloseParen( + Position { + line: 287, + column: 38, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 287, - column: 39, - }, - end: Position { - line: 287, - column: 40, - }, + open_brace: OpenBrace( + Position { + line: 287, + column: 39, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 287, - column: 41, - }, - end: Position { - line: 287, - column: 46, - }, + keyword: Yield( + Position { + line: 287, + column: 41, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 287, - column: 46, - }, - end: Position { - line: 287, - column: 47, - }, + Semicolon( + Position { + line: 287, + column: 46, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 287, - column: 48, - }, - end: Position { - line: 287, - column: 49, - }, + close_brace: CloseBrace( + Position { + line: 287, + column: 48, }, - }, + ), }, }, ), @@ -49208,144 +34805,81 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 287, - column: 51, - }, - end: Position { - line: 287, - column: 52, - }, + OpenBracket( + Position { + line: 287, + column: 51, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 287, - column: 53, - }, - end: Position { - line: 287, - column: 54, - }, + ), + CloseBracket( + Position { + line: 287, + column: 53, }, - }, + ), ), - ), - }, - star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 287, - column: 50, - }, - end: Position { - line: 287, - column: 51, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 287, - column: 54, - }, - end: Position { - line: 287, - column: 55, - }, - }, - }, - params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 287, - column: 55, - }, - end: Position { + ), + }, + star: Some( + Asterisk( + Position { line: 287, - column: 56, + column: 50, }, + ), + ), + open_paren: OpenParen( + Position { + line: 287, + column: 54, }, - }, + ), + params: [], + close_paren: CloseParen( + Position { + line: 287, + column: 55, + }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 287, - column: 56, - }, - end: Position { - line: 287, - column: 57, - }, + open_brace: OpenBrace( + Position { + line: 287, + column: 56, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 287, - column: 58, - }, - end: Position { - line: 287, - column: 63, - }, + keyword: Yield( + Position { + line: 287, + column: 58, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 287, - column: 63, - }, - end: Position { - line: 287, - column: 64, - }, + Semicolon( + Position { + line: 287, + column: 63, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 287, - column: 65, - }, - end: Position { - line: 287, - column: 66, - }, + close_brace: CloseBrace( + Position { + line: 287, + column: 65, }, - }, + ), }, }, ), @@ -49376,61 +34910,33 @@ Mod( brackets: None, }, star: None, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 288, - column: 6, - }, - end: Position { - line: 288, - column: 7, - }, + open_paren: OpenParen( + Position { + line: 288, + column: 6, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 288, - column: 7, - }, - end: Position { - line: 288, - column: 8, - }, + close_paren: CloseParen( + Position { + line: 288, + column: 7, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 288, - column: 8, - }, - end: Position { - line: 288, - column: 9, - }, + open_brace: OpenBrace( + Position { + line: 288, + column: 8, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 288, - column: 9, - }, - end: Position { - line: 288, - column: 10, - }, + close_brace: CloseBrace( + Position { + line: 288, + column: 9, }, - }, + ), }, }, ), @@ -49461,133 +34967,77 @@ Mod( brackets: None, }, star: Some( - Slice { - source: "*", - loc: SourceLocation { - start: Position { - line: 288, - column: 11, - }, - end: Position { - line: 288, - column: 12, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { + Asterisk( + Position { line: 288, - column: 14, - }, - end: Position { - line: 288, - column: 15, + column: 11, }, + ), + ), + open_paren: OpenParen( + Position { + line: 288, + column: 14, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 288, - column: 15, - }, - end: Position { - line: 288, - column: 16, - }, + close_paren: CloseParen( + Position { + line: 288, + column: 15, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 288, - column: 16, - }, - end: Position { - line: 288, - column: 17, - }, + open_brace: OpenBrace( + Position { + line: 288, + column: 16, }, - }, + ), stmts: [ Stmt( Expr { expr: Yield( YieldExpr { - keyword: Slice { - source: "yield", - loc: SourceLocation { - start: Position { - line: 288, - column: 18, - }, - end: Position { - line: 288, - column: 23, - }, + keyword: Yield( + Position { + line: 288, + column: 18, }, - }, + ), argument: None, star: None, }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 288, - column: 23, - }, - end: Position { - line: 288, - column: 24, - }, + Semicolon( + Position { + line: 288, + column: 23, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 288, - column: 25, - }, - end: Position { - line: 288, - column: 26, - }, + close_brace: CloseBrace( + Position { + line: 288, + column: 25, }, - }, + ), }, }, ), Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 290, - column: 3, - }, - end: Position { - line: 290, - column: 6, - }, + keyword_get: Get( + Position { + line: 290, + column: 3, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -49610,96 +35060,56 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 290, - column: 8, - }, - end: Position { - line: 290, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 290, + column: 8, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 290, - column: 9, - }, - end: Position { - line: 290, - column: 10, - }, + ), + close_paren: CloseParen( + Position { + line: 290, + column: 9, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 290, - column: 10, - }, - end: Position { - line: 290, - column: 11, - }, + open_brace: OpenBrace( + Position { + line: 290, + column: 10, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 290, - column: 11, - }, - end: Position { - line: 290, - column: 12, - }, + close_brace: CloseBrace( + Position { + line: 290, + column: 11, }, - }, + ), }, }, ), Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 290, - column: 13, - }, - end: Position { - line: 290, - column: 16, - }, + keyword_get: Get( + Position { + line: 290, + column: 13, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + open_quote: Single( + SingleQuote( + Position { line: 290, column: 17, }, - end: Position { - line: 290, - column: 18, - }, - }, - }, + ), + ), content: Slice { source: "f", loc: SourceLocation { @@ -49713,97 +35123,57 @@ Mod( }, }, }, - close_quote: Slice { - source: "'", - loc: SourceLocation { - start: Position { + close_quote: Single( + SingleQuote( + Position { line: 290, column: 19, }, - end: Position { - line: 290, - column: 20, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 290, - column: 20, - }, - end: Position { - line: 290, - column: 21, - }, + open_paren: OpenParen( + Position { + line: 290, + column: 20, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 290, - column: 21, - }, - end: Position { - line: 290, - column: 22, - }, + ), + close_paren: CloseParen( + Position { + line: 290, + column: 21, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 290, - column: 22, - }, - end: Position { - line: 290, - column: 23, - }, + open_brace: OpenBrace( + Position { + line: 290, + column: 22, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 290, - column: 23, - }, - end: Position { - line: 290, - column: 24, - }, + close_brace: CloseBrace( + Position { + line: 290, + column: 23, }, - }, + ), }, }, ), Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 290, - column: 25, - }, - end: Position { - line: 290, - column: 28, - }, + keyword_get: Get( + Position { + line: 290, + column: 25, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -49824,79 +35194,44 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 290, - column: 30, - }, - end: Position { - line: 290, - column: 31, - }, + open_paren: OpenParen( + Position { + line: 290, + column: 30, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 290, - column: 31, - }, - end: Position { - line: 290, - column: 32, - }, + ), + close_paren: CloseParen( + Position { + line: 290, + column: 31, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 290, - column: 32, - }, - end: Position { - line: 290, - column: 33, - }, + open_brace: OpenBrace( + Position { + line: 290, + column: 32, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 290, - column: 33, - }, - end: Position { - line: 290, - column: 34, - }, + close_brace: CloseBrace( + Position { + line: 290, + column: 33, }, - }, + ), }, }, ), Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 290, - column: 35, - }, - end: Position { - line: 290, - column: 38, - }, + keyword_get: Get( + Position { + line: 290, + column: 35, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -49917,108 +35252,59 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 290, - column: 39, - }, - end: Position { - line: 290, - column: 40, - }, + OpenBracket( + Position { + line: 290, + column: 39, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 290, - column: 41, - }, - end: Position { - line: 290, - column: 42, - }, + ), + CloseBracket( + Position { + line: 290, + column: 41, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 290, - column: 42, - }, - end: Position { - line: 290, - column: 43, - }, + open_paren: OpenParen( + Position { + line: 290, + column: 42, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 290, - column: 43, - }, - end: Position { - line: 290, - column: 44, - }, + ), + close_paren: CloseParen( + Position { + line: 290, + column: 43, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 290, - column: 44, - }, - end: Position { - line: 290, - column: 45, - }, + open_brace: OpenBrace( + Position { + line: 290, + column: 44, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 290, - column: 45, - }, - end: Position { - line: 290, - column: 46, - }, + close_brace: CloseBrace( + Position { + line: 290, + column: 45, }, - }, + ), }, }, ), Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 291, - column: 3, - }, - end: Position { - line: 291, - column: 6, - }, + keyword_set: Set( + Position { + line: 291, + column: 3, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -50041,19 +35327,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 291, - column: 8, - }, - end: Position { - line: 291, - column: 9, - }, + open_paren: OpenParen( + Position { + line: 291, + column: 8, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -50076,83 +35355,50 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 291, - column: 10, - }, - end: Position { - line: 291, - column: 11, - }, + close_paren: CloseParen( + Position { + line: 291, + column: 10, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 291, - column: 11, - }, - end: Position { - line: 291, - column: 12, - }, - }, - }, - stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 291, - column: 12, - }, - end: Position { - line: 291, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 291, + column: 11, }, - }, + ), + stmts: [], + close_brace: CloseBrace( + Position { + line: 291, + column: 12, + }, + ), }, }, ), Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 291, - column: 14, - }, - end: Position { - line: 291, - column: 17, - }, + keyword_set: Set( + Position { + line: 291, + column: 14, }, - }, + ), id: PropInitKey { value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 291, column: 18, }, - end: Position { - line: 291, - column: 19, - }, - }, - }, + ), + ), content: Slice { source: "h", loc: SourceLocation { @@ -50166,37 +35412,25 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 291, column: 20, }, - end: Position { - line: 291, - column: 21, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 291, - column: 21, - }, - end: Position { - line: 291, - column: 22, - }, + open_paren: OpenParen( + Position { + line: 291, + column: 21, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -50219,66 +35453,38 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 291, - column: 23, - }, - end: Position { - line: 291, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 291, + column: 23, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 291, - column: 24, - }, - end: Position { - line: 291, - column: 25, - }, + open_brace: OpenBrace( + Position { + line: 291, + column: 24, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 291, - column: 25, - }, - end: Position { - line: 291, - column: 26, - }, + close_brace: CloseBrace( + Position { + line: 291, + column: 25, }, - }, + ), }, }, ), Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 291, - column: 27, - }, - end: Position { - line: 291, - column: 30, - }, + keyword_set: Set( + Position { + line: 291, + column: 27, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -50299,19 +35505,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 291, - column: 32, - }, - end: Position { - line: 291, - column: 33, - }, + open_paren: OpenParen( + Position { + line: 291, + column: 32, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -50334,66 +35533,38 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 291, - column: 34, - }, - end: Position { - line: 291, - column: 35, - }, + close_paren: CloseParen( + Position { + line: 291, + column: 34, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 291, - column: 35, - }, - end: Position { - line: 291, - column: 36, - }, + open_brace: OpenBrace( + Position { + line: 291, + column: 35, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 291, - column: 36, - }, - end: Position { - line: 291, - column: 37, - }, + close_brace: CloseBrace( + Position { + line: 291, + column: 36, }, - }, + ), }, }, ), Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 291, - column: 38, - }, - end: Position { - line: 291, - column: 41, - }, + keyword_set: Set( + Position { + line: 291, + column: 38, }, - }, + ), id: PropInitKey { value: Lit( Number( @@ -50414,48 +35585,27 @@ Mod( ), brackets: Some( ( - Slice { - source: "[", - loc: SourceLocation { - start: Position { - line: 291, - column: 42, - }, - end: Position { - line: 291, - column: 43, - }, + OpenBracket( + Position { + line: 291, + column: 42, }, - }, - Slice { - source: "]", - loc: SourceLocation { - start: Position { - line: 291, - column: 44, - }, - end: Position { - line: 291, - column: 45, - }, + ), + CloseBracket( + Position { + line: 291, + column: 44, }, - }, + ), ), ), }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 291, - column: 45, - }, - end: Position { - line: 291, - column: 46, - }, + open_paren: OpenParen( + Position { + line: 291, + column: 45, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -50478,66 +35628,38 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 291, - column: 47, - }, - end: Position { - line: 291, - column: 48, - }, + close_paren: CloseParen( + Position { + line: 291, + column: 47, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 291, - column: 48, - }, - end: Position { - line: 291, - column: 49, - }, + open_brace: OpenBrace( + Position { + line: 291, + column: 48, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 291, - column: 49, - }, - end: Position { - line: 291, - column: 50, - }, + close_brace: CloseBrace( + Position { + line: 291, + column: 49, }, - }, + ), }, }, ), Get( PropGet { keyword_static: None, - keyword_get: Slice { - source: "get", - loc: SourceLocation { - start: Position { - line: 292, - column: 3, - }, - end: Position { - line: 292, - column: 6, - }, + keyword_get: Get( + Position { + line: 292, + column: 3, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -50560,79 +35682,44 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 292, - column: 9, - }, - end: Position { - line: 292, - column: 10, - }, + open_paren: OpenParen( + Position { + line: 292, + column: 9, }, - }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 292, - column: 10, - }, - end: Position { - line: 292, - column: 11, - }, + ), + close_paren: CloseParen( + Position { + line: 292, + column: 10, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 292, - column: 12, - }, - end: Position { - line: 292, - column: 13, - }, + open_brace: OpenBrace( + Position { + line: 292, + column: 12, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 292, - column: 13, - }, - end: Position { - line: 292, - column: 14, - }, + close_brace: CloseBrace( + Position { + line: 292, + column: 13, }, - }, + ), }, }, ), Set( PropSet { keyword_static: None, - keyword_set: Slice { - source: "set", - loc: SourceLocation { - start: Position { - line: 292, - column: 15, - }, - end: Position { - line: 292, - column: 18, - }, + keyword_set: Set( + Position { + line: 292, + column: 15, }, - }, + ), id: PropInitKey { value: Expr( Ident( @@ -50655,19 +35742,12 @@ Mod( ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 292, - column: 21, - }, - end: Position { - line: 292, - column: 22, - }, + open_paren: OpenParen( + Position { + line: 292, + column: 21, }, - }, + ), arg: ListEntry { item: Pat( Ident( @@ -50690,64 +35770,36 @@ Mod( ), comma: None, }, - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 292, - column: 23, - }, - end: Position { - line: 292, - column: 24, - }, + close_paren: CloseParen( + Position { + line: 292, + column: 23, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 292, - column: 25, - }, - end: Position { - line: 292, - column: 26, - }, + open_brace: OpenBrace( + Position { + line: 292, + column: 25, }, - }, + ), stmts: [], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 292, - column: 26, - }, - end: Position { - line: 292, - column: 27, - }, + close_brace: CloseBrace( + Position { + line: 292, + column: 26, }, - }, + ), }, }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 293, - column: 1, - }, - end: Position { - line: 293, - column: 2, - }, + close_brace: CloseBrace( + Position { + line: 293, + column: 1, }, - }, + ), }, }, ), @@ -50755,19 +35807,12 @@ Mod( Decl( Class( Class { - keyword: Slice { - source: "class", - loc: SourceLocation { - start: Position { - line: 294, - column: 1, - }, - end: Position { - line: 294, - column: 6, - }, + keyword: Class( + Position { + line: 294, + column: 1, }, - }, + ), id: Some( Ident { slice: Slice { @@ -50787,19 +35832,12 @@ Mod( ), super_class: Some( SuperClass { - keyword_extends: Slice { - source: "extends", - loc: SourceLocation { - start: Position { - line: 294, - column: 9, - }, - end: Position { - line: 294, - column: 16, - }, + keyword_extends: Extends( + Position { + line: 294, + column: 9, }, - }, + ), expr: Ident( Ident { slice: Slice { @@ -50820,19 +35858,12 @@ Mod( }, ), body: ClassBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 294, - column: 19, - }, - end: Position { - line: 294, - column: 20, - }, + open_brace: OpenBrace( + Position { + line: 294, + column: 19, }, - }, + ), props: [ Ctor( PropCtor { @@ -50840,19 +35871,14 @@ Mod( value: Lit( String( StringLit { - open_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + open_quote: Double( + DoubleQuote( + Position { line: 294, column: 21, }, - end: Position { - line: 294, - column: 22, - }, - }, - }, + ), + ), content: Slice { source: "constructor", loc: SourceLocation { @@ -50866,162 +35892,94 @@ Mod( }, }, }, - close_quote: Slice { - source: "\"", - loc: SourceLocation { - start: Position { + close_quote: Double( + DoubleQuote( + Position { line: 294, column: 33, }, - end: Position { - line: 294, - column: 34, - }, - }, - }, + ), + ), }, ), ), brackets: None, }, - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 294, - column: 34, - }, - end: Position { - line: 294, - column: 35, - }, + open_paren: OpenParen( + Position { + line: 294, + column: 34, }, - }, + ), params: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 294, - column: 35, - }, - end: Position { - line: 294, - column: 36, - }, + close_paren: CloseParen( + Position { + line: 294, + column: 35, }, - }, + ), body: FuncBody { - open_brace: Slice { - source: "{", - loc: SourceLocation { - start: Position { - line: 294, - column: 36, - }, - end: Position { - line: 294, - column: 37, - }, + open_brace: OpenBrace( + Position { + line: 294, + column: 36, }, - }, + ), stmts: [ Stmt( Expr { expr: Call( CallExpr { callee: Super( - Slice { - source: "super", - loc: SourceLocation { - start: Position { - line: 294, - column: 38, - }, - end: Position { - line: 294, - column: 43, - }, - }, - }, - ), - open_paren: Slice { - source: "(", - loc: SourceLocation { - start: Position { - line: 294, - column: 43, - }, - end: Position { + Super( + Position { line: 294, - column: 44, + column: 38, }, + ), + ), + open_paren: OpenParen( + Position { + line: 294, + column: 43, }, - }, + ), arguments: [], - close_paren: Slice { - source: ")", - loc: SourceLocation { - start: Position { - line: 294, - column: 44, - }, - end: Position { - line: 294, - column: 45, - }, + close_paren: CloseParen( + Position { + line: 294, + column: 44, }, - }, + ), }, ), semi_colon: Some( - Slice { - source: ";", - loc: SourceLocation { - start: Position { - line: 294, - column: 45, - }, - end: Position { - line: 294, - column: 46, - }, + Semicolon( + Position { + line: 294, + column: 45, }, - }, + ), ), }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 294, - column: 47, - }, - end: Position { - line: 294, - column: 48, - }, + close_brace: CloseBrace( + Position { + line: 294, + column: 47, }, - }, + ), }, }, ), ], - close_brace: Slice { - source: "}", - loc: SourceLocation { - start: Position { - line: 294, - column: 49, - }, - end: Position { - line: 294, - column: 50, - }, + close_brace: CloseBrace( + Position { + line: 294, + column: 49, }, - }, + ), }, }, ), diff --git a/tests/snapshots/everything_js__es2015_script.snap b/tests/snapshots/everything_js__es2015_script.snap index aba396a..5f28921 100644 --- a/tests/snapshots/everything_js__es2015_script.snap +++ b/tests/snapshots/everything_js__es2015_script.snap @@ -1051,7 +1051,7 @@ Script( RegEx( RegEx { pattern: "x", - flags: "", + flags: None, }, ), ), @@ -1063,7 +1063,7 @@ Script( RegEx( RegEx { pattern: "|", - flags: "", + flags: None, }, ), ), @@ -1075,7 +1075,7 @@ Script( RegEx( RegEx { pattern: "|||", - flags: "", + flags: None, }, ), ), @@ -1087,7 +1087,7 @@ Script( RegEx( RegEx { pattern: "^$\\b\\B", - flags: "", + flags: None, }, ), ), @@ -1099,7 +1099,7 @@ Script( RegEx( RegEx { pattern: "(?=(?!(?:(.))))", - flags: "", + flags: None, }, ), ), @@ -1111,7 +1111,7 @@ Script( RegEx( RegEx { pattern: "a.\\f\\n\\r\\t\\v\\0\\[\\-\\/\\\\\\x00\\u0000\\uD834\\uDF06", - flags: "", + flags: None, }, ), ), @@ -1123,7 +1123,9 @@ Script( RegEx( RegEx { pattern: "\\u{00000001d306}", - flags: "u", + flags: Some( + "u", + ), }, ), ), @@ -1135,7 +1137,7 @@ Script( RegEx( RegEx { pattern: "\\d\\D\\s\\S\\w\\W", - flags: "", + flags: None, }, ), ), @@ -1147,7 +1149,7 @@ Script( RegEx( RegEx { pattern: "\\ca\\cb\\cc\\cd\\ce\\cf\\cg\\ch\\ci\\cj\\ck\\cl\\cm\\cn\\co\\cp\\cq\\cr\\cs\\ct\\cu\\cv\\cw\\cx\\cy\\cz", - flags: "", + flags: None, }, ), ), @@ -1159,7 +1161,7 @@ Script( RegEx( RegEx { pattern: "\\cA\\cB\\cC\\cD\\cE\\cF\\cG\\cH\\cI\\cJ\\cK\\cL\\cM\\cN\\cO\\cP\\cQ\\cR\\cS\\cT\\cU\\cV\\cW\\cX\\cY\\cZ", - flags: "", + flags: None, }, ), ), @@ -1171,7 +1173,7 @@ Script( RegEx( RegEx { pattern: "[a-z-]", - flags: "", + flags: None, }, ), ), @@ -1183,7 +1185,7 @@ Script( RegEx( RegEx { pattern: "[^\\b\\-^]", - flags: "", + flags: None, }, ), ), @@ -1195,7 +1197,7 @@ Script( RegEx( RegEx { pattern: "[/\\]\\\\]", - flags: "", + flags: None, }, ), ), @@ -1207,7 +1209,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "i", + flags: Some( + "i", + ), }, ), ), @@ -1219,7 +1223,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "g", + flags: Some( + "g", + ), }, ), ), @@ -1231,7 +1237,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "m", + flags: Some( + "m", + ), }, ), ), @@ -1243,7 +1251,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "igm", + flags: Some( + "igm", + ), }, ), ), @@ -1255,7 +1265,7 @@ Script( RegEx( RegEx { pattern: ".*", - flags: "", + flags: None, }, ), ), @@ -1267,7 +1277,7 @@ Script( RegEx( RegEx { pattern: ".*?", - flags: "", + flags: None, }, ), ), @@ -1279,7 +1289,7 @@ Script( RegEx( RegEx { pattern: ".+", - flags: "", + flags: None, }, ), ), @@ -1291,7 +1301,7 @@ Script( RegEx( RegEx { pattern: ".+?", - flags: "", + flags: None, }, ), ), @@ -1303,7 +1313,7 @@ Script( RegEx( RegEx { pattern: ".?", - flags: "", + flags: None, }, ), ), @@ -1315,7 +1325,7 @@ Script( RegEx( RegEx { pattern: ".??", - flags: "", + flags: None, }, ), ), @@ -1327,7 +1337,7 @@ Script( RegEx( RegEx { pattern: ".{0}", - flags: "", + flags: None, }, ), ), @@ -1339,7 +1349,7 @@ Script( RegEx( RegEx { pattern: ".{0,}", - flags: "", + flags: None, }, ), ), @@ -1351,7 +1361,7 @@ Script( RegEx( RegEx { pattern: ".{0,0}", - flags: "", + flags: None, }, ), ), @@ -1364,9 +1374,9 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "a", - raw: "`a`", + open_quote: BackTick, + content: "a", + close_quote: BackTick, }, ], expressions: [], @@ -1382,14 +1392,14 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: false, - cooked: "", - raw: "`${", + open_quote: BackTick, + content: "", + close_quote: OpenBrace, }, TemplateElement { - tail: true, - cooked: "", - raw: "}`", + open_quote: CloseBrace, + content: "", + close_quote: BackTick, }, ], expressions: [ @@ -1411,14 +1421,14 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: false, - cooked: "0", - raw: "`0${", + open_quote: BackTick, + content: "0", + close_quote: OpenBrace, }, TemplateElement { - tail: true, - cooked: "2", - raw: "}2`", + open_quote: CloseBrace, + content: "2", + close_quote: BackTick, }, ], expressions: [ @@ -1449,14 +1459,14 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: false, - cooked: "0", - raw: "`0${", + open_quote: BackTick, + content: "0", + close_quote: OpenBrace, }, TemplateElement { - tail: true, - cooked: "4", - raw: "}4`", + open_quote: CloseBrace, + content: "4", + close_quote: BackTick, }, ], expressions: [ @@ -1465,14 +1475,14 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: false, - cooked: "1", - raw: "`1${", + open_quote: BackTick, + content: "1", + close_quote: OpenBrace, }, TemplateElement { - tail: true, - cooked: "3", - raw: "}3`", + open_quote: CloseBrace, + content: "3", + close_quote: BackTick, }, ], expressions: [ @@ -1498,9 +1508,9 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "\\`", - raw: "`\\``", + open_quote: BackTick, + content: "\\`", + close_quote: BackTick, }, ], expressions: [], @@ -1516,9 +1526,9 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "a\\${b", - raw: "`a\\${b`", + open_quote: BackTick, + content: "a\\${b", + close_quote: BackTick, }, ], expressions: [], @@ -1534,9 +1544,9 @@ Script( TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "\\0\\n\\x0A\\u000A\\u{A}", - raw: "`\\0\\n\\x0A\\u000A\\u{A}`", + open_quote: BackTick, + content: "\\0\\n\\x0A\\u000A\\u{A}", + close_quote: BackTick, }, ], expressions: [], @@ -4172,9 +4182,9 @@ Script( quasi: TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "a", - raw: "`a`", + open_quote: BackTick, + content: "a", + close_quote: BackTick, }, ], expressions: [], @@ -4195,14 +4205,14 @@ Script( quasi: TemplateLit { quasis: [ TemplateElement { - tail: false, - cooked: "0", - raw: "`0${", + open_quote: BackTick, + content: "0", + close_quote: OpenBrace, }, TemplateElement { - tail: true, - cooked: "2", - raw: "}2`", + open_quote: CloseBrace, + content: "2", + close_quote: BackTick, }, ], expressions: [ @@ -8842,9 +8852,9 @@ Script( quasi: TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "template", - raw: "`template`", + open_quote: BackTick, + content: "template", + close_quote: BackTick, }, ], expressions: [], @@ -9130,9 +9140,9 @@ Script( quasi: TemplateLit { quasis: [ TemplateElement { - tail: true, - cooked: "template", - raw: "`template`", + open_quote: BackTick, + content: "template", + close_quote: BackTick, }, ], expressions: [], diff --git a/tests/snapshots/everything_js__es5.snap b/tests/snapshots/everything_js__es5.snap index 69e9a0f..761e8c8 100644 --- a/tests/snapshots/everything_js__es5.snap +++ b/tests/snapshots/everything_js__es5.snap @@ -780,7 +780,7 @@ Script( RegEx( RegEx { pattern: "x", - flags: "", + flags: None, }, ), ), @@ -792,7 +792,7 @@ Script( RegEx( RegEx { pattern: "|", - flags: "", + flags: None, }, ), ), @@ -804,7 +804,7 @@ Script( RegEx( RegEx { pattern: "|||", - flags: "", + flags: None, }, ), ), @@ -816,7 +816,7 @@ Script( RegEx( RegEx { pattern: "^$\\b\\B", - flags: "", + flags: None, }, ), ), @@ -828,7 +828,7 @@ Script( RegEx( RegEx { pattern: "(?=(?!(?:(.))))", - flags: "", + flags: None, }, ), ), @@ -840,7 +840,7 @@ Script( RegEx( RegEx { pattern: "a.\\f\\n\\r\\t\\v\\0\\[\\-\\/\\\\\\x00\\u0000", - flags: "", + flags: None, }, ), ), @@ -852,7 +852,7 @@ Script( RegEx( RegEx { pattern: "\\d\\D\\s\\S\\w\\W", - flags: "", + flags: None, }, ), ), @@ -864,7 +864,7 @@ Script( RegEx( RegEx { pattern: "\\ca\\cb\\cc\\cd\\ce\\cf\\cg\\ch\\ci\\cj\\ck\\cl\\cm\\cn\\co\\cp\\cq\\cr\\cs\\ct\\cu\\cv\\cw\\cx\\cy\\cz", - flags: "", + flags: None, }, ), ), @@ -876,7 +876,7 @@ Script( RegEx( RegEx { pattern: "\\cA\\cB\\cC\\cD\\cE\\cF\\cG\\cH\\cI\\cJ\\cK\\cL\\cM\\cN\\cO\\cP\\cQ\\cR\\cS\\cT\\cU\\cV\\cW\\cX\\cY\\cZ", - flags: "", + flags: None, }, ), ), @@ -888,7 +888,7 @@ Script( RegEx( RegEx { pattern: "[a-z-]", - flags: "", + flags: None, }, ), ), @@ -900,7 +900,7 @@ Script( RegEx( RegEx { pattern: "[^\\b\\-^]", - flags: "", + flags: None, }, ), ), @@ -912,7 +912,7 @@ Script( RegEx( RegEx { pattern: "[/\\]\\\\]", - flags: "", + flags: None, }, ), ), @@ -924,7 +924,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "i", + flags: Some( + "i", + ), }, ), ), @@ -936,7 +938,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "g", + flags: Some( + "g", + ), }, ), ), @@ -948,7 +952,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "m", + flags: Some( + "m", + ), }, ), ), @@ -960,7 +966,9 @@ Script( RegEx( RegEx { pattern: ".", - flags: "igm", + flags: Some( + "igm", + ), }, ), ), @@ -972,7 +980,7 @@ Script( RegEx( RegEx { pattern: ".*", - flags: "", + flags: None, }, ), ), @@ -984,7 +992,7 @@ Script( RegEx( RegEx { pattern: ".*?", - flags: "", + flags: None, }, ), ), @@ -996,7 +1004,7 @@ Script( RegEx( RegEx { pattern: ".+", - flags: "", + flags: None, }, ), ), @@ -1008,7 +1016,7 @@ Script( RegEx( RegEx { pattern: ".+?", - flags: "", + flags: None, }, ), ), @@ -1020,7 +1028,7 @@ Script( RegEx( RegEx { pattern: ".?", - flags: "", + flags: None, }, ), ), @@ -1032,7 +1040,7 @@ Script( RegEx( RegEx { pattern: ".??", - flags: "", + flags: None, }, ), ), @@ -1044,7 +1052,7 @@ Script( RegEx( RegEx { pattern: ".{0}", - flags: "", + flags: None, }, ), ), @@ -1056,7 +1064,7 @@ Script( RegEx( RegEx { pattern: ".{0,}", - flags: "", + flags: None, }, ), ), @@ -1068,7 +1076,7 @@ Script( RegEx( RegEx { pattern: ".{0,0}", - flags: "", + flags: None, }, ), ), diff --git a/tests/snippets.rs b/tests/snippets.rs index 37d6c74..8fce198 100644 --- a/tests/snippets.rs +++ b/tests/snippets.rs @@ -1,16 +1,16 @@ -use resast::prelude::*; +use resast::{expr::QuasiQuote, prelude::*, spanned::Position}; use ressa::*; use std::borrow::Cow; #[test] fn doc1() { let js = "function helloWorld() { alert('Hello world'); }"; let p = Parser::new(&js).unwrap(); - let f = ProgramPart::decl(Decl::Func(Func { - id: Some(Ident::from("helloWorld")), + let f: ProgramPart> = ProgramPart::decl(Decl::Func(Func { + id: Some(Ident::from(Cow::Borrowed("helloWorld"))), params: vec![], body: FuncBody(vec![ProgramPart::Stmt(Stmt::Expr(Expr::Call(CallExpr { - callee: Box::new(Expr::ident_from("alert")), - arguments: vec![Expr::Lit(Lit::single_string_from("Hello world"))], + callee: Box::new(Expr::ident_from("alert".into())), + arguments: vec![Expr::Lit(Lit::single_string_from("Hello world".into()))], })))]), generator: false, is_async: false, @@ -25,13 +25,13 @@ fn readme_iter_example() { let js = "function helloWorld() { alert('Hello world'); }"; let p = Parser::new(&js).unwrap(); let f = ProgramPart::decl(Decl::Func(Func { - id: Some(Ident::from("helloWorld")), + id: Some(Ident::from(Cow::Borrowed("helloWorld"))), params: vec![], body: FuncBody(vec![ProgramPart::Stmt(Stmt::Expr(Expr::Call(CallExpr { - callee: Box::new(Expr::ident_from("alert")), - arguments: vec![Expr::Lit(Lit::String(StringLit::Single(Cow::Owned( - "Hello world".to_string(), - ))))], + callee: Box::new(Expr::ident_from(Cow::Borrowed("alert"))), + arguments: vec![Expr::Lit(Lit::String(StringLit::Single( + Cow::Borrowed("Hello world").into(), + )))], })))]), generator: false, is_async: false, @@ -734,7 +734,7 @@ fn async_func_tokens() { Program::Script(vec![ProgramPart::Decl(Decl::Func(Func { body: FuncBody(vec![]), generator: false, - id: Some(Ident::new("f".to_owned())), + id: Some(Ident::from(Cow::Borrowed("f"))), is_async: true, params: vec![], }))]), @@ -750,7 +750,7 @@ fn func_decl_tokens() { Program::Script(vec![ProgramPart::Decl(Decl::Func(Func { body: FuncBody(vec![]), generator: false, - id: Some(Ident::new("f".to_owned())), + id: Some(Ident::from(Cow::Borrowed("f"))), is_async: false, params: vec![], }))]), @@ -766,7 +766,7 @@ fn class_extended_by_call() { .build() .unwrap(); let tokens = p.parse().unwrap(); - let callee = Ident::new("D".to_owned()); + let callee = Ident::from(Cow::Borrowed("D")); let callee = Expr::Ident(callee); let callee = Box::new(callee); let super_class = CallExpr { @@ -779,7 +779,7 @@ fn class_extended_by_call() { assert_eq!( Program::Script(vec![ProgramPart::Decl(Decl::Class(Class { body: ClassBody(vec![]), - id: Some(Ident::new("C".to_owned())), + id: Some(Ident::from(Cow::Borrowed("C"))), super_class, }))]), tokens @@ -793,7 +793,7 @@ fn class_anon_extended_by_call() { .build() .unwrap(); let tokens = p.parse().unwrap(); - let callee = Ident::new("D".to_owned()); + let callee = Ident::from(Cow::Borrowed("D")); let callee = Expr::Ident(callee); let callee = Box::new(callee); let super_class = CallExpr { @@ -807,7 +807,7 @@ fn class_anon_extended_by_call() { Program::Script(vec![ProgramPart::Decl(Decl::Var( VarKind::Let, vec![VarDecl { - id: Pat::Ident(Ident::new("c".to_owned())), + id: Pat::Ident(Ident::from(Cow::Borrowed("c"))), init: Some(Expr::Class(Class { body: ClassBody(vec![]), id: None, @@ -832,7 +832,7 @@ fn class_async_static_method() { assert_eq!( Program::Script(vec![ProgramPart::Decl(Decl::Class(Class { body: ClassBody(vec![Prop { - key: PropKey::Expr(Expr::Ident(Ident::new("m".to_owned()))), + key: PropKey::Expr(Expr::Ident(Ident::from(Cow::Borrowed("m")))), value: PropValue::Expr(Expr::Func(Func { id: None, params: vec![], @@ -846,7 +846,7 @@ fn class_async_static_method() { short_hand: false, is_static: true }]), - id: Some(Ident::new("C".to_owned())), + id: Some(Ident::from(Cow::Borrowed("C"))), super_class: None, }))]), tokens @@ -913,7 +913,7 @@ fn generator_prop() { ObjProp::Prop(Prop { computed: false, is_static: false, - key: PropKey::Expr(Expr::Ident(Ident::new("g".to_owned()))), + key: PropKey::Expr(Expr::Ident(Ident::from(Cow::Borrowed("g")))), kind: PropKind::Method, method: true, short_hand: false, @@ -945,12 +945,12 @@ fn super_tagged_template_in_ctor() { assert_eq!( Program::Script(vec![ProgramPart::Decl(Decl::Class(Class { - id: Some(Ident::from("X")), + id: Some(Ident::from(Cow::Borrowed("X"))), super_class: None, body: ClassBody(vec![Prop { computed: false, is_static: false, - key: PropKey::Expr(Expr::Ident(Ident::from("constructor"))), + key: PropKey::Expr(Expr::Ident(Ident::from(Cow::Borrowed("constructor")))), kind: PropKind::Ctor, method: true, short_hand: false, @@ -968,9 +968,9 @@ fn super_tagged_template_in_ctor() { quasi: TemplateLit { expressions: vec![], quasis: vec![TemplateElement { - tail: true, - cooked: std::borrow::Cow::Borrowed("template"), - raw: std::borrow::Cow::Borrowed("`template`"), + open_quote: QuasiQuote::BackTick, + content: std::borrow::Cow::Borrowed("template").into(), + close_quote: QuasiQuote::BackTick, }] } } @@ -1010,12 +1010,12 @@ fn super_in_new_class_expr() { arguments: vec![], }; let call_arrow = Expr::Call(call_arrow); - let assign_left = Box::new(Pat::ident_from("a")); + let assign_left = Box::new(Pat::ident_from(Cow::Borrowed("a"))); let assign_arrow = AssignPat { left: assign_left, right: Box::new(call_arrow), }; - let key = PropKey::Expr(Expr::ident_from("constructor")); + let key = PropKey::Expr(Expr::ident_from(Cow::Borrowed("constructor"))); let value = Func { id: None, params: vec![FuncArg::Pat(Pat::Assign(assign_arrow))], @@ -1039,7 +1039,7 @@ fn super_in_new_class_expr() { arguments: vec![], callee: Box::new(Expr::Class(Class { id: None, - super_class: Some(Box::new(Expr::Ident(Ident::from("X")))), + super_class: Some(Box::new(Expr::Ident(Ident::from(Cow::Borrowed("X"))))), body: ClassBody(vec![ctor]) })) })))]), @@ -1060,12 +1060,12 @@ fn static_get_method() { assert_eq!( Program::Script(vec![ProgramPart::Decl(Decl::Class(Class { - id: Some(Ident::from("X")), + id: Some(Ident::from(Cow::Borrowed("X"))), super_class: None, body: ClassBody(vec![Prop { computed: false, is_static: true, - key: PropKey::Expr(Expr::Ident(Ident::from("e"))), + key: PropKey::Expr(Expr::Ident(Ident::from(Cow::Borrowed("e")))), kind: PropKind::Get, method: false, short_hand: false, @@ -1095,12 +1095,12 @@ fn generator_method() { assert_eq!( Program::Script(vec![ProgramPart::Decl(Decl::Class(Class { - id: Some(Ident::from("X")), + id: Some(Ident::from(Cow::Borrowed("X"))), super_class: None, body: ClassBody(vec![Prop { computed: false, is_static: true, - key: PropKey::Expr(Expr::Ident(Ident::from("e"))), + key: PropKey::Expr(Expr::Ident(Ident::from(Cow::Borrowed("e")))), kind: PropKind::Method, method: true, short_hand: false, @@ -1129,7 +1129,10 @@ fn export_all() { assert_eq!( Program::Mod(vec![ProgramPart::Decl(Decl::Export(Box::new( - ModExport::All(Lit::String(StringLit::Single(Cow::Borrowed("module")))) + ModExport::All { + alias: None, + name: Lit::String(StringLit::Single(Cow::Borrowed("module").into())) + } )))]), tokens ); @@ -1144,7 +1147,8 @@ fn for_lhs() { #[test] fn class_ctor_scope() { env_logger::builder().is_test(true).try_init().ok(); - run_test("class e { + run_test( + "class e { constructor(t) {} get a() { @@ -1154,7 +1158,10 @@ fn class_ctor_scope() { get b() { let t; } -}", false).unwrap(); +}", + false, + ) + .unwrap(); } #[test] @@ -1169,8 +1176,8 @@ fn import_default() { assert_eq!( Program::Mod(vec![ProgramPart::Decl(Decl::Import(Box::new(ModImport { - source: Lit::String(StringLit::Single(Cow::Borrowed("module"))), - specifiers: vec![ImportSpecifier::Default(Ident::from("i"))] + source: Lit::String(StringLit::Single(Cow::Borrowed("module").into())), + specifiers: vec![ImportSpecifier::Default(Ident::from(Cow::Borrowed("i")))] })))]), tokens ); @@ -1193,9 +1200,9 @@ fn loop_yield() { Program::Script(vec![ProgramPart::Decl(Decl::Var( VarKind::Var, vec![VarDecl { - id: Pat::Ident(Ident::from("x")), + id: Pat::Ident(Ident::from(Cow::Borrowed("x"))), init: Some(Expr::Obj(vec![ObjProp::Prop(Prop { - key: PropKey::Lit(Lit::String(StringLit::Single(Cow::Borrowed("y")))), + key: PropKey::Lit(Lit::String(StringLit::Single(Cow::Borrowed("y").into()))), computed: true, is_static: false, kind: PropKind::Method, @@ -1206,15 +1213,15 @@ fn loop_yield() { params: vec![], body: FuncBody(vec![ ProgramPart::Stmt(Stmt::Expr(Expr::Yield(YieldExpr { - argument: Some(Box::new(Expr::Lit(Lit::Number(Cow::Borrowed( - "0" - ))))), + argument: Some(Box::new(Expr::Lit(Lit::Number( + Cow::Borrowed("0").into() + )))), delegate: false, }))), ProgramPart::Stmt(Stmt::Expr(Expr::Yield(YieldExpr { - argument: Some(Box::new(Expr::Lit(Lit::Number(Cow::Borrowed( - "0" - ))))), + argument: Some(Box::new(Expr::Lit(Lit::Number( + Cow::Borrowed("0").into() + )))), delegate: false, }))), ]), @@ -1233,20 +1240,14 @@ fn obj_expr_stmt() { use resast::spanned::{ expr::{Expr, ObjExpr, WrappedExpr}, stmt::Stmt, - Program, ProgramPart, Slice, SourceLocation, + Program, ProgramPart, }; use ressa::spanned::Parser; env_logger::builder().is_test(true).try_init().ok(); let mut p = Parser::builder().js("({});").build().unwrap(); let tokens = p.parse().unwrap(); - let open_brace = Slice { - source: "{".into(), - loc: SourceLocation::new(1, 2, 1, 3), - }; - let close_brace = Slice { - source: "}".into(), - loc: SourceLocation::new(1, 3, 1, 4), - }; + let open_brace = Position::new(1, 2).into(); + let close_brace = Position::new(1, 3).into(); let obj = ObjExpr { open_brace, close_brace, @@ -1254,24 +1255,15 @@ fn obj_expr_stmt() { }; let expr = Expr::Obj(obj); let wrapped = WrappedExpr { - open_paren: Slice { - source: "(".into(), - loc: SourceLocation::new(1, 1, 1, 2), - }, + open_paren: Position::new(1, 1).into(), expr, - close_paren: Slice { - source: ")".into(), - loc: SourceLocation::new(1, 4, 1, 5), - }, + close_paren: Position::new(1, 4).into(), }; let expr = Expr::Wrapped(Box::new(wrapped)); assert_eq!( Program::Script(vec![ProgramPart::Stmt(Stmt::Expr { expr, - semi_colon: Some(Slice { - source: ";".into(), - loc: SourceLocation::new(1, 5, 1, 6) - }) + semi_colon: Some(Position::new(1, 5).into()) })]), tokens ); @@ -1287,10 +1279,67 @@ fn setter_scope() { run_test(js, false).unwrap(); } +#[test] +fn array_pattern_with_empty_entry() { + use resast::spanned::{ + decl::{Decl, VarDecl, VarDecls}, + pat::{ArrayPat, ArrayPatPart, Pat}, + expr::Expr, + Ident, ListEntry, Program, ProgramPart, Slice, SourceLocation, VarKind, + }; + let js = "let [x,,] = y"; + let p = generate_spanned_program(js, false).unwrap(); + assert_eq!( + p, + Program::Script(vec![ProgramPart::decl(Decl::Var { + decls: VarDecls { + keyword: VarKind::Let(Position::new(1, 1).into()), + decls: vec![ListEntry { + item: VarDecl { + id: Pat::Array(ArrayPat { + open_bracket: Position::new(1, 5).into(), + elements: vec![ListEntry { + item: Some(ArrayPatPart::Pat(Pat::Ident(Ident { + slice: Slice { + source: Cow::Borrowed("x").into(), + loc: SourceLocation { + start: Position::new(1, 6), + end: Position::new(1, 7) + } + } + }))), + comma: Some(Position::new(1, 7).into()), + }, ListEntry { + item: None, + comma: Some(Position::new(1, 8).into()), + }], + close_bracket: Position::new(1, 9).into() + }), + eq: Some(Position::new(1, 11).into()), + init: Some(Expr::Ident( + Ident { + slice: Slice { + source: Cow::Borrowed("y").into(), + loc: SourceLocation { + start: Position::new(1, 13), + end: Position::new(1, 14) + } + } + } + )), + }, + comma: None + }] + }, + semi_colon: None + })]) + ); +} + #[test] #[ignore = "Diagnostic to see how badly our recursive decent is performing"] fn blow_the_stack() { - fn do_it(ct: usize) { + fn do_it(ct: u32) { eprintln!("do_it {}", ct); let mut js = String::from("function x() {"); for _i in 1..ct { @@ -1299,18 +1348,19 @@ fn blow_the_stack() { for _i in 0..ct { js.push('}'); } - run_test(&js, false).unwrap(); + std::hint::black_box(run_test(&js, false).unwrap()); } - for i in 1..7 { + for i in 1..u32::MAX { do_it(i) } } + #[test] #[ignore = "Diagnostic to see how badly our recursive decent is performing"] fn blow_the_stack_spanned() { use ressa::spanned::Parser; env_logger::builder().is_test(true).try_init().ok(); - fn do_it(ct: usize) { + fn do_it(ct: u16) { eprintln!("do_it {}", ct); let mut js = String::from("function x() {"); for _i in 1..ct { @@ -1320,25 +1370,47 @@ fn blow_the_stack_spanned() { js.push('}'); } let mut p = Parser::builder().js(&js).module(false).build().unwrap(); - p.parse().unwrap(); - // run_test(&js, false).unwrap(); + std::hint::black_box(p.parse().unwrap()); } - for i in 1..100 { + for i in 1..u16::MAX { do_it(i) } } +#[test] +fn call_args() { + run_spanned_test("call(/.+/, '')", false).unwrap(); +} + fn run_test(js: &str, as_mod: bool) -> Result<(), ressa::Error> { - env_logger::builder().is_test(true).try_init().ok(); - let mut p = Parser::builder().js(js).module(as_mod).build()?; - p.parse()?; + let p = generate_program(js, as_mod); + log::debug!("{:#?}", p); + p?; Ok(()) } fn run_spanned_test<'a>(js: &'a str, as_mod: bool) -> Result<(), ressa::Error> { + let p = generate_spanned_program(js, as_mod); + log::debug!("{:#?}", p); + p?; + Ok(()) +} + +fn generate_program<'a>( + js: &'a str, + as_mod: bool, +) -> Result>, ressa::Error> { + env_logger::builder().is_test(true).try_init().ok(); + let mut p = Parser::builder().js(js).module(as_mod).build()?; + p.parse() +} + +fn generate_spanned_program<'a>( + js: &'a str, + as_mod: bool, +) -> Result>, ressa::Error> { use ressa::spanned::Parser; env_logger::builder().is_test(true).try_init().ok(); let mut p = Parser::builder().js(js).module(as_mod).build()?; - p.parse()?; - Ok(()) + p.parse() }