Skip to content

Commit 71c8b6b

Browse files
committed
Added source location in TreeNode
1 parent 7813bc6 commit 71c8b6b

File tree

1 file changed

+17
-1
lines changed
  • rocket-chatter-ingestion-server/src/process/prepare/processor/core

1 file changed

+17
-1
lines changed

rocket-chatter-ingestion-server/src/process/prepare/processor/core/treeNode.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
export type TreeNodeSourceLocation = {
2+
start: {
3+
line: number
4+
column: number
5+
index: number
6+
}
7+
end: {
8+
line: number
9+
column: number
10+
index: number
11+
}
12+
}
13+
114
export class TreeNode {
215
name: string = ""
316
type: string = ""
417
body: string = ""
518

19+
location: TreeNodeSourceLocation
620
sourceFileRelativePath: string
721

822
uses: {
@@ -14,12 +28,14 @@ export class TreeNode {
1428
name: string,
1529
type: string,
1630
body: string,
17-
sourceFilePath: string
31+
sourceFilePath: string,
32+
location: TreeNodeSourceLocation
1833
) {
1934
this.name = name
2035
this.type = type
2136
this.body = body
2237
this.sourceFileRelativePath = sourceFilePath
38+
this.location = location
2339
}
2440

2541
toString() {

0 commit comments

Comments
 (0)