Skip to content

Commit 4f76e9d

Browse files
committed
Use the value not the label for the print ast node
Fixes #659
1 parent 966cc5a commit 4f76e9d

2 files changed

Lines changed: 70 additions & 70 deletions

File tree

extensions/ql-vscode/src/contextual/astBuilder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ export default class AstBuilder {
7575

7676
// populate parents and children
7777
nodeTuples.tuples.forEach(tuple => {
78-
const [entity, tupleType, orderValue] = tuple as [EntityValue, string, string];
78+
const [entity, tupleType, value] = tuple as [EntityValue, string, string];
7979
const id = entity.id!;
8080

8181
switch (tupleType) {
8282
case 'semmle.order':
83-
astOrder.set(id, Number(orderValue));
83+
astOrder.set(id, Number(value));
8484
break;
8585

8686
case 'semmle.label': {
8787
const item = {
8888
id,
89-
label: entity.label,
89+
label: value ?? entity.label,
9090
location: entity.url,
9191
fileLocation: fileRangeFromURI(entity.url, this.db),
9292
children: [] as ChildAstItem[],

0 commit comments

Comments
 (0)