Hi,
How would i parse this into proper condition?
Code:
local condition
line = 'frame1 and frame2 or frame3'
for token in string.gmatch(line, "[^%s]+") do
if token == "and" or token == "or" then
token = token.." "
else
token = '_G['..token..'] '
end
condition = condition .. token
end
Thank you