From c98c6053635ddfca7aab15b268b0f2c1fcc0c6ef Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 29 Jun 2023 10:58:56 +0800 Subject: fix issue #139. --- spec/inputs/goto.yue | 8 ++++---- spec/inputs/import.yue | 2 +- spec/outputs/import.lua | 34 +++++++++++++++++----------------- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'spec') diff --git a/spec/inputs/goto.yue b/spec/inputs/goto.yue index 61584ca..3f3ae89 100644 --- a/spec/inputs/goto.yue +++ b/spec/inputs/goto.yue @@ -16,10 +16,10 @@ do do for z = 1, 10 for y = 1, 10 do for x = 1, 10 - if x^2 + y^2 == z^2 - print 'found a Pythagorean triple:', x, y, z - print 'now trying next z...' - goto zcontinue + if x^2 + y^2 == z^2 + print 'found a Pythagorean triple:', x, y, z + print 'now trying next z...' + goto zcontinue ::zcontinue:: do diff --git a/spec/inputs/import.yue b/spec/inputs/import.yue index fe5caf5..73e05d2 100644 --- a/spec/inputs/import.yue +++ b/spec/inputs/import.yue @@ -7,7 +7,7 @@ import x, \y, z from items import master, \ghost from find "mytable" -_table_0 = 232 +_obj_0 = 232 import something from a table diff --git a/spec/outputs/import.lua b/spec/outputs/import.lua index f8d6ef0..19d332a 100644 --- a/spec/outputs/import.lua +++ b/spec/outputs/import.lua @@ -22,18 +22,18 @@ do end end)() end -local _table_0 = 232 +local _obj_0 = 232 local something do - local _obj_0 = a(table) - something = _obj_0.something + local _obj_1 = a(table) + something = _obj_1.something end if indent then local okay, well do - local _obj_0 = tables[100] - okay, well = _obj_0.okay, (function() - local _base_0 = _obj_0 + local _obj_1 = tables[100] + okay, well = _obj_1.okay, (function() + local _base_0 = _obj_1 local _fn_0 = _base_0.well return _fn_0 and function(...) return _fn_0(_base_0, ...) @@ -66,13 +66,13 @@ do local Player = require("player") local C, Ct, Cmt do - local _obj_0 = require("lpeg") - C, Ct, Cmt = _obj_0.C, _obj_0.Ct, _obj_0.Cmt + local _obj_1 = require("lpeg") + C, Ct, Cmt = _obj_1.C, _obj_1.Ct, _obj_1.Cmt end local one, two, ch do - local _obj_0 = require("export") - one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1] + local _obj_1 = require("export") + one, two, ch = _obj_1[1], _obj_1[2], _obj_1.Something.umm[1] end local Another = require("export").Another end @@ -84,8 +84,8 @@ end do local func, ifVar do - local _obj_0 = require("org.package.module") - func, ifVar = _obj_0["function"], _obj_0["if"] + local _obj_1 = require("org.package.module") + func, ifVar = _obj_1["function"], _obj_1["if"] end end do @@ -93,14 +93,14 @@ do local index = getmetatable(require("m")).__index local f, c do - local _obj_0 = require("m") - f = _obj_0.e - c = getmetatable(_obj_0).__pairs + local _obj_1 = require("m") + f = _obj_1.e + c = getmetatable(_obj_1).__pairs end local d = require("m").c local g, i do - local _obj_0 = require("m") - g, i = _obj_0[1], getmetatable(_obj_0[2]).__close + local _obj_1 = require("m") + g, i = _obj_1[1], getmetatable(_obj_1[2]).__close end end -- cgit v1.2.3-55-g6feb