Skip to content

Commit

Permalink
fix: Remove EvaluatableExpression Provider as it should never have be…
Browse files Browse the repository at this point in the history
…en part of the debugger extension. (#918)

[skip ci]
  • Loading branch information
zobo authored Jul 26, 2023
1 parent 317a53d commit 1d76e1f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,6 @@ export function activate(context: vscode.ExtensionContext) {
},
})
)
context.subscriptions.push(
vscode.languages.registerEvaluatableExpressionProvider('php', {
// eslint-disable-next-line @typescript-eslint/require-await
async provideEvaluatableExpression(
document: vscode.TextDocument,
position: vscode.Position,
token: CancellationToken
): Promise<ProviderResult<vscode.EvaluatableExpression>> {
// see https://www.php.net/manual/en/language.variables.basics.php
// const wordRange = document.getWordRangeAtPosition(position, /\$([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)((->(?1))|\[(\d+|'[^']+'|"[^"]+"|(?0))\])*/)
const wordRange = document.getWordRangeAtPosition(
position,
/\$[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*(->[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)*/
)
if (wordRange) {
return new vscode.EvaluatableExpression(wordRange)
}
return undefined // nothing evaluatable found under mouse
},
})
)

context.subscriptions.push(
vscode.commands.registerCommand('php.debug.debugPhpFile', async (uri: vscode.Uri) => {
Expand Down

0 comments on commit 1d76e1f

Please sign in to comment.