10,794
edits
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) mNo edit summary |
||
Line 577: | Line 577: | ||
if p_current == nil then break end | if p_current == nil then break end | ||
local function update_p() | |||
p_prev = working_phones[i - 1] | |||
p_current = working_phones[i] | |||
p_next = working_phones[i + 1] | |||
p_next2 = working_phones[i + 2] | |||
p_next3 = working_phones[i + 3] | |||
end | |||
local function p_Resolve(p_new) | local function p_Resolve(p_new) | ||
Line 593: | Line 601: | ||
local function p_RemoveNext() | local function p_RemoveNext() | ||
table.remove(working_phones, i + 1) | table.remove(working_phones, i + 1) | ||
update_p() | |||
end | end | ||
Line 672: | Line 678: | ||
table.insert(working_phones, i + 1, "j") | table.insert(working_phones, i + 1, "j") | ||
-- mw.log("[j] inserted to position " .. i + 1 .. ".") | -- mw.log("[j] inserted to position " .. i + 1 .. ".") | ||
update_p() | |||
else | else | ||
p_Resolve("iː") | p_Resolve("iː") | ||
Line 701: | Line 708: | ||
if p_current == "j" and (p_prev == "i" or p_prev == "iː" or p_prev == "iːː") then | if p_current == "j" and (p_prev == "i" or p_prev == "iː" or p_prev == "iːː") then | ||
table.remove(working_phones, i) | table.remove(working_phones, i) | ||
i = i - 1 | |||
update_p() | |||
end | end | ||