Box lua code and switch to lua-jit

This commit is contained in:
Moritz Hölting 2024-04-07 21:12:47 +02:00
parent b105a45154
commit e0d913612b
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ colored = "2.1.0"
derive_more = { version = "0.99.17", default-features = false, features = ["deref", "from", "deref_mut"] }
enum-as-inner = "0.6.0"
getset = "0.1.2"
mlua = { version = "0.9.7", features = ["luau"], optional = true }
mlua = { version = "0.9.7", features = ["lua54", "vendored"], optional = true }
serde = { version = "1.0.197", features = ["derive", "rc"], optional = true }
shulkerbox = { path = "../shulkerbox", optional = true}
strum = { version = "0.26.2", features = ["derive"] }

View File

@ -47,13 +47,13 @@ impl SourceElement for Expression {
/// Primary:
/// FunctionCall
/// ```
#[allow(missing_docs, clippy::large_enum_variant)]
#[allow(missing_docs)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, EnumAsInner)]
pub enum Primary {
FunctionCall(FunctionCall),
StringLiteral(StringLiteral),
Lua(LuaCode),
Lua(Box<LuaCode>),
}
impl SourceElement for Primary {
@ -245,7 +245,7 @@ impl<'a> Parser<'a> {
handler,
)?;
Some(Primary::Lua(LuaCode {
Some(Primary::Lua(Box::new(LuaCode {
lua_keyword,
left_parenthesis: variables.open,
variables: variables.list,
@ -253,7 +253,7 @@ impl<'a> Parser<'a> {
left_brace: tree.open,
code: tree.tree?,
right_brace: tree.close,
}))
})))
}
unexpected => {