Lua 関数の GetTokenNameByIndex は、指定されたインデックス番号に対応するキーワード文字列を返します。
各キーワードについては、コマンド構文とキーワード で述べられています。
― または ―
この例では、1〜443のインデックス番号に対応するキーワード(存在する場合)を出力しています。
return function()
-- Create a variable to hold the keyword string
local tokenName = ""
-- Print the keywords to the first 443 indexes if possible
for index = 1, 443, 1 do
tokenName = GetTokenNameByIndex(index)
if tokenName ~= nil then
Printf("Token index " .. index .. " = " .. tokenName)
end
end
end