Fix luau import
This commit is contained in:
parent
679ed0b961
commit
cb0467115d
@ -36,7 +36,7 @@ pub struct LuaJIT;
|
||||
|
||||
impl Edition for LuaJIT {
|
||||
fn runtime(&self) -> &'static str {
|
||||
"luajit"
|
||||
"'luajit'"
|
||||
}
|
||||
|
||||
fn start_block(&self, w: Writer) -> Result<()> {
|
||||
@ -86,7 +86,7 @@ pub struct Luau;
|
||||
|
||||
impl Edition for Luau {
|
||||
fn runtime(&self) -> &'static str {
|
||||
"luau"
|
||||
"script.Runtime"
|
||||
}
|
||||
|
||||
fn start_block(&self, w: Writer) -> Result<()> {
|
||||
|
@ -246,7 +246,7 @@ fn gen_nil_array(name: &str, len: usize, w: Writer) -> Result<()> {
|
||||
}
|
||||
|
||||
pub fn translate(spec: &dyn Edition, m: &Module, w: Writer) -> Result<()> {
|
||||
writeln!(w, "local runtime = require('{}')", spec.runtime())?;
|
||||
writeln!(w, "local runtime = require({})", spec.runtime())?;
|
||||
writeln!(w, "{}", RUNTIME_DATA)?;
|
||||
|
||||
gen_nil_array("FUNC_LIST", m.in_arity.len(), w)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user