Skip to content

Commit b3ea5e4

Browse files
committed
reverting the early exit after having done some profiling
1 parent b2d23ed commit b3ea5e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/slang-nodes/SlangNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export abstract class SlangNode {
129129
if (childNode === undefined) continue;
130130
const { leadingOffset, start } = childNode.loc;
131131

132-
if (leadingOffset > 0 && start - leadingOffset === loc.start) {
132+
if (start - leadingOffset === loc.start) {
133133
loc.leadingOffset = leadingOffset;
134134
loc.start = start;
135135
break;
@@ -142,7 +142,7 @@ export abstract class SlangNode {
142142
if (childNode === undefined) continue;
143143
const { trailingOffset, end } = childNode.loc;
144144

145-
if (trailingOffset > 0 && end + trailingOffset === loc.end) {
145+
if (end + trailingOffset === loc.end) {
146146
loc.trailingOffset = trailingOffset;
147147
loc.end = end;
148148
break;

0 commit comments

Comments
 (0)