More slots for boxed arrays.

This commit is contained in:
Stephen Chung 2023-03-25 17:24:05 +08:00
parent 892ed82f2e
commit ce355aa553
2 changed files with 4 additions and 4 deletions

View File

@ -276,9 +276,9 @@ pub enum Expr {
/// [String][ImmutableString] constant. /// [String][ImmutableString] constant.
StringConstant(ImmutableString, Position), StringConstant(ImmutableString, Position),
/// An interpolated [string][ImmutableString]. /// An interpolated [string][ImmutableString].
InterpolatedString(Box<StaticVec<Expr>>, Position), InterpolatedString(Box<FnArgsVec<Expr>>, Position),
/// [ expr, ... ] /// [ expr, ... ]
Array(Box<StaticVec<Expr>>, Position), Array(Box<FnArgsVec<Expr>>, Position),
/// #{ name:expr, ... } /// #{ name:expr, ... }
Map( Map(
Box<(StaticVec<(Ident, Expr)>, BTreeMap<Identifier, Dynamic>)>, Box<(StaticVec<(Ident, Expr)>, BTreeMap<Identifier, Dynamic>)>,

View File

@ -908,7 +908,7 @@ impl Engine {
let mut settings = settings; let mut settings = settings;
settings.pos = eat_token(input, Token::LeftBracket); settings.pos = eat_token(input, Token::LeftBracket);
let mut array = StaticVec::new_const(); let mut array = FnArgsVec::new_const();
loop { loop {
const MISSING_RBRACKET: &str = "to end this array literal"; const MISSING_RBRACKET: &str = "to end this array literal";
@ -1501,7 +1501,7 @@ impl Engine {
// Interpolated string // Interpolated string
Token::InterpolatedString(..) => { Token::InterpolatedString(..) => {
let mut segments = StaticVec::<Expr>::new(); let mut segments = FnArgsVec::new_const();
let settings = settings.level_up()?; let settings = settings.level_up()?;
match input.next().expect(NEVER_ENDS) { match input.next().expect(NEVER_ENDS) {