Skip to content

Commit af40a7e

Browse files
DanTupcommit-bot@chromium.org
authored andcommitted
Improve regex to extract LSP request/notification methods
Change-Id: Ib4c0f1819155f1563ba3eeaafdcb3f5661064bf7 Reviewed-on: https://dart-review.googlesource.com/c/85947 Auto-Submit: Danny Tuppeny <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 2dbf91f commit af40a7e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5261,6 +5261,7 @@ class Method {
52615261
case r'client/unregisterCapability':
52625262
case r'workspace/didChangeWatchedFiles':
52635263
case r'workspace/symbol':
5264+
case r'workspace/executeCommand':
52645265
case r'workspace/applyEdit':
52655266
case r'textDocument/didOpen':
52665267
case r'textDocument/didChange':
@@ -5335,6 +5336,10 @@ class Method {
53355336
/// Constant for the 'workspace/symbol' method.
53365337
static const workspace_symbol = const Method._(r'workspace/symbol');
53375338

5339+
/// Constant for the 'workspace/executeCommand' method.
5340+
static const workspace_executeCommand =
5341+
const Method._(r'workspace/executeCommand');
5342+
53385343
/// Constant for the 'workspace/applyEdit' method.
53395344
static const workspace_applyEdit = const Method._(r'workspace/applyEdit');
53405345

pkg/analysis_server/tool/lsp_spec/markdown.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
final _typeScriptBlockPattern =
66
new RegExp(r'\B```typescript([\S\s]*?)\n```', multiLine: true);
77
final _methodNamesPattern = new RegExp(
8-
r'''_(?:Notification|Request)_:\r?\n\* method: '(.*?)'\r?\n''',
8+
r'''_(?:Notification|Request):?_:?\r?\n\* method: '(.*?)'\r?\n''',
99
multiLine: true);
1010

1111
/// Extracts fenced code blocks that are explicitly marked as TypeScript from a

0 commit comments

Comments
 (0)