jslextest.lua

1
require "jslex"
2
 
3
local stream = jslex.new_stream(io.open(arg[1]));
4
 
5
local token_type, token_value = stream.get_token();
6
while token_type do
7
	print("Token:", token_type, token_value);
8
	token_type, token_value = stream.get_token();
9
end