Files
DefinitelyTyped/luaparse/luaparse-tests.ts
2016-04-27 21:53:46 -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));