From d3d853ce90af4a9348ded6fa7915df873a460d34 Mon Sep 17 00:00:00 2001 From: Zaoqi Date: Wed, 21 Aug 2019 02:57:05 +0800 Subject: [PATCH] luaparse: add loc & fix comments (#37665) * Update ast.d.ts * Update ast.d.ts * Update ast.d.ts --- types/luaparse/lib/ast.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/luaparse/lib/ast.d.ts b/types/luaparse/lib/ast.d.ts index 1a67b03a97..2c046a7a11 100644 --- a/types/luaparse/lib/ast.d.ts +++ b/types/luaparse/lib/ast.d.ts @@ -1,5 +1,15 @@ export interface Base { type: TType; + loc?: { + start: { + line: number; + column: number; + }; + end: { + line: number; + column: number; + }; + }; } export interface LabelStatement extends Base<"LabelStatement"> { @@ -85,7 +95,7 @@ export interface ForGenericStatement extends Base<"ForGenericStatement"> { export interface Chunk extends Base<"Chunk"> { body: Statement[]; - comments: string[]; + comments?: string[]; } export interface Identifier extends Base<"Identifier"> {