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.
StringConstant(ImmutableString, Position),
/// An interpolated [string][ImmutableString].
InterpolatedString(Box<StaticVec<Expr>>, Position),
InterpolatedString(Box<FnArgsVec<Expr>>, Position),
/// [ expr, ... ]
Array(Box<StaticVec<Expr>>, Position),
Array(Box<FnArgsVec<Expr>>, Position),
/// #{ name:expr, ... }
Map(
Box<(StaticVec<(Ident, Expr)>, BTreeMap<Identifier, Dynamic>)>,

View File

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