File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class Location {
3333
3434 constructor ( startToken : Token , endToken : Token , source : Source ) ;
3535
36- toJSON ( ) : { start : number ; end : number } ;
36+ toJSON ( ) : { start : number ; end : number ; source : Source } ;
3737}
3838
3939/**
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ export class Location {
4141 this . source = source ;
4242 }
4343
44- toJSON ( ) : { | start: number , end : number | } {
45- return { start : this . start , end : this . end } ;
44+ toJSON ( ) : { | start: number , end : number , source : Source | } {
45+ return { start : this . start , end : this . end , source : this . source } ;
4646 }
4747}
4848
Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ export class Source {
4848 get [ SYMBOL_TO_STRING_TAG ] ( ) {
4949 return 'Source' ;
5050 }
51+
52+ toJSON ( ) : { | body : string , name : string , locationOffset : Location | } {
53+ return {
54+ body : this . body ,
55+ name : this . name ,
56+ locationOffset : this . locationOffset ,
57+ } ;
58+ }
5159}
5260
5361/**
You can’t perform that action at this time.
0 commit comments