jslextest.lua

Fri, 15 Oct 2010 15:17:17 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 15 Oct 2010 15:17:17 +0100
changeset 0
b2e55f320d48
permissions
-rw-r--r--

Initial commit

require "jslex"

local stream = jslex.new_stream(io.open(arg[1]));

local token_type, token_value = stream.get_token();
while token_type do
	print("Token:", token_type, token_value);
	token_type, token_value = stream.get_token();
end

mercurial