Skip to content

Commit

Permalink
Use util for checking if a variable matches __brs_*
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-Holbrook committed Jan 8, 2025
1 parent c2cbced commit 12ca7ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/debugSession/BrightScriptDebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ export class BrightScriptDebugSession extends BaseDebugSession {
v.frameId = frameId;
v.type = result.type;
v.presentationHint = result.presentationHint ? { kind: result.presentationHint } : undefined;
if (v.name === '__brs_err__' || v.name === '__brs_errcond__') {
if (util.isBrsExceptionsVariable(v.name)) {
v.presentationHint = { kind: 'virtual' };
}

Expand Down
4 changes: 4 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ class Util {
this.minPort = port + 1;
return port;
}

public isBrsExceptionsVariable(variableName: string) {
return variableName.startsWith('__brs_');
}
}

export function defer<T>() {
Expand Down

0 comments on commit 12ca7ff

Please sign in to comment.