Fix luau import

This commit is contained in:
Firebolt 2021-10-17 14:13:30 -04:00
parent 679ed0b961
commit cb0467115d
No known key found for this signature in database
GPG Key ID: 4219518A61A50458
2 changed files with 3 additions and 3 deletions

View File

@ -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<()> {

View File

@ -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)?;