mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
/// <reference path="luaparse.d.ts" />
|
|
|
|
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));
|