Files
DefinitelyTyped/types/luaparse/luaparse-tests.ts
2017-03-24 14:27:52 -07:00

10 lines
283 B
TypeScript

import luaparse = require('luaparse');
var luacode: string = '-- this is hello world in lua.\nprint(\'hello world\')';
var ast: Object = luaparse.parse(luacode);
console.log(JSON.stringify(ast));
ast = luaparse.parse(luacode, {comments: false});
console.log(JSON.stringify(ast));