Box lua code and switch to lua-jit
This commit is contained in:
parent
b105a45154
commit
e0d913612b
|
@ -17,7 +17,7 @@ colored = "2.1.0"
|
||||||
derive_more = { version = "0.99.17", default-features = false, features = ["deref", "from", "deref_mut"] }
|
derive_more = { version = "0.99.17", default-features = false, features = ["deref", "from", "deref_mut"] }
|
||||||
enum-as-inner = "0.6.0"
|
enum-as-inner = "0.6.0"
|
||||||
getset = "0.1.2"
|
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 }
|
serde = { version = "1.0.197", features = ["derive", "rc"], optional = true }
|
||||||
shulkerbox = { path = "../shulkerbox", optional = true}
|
shulkerbox = { path = "../shulkerbox", optional = true}
|
||||||
strum = { version = "0.26.2", features = ["derive"] }
|
strum = { version = "0.26.2", features = ["derive"] }
|
||||||
|
|
|
@ -47,13 +47,13 @@ impl SourceElement for Expression {
|
||||||
/// Primary:
|
/// Primary:
|
||||||
/// FunctionCall
|
/// FunctionCall
|
||||||
/// ```
|
/// ```
|
||||||
#[allow(missing_docs, clippy::large_enum_variant)]
|
#[allow(missing_docs)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, EnumAsInner)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, EnumAsInner)]
|
||||||
pub enum Primary {
|
pub enum Primary {
|
||||||
FunctionCall(FunctionCall),
|
FunctionCall(FunctionCall),
|
||||||
StringLiteral(StringLiteral),
|
StringLiteral(StringLiteral),
|
||||||
Lua(LuaCode),
|
Lua(Box<LuaCode>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SourceElement for Primary {
|
impl SourceElement for Primary {
|
||||||
|
@ -245,7 +245,7 @@ impl<'a> Parser<'a> {
|
||||||
handler,
|
handler,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Some(Primary::Lua(LuaCode {
|
Some(Primary::Lua(Box::new(LuaCode {
|
||||||
lua_keyword,
|
lua_keyword,
|
||||||
left_parenthesis: variables.open,
|
left_parenthesis: variables.open,
|
||||||
variables: variables.list,
|
variables: variables.list,
|
||||||
|
@ -253,7 +253,7 @@ impl<'a> Parser<'a> {
|
||||||
left_brace: tree.open,
|
left_brace: tree.open,
|
||||||
code: tree.tree?,
|
code: tree.tree?,
|
||||||
right_brace: tree.close,
|
right_brace: tree.close,
|
||||||
}))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
unexpected => {
|
unexpected => {
|
||||||
|
|
Loading…
Reference in New Issue