Version 2.18.0-138.0.dev
Merge commit '77da5016fe3264dc368d618ad5ad5c9a64996826' into 'dev'
diff --git a/DEPS b/DEPS
index c058eae..60c3656 100644
--- a/DEPS
+++ b/DEPS
@@ -106,7 +106,7 @@
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
"dart_style_rev": "d7b73536a8079331c888b7da539b80e6825270ea",
- "dartdoc_rev": "334072b0cad436c05f6bcecf8a1a59f2f0809b84",
+ "dartdoc_rev": "cf0685a2d1ce7b698a5e155448d337b86381318a",
"devtools_rev": "3c16b8d73120e46958982d94215d499793b972eb",
"ffi_rev": "0c8364a728cfe4e4ba859c53b99d56b3dbe3add4",
"file_rev": "0132eeedea2933513bf230513a766a8baeab0c4f",
@@ -136,7 +136,7 @@
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
"pool_rev": "c40cc32eabecb9d60f1045d1403108d968805f9a",
"process_rev": "2546dfef7ba839b1514e0c9045344692eb47b771",
- "protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
+ "protobuf_rev": "b149f801cf7a5e959cf1dbf72d61068ac275f24b",
"pub_rev": "51435efcd574b7bc18d47a5dd620cb9759dea8f8",
"pub_semver_rev": "ea6c54019948dc03042c595ce9413e17aaf7aa38",
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
diff --git a/pkg/analysis_server/analysis_options.yaml b/pkg/analysis_server/analysis_options.yaml
index 548d7ea..a72e0f7 100644
--- a/pkg/analysis_server/analysis_options.yaml
+++ b/pkg/analysis_server/analysis_options.yaml
@@ -12,7 +12,6 @@
# Lints from the recommended set that conflict w/ analyzer style or will
# require some work to reach compliance.
# See: https://github.com/dart-lang/sdk/issues/48785
- avoid_renaming_method_parameters: ignore
camel_case_types: ignore
constant_identifier_names: ignore
file_names: ignore
diff --git a/pkg/analysis_server/benchmark/integration/operation.dart b/pkg/analysis_server/benchmark/integration/operation.dart
index 8a652aa..882c15f 100644
--- a/pkg/analysis_server/benchmark/integration/operation.dart
+++ b/pkg/analysis_server/benchmark/integration/operation.dart
@@ -19,8 +19,7 @@
late Stopwatch stopwatch;
bool firstNotification = true;
- CompletionRequestOperation(
- super.converter, super.json);
+ CompletionRequestOperation(super.converter, super.json);
@override
Future<void>? perform(Driver driver) {
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
index 8c4ec6d..f8096bd 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
@@ -7,7 +7,6 @@
// "pkg/analysis_server/tool/lsp_spec/generate_all.dart".
// ignore_for_file: annotate_overrides
-// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: prefer_is_not_operator
// ignore_for_file: unnecessary_parenthesis
@@ -41,9 +40,9 @@
final bool isAnalyzing;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['isAnalyzing'] = isAnalyzing;
- return __result;
+ var result = <String, Object?>{};
+ result['isAnalyzing'] = isAnalyzing;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -114,10 +113,10 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['label'] = label;
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['label'] = label;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -202,8 +201,8 @@
}
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- return __result;
+ var result = <String, Object?>{};
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -251,9 +250,9 @@
final int port;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['port'] = port;
- return __result;
+ var result = <String, Object?>{};
+ result['port'] = port;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -351,15 +350,15 @@
final int rOffset;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['displayUri'] = displayUri;
- __result['file'] = file;
- __result['iLength'] = iLength;
- __result['libId'] = libId;
- __result['offset'] = offset;
- __result['rLength'] = rLength;
- __result['rOffset'] = rOffset;
- return __result;
+ var result = <String, Object?>{};
+ result['displayUri'] = displayUri;
+ result['file'] = file;
+ result['iLength'] = iLength;
+ result['libId'] = libId;
+ result['offset'] = offset;
+ result['rLength'] = rLength;
+ result['rOffset'] = rOffset;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -576,22 +575,22 @@
final String? typeParameters;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind;
- __result['name'] = name;
+ var result = <String, Object?>{};
+ result['kind'] = kind;
+ result['name'] = name;
if (parameters != null) {
- __result['parameters'] = parameters;
+ result['parameters'] = parameters;
}
if (range != null) {
- __result['range'] = range?.toJson();
+ result['range'] = range?.toJson();
}
if (returnType != null) {
- __result['returnType'] = returnType;
+ result['returnType'] = returnType;
}
if (typeParameters != null) {
- __result['typeParameters'] = typeParameters;
+ result['typeParameters'] = typeParameters;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -774,30 +773,29 @@
final String? variableName;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (attributes != null) {
- __result['attributes'] =
- attributes?.map((item) => item.toJson()).toList();
+ result['attributes'] = attributes?.map((item) => item.toJson()).toList();
}
if (children != null) {
- __result['children'] = children?.map((item) => item.toJson()).toList();
+ result['children'] = children?.map((item) => item.toJson()).toList();
}
if (className != null) {
- __result['className'] = className;
+ result['className'] = className;
}
- __result['codeRange'] = codeRange.toJson();
+ result['codeRange'] = codeRange.toJson();
if (dartElement != null) {
- __result['dartElement'] = dartElement?.toJson();
+ result['dartElement'] = dartElement?.toJson();
}
- __result['kind'] = kind;
+ result['kind'] = kind;
if (label != null) {
- __result['label'] = label;
+ result['label'] = label;
}
- __result['range'] = range.toJson();
+ result['range'] = range.toJson();
if (variableName != null) {
- __result['variableName'] = variableName;
+ result['variableName'] = variableName;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1000,13 +998,13 @@
final Range? valueRange;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['label'] = label;
- __result['name'] = name;
+ var result = <String, Object?>{};
+ result['label'] = label;
+ result['name'] = name;
if (valueRange != null) {
- __result['valueRange'] = valueRange?.toJson();
+ result['valueRange'] = valueRange?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1128,16 +1126,16 @@
final Object? params;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (clientRequestTime != null) {
- __result['clientRequestTime'] = clientRequestTime;
+ result['clientRequestTime'] = clientRequestTime;
}
- __result['jsonrpc'] = jsonrpc;
- __result['method'] = method.toJson();
+ result['jsonrpc'] = jsonrpc;
+ result['method'] = method.toJson();
if (params != null) {
- __result['params'] = params;
+ result['params'] = params;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1250,12 +1248,12 @@
final String jsonrpc;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (clientRequestTime != null) {
- __result['clientRequestTime'] = clientRequestTime;
+ result['clientRequestTime'] = clientRequestTime;
}
- __result['jsonrpc'] = jsonrpc;
- return __result;
+ result['jsonrpc'] = jsonrpc;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1350,16 +1348,16 @@
final Object? params;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (clientRequestTime != null) {
- __result['clientRequestTime'] = clientRequestTime;
+ result['clientRequestTime'] = clientRequestTime;
}
- __result['jsonrpc'] = jsonrpc;
- __result['method'] = method.toJson();
+ result['jsonrpc'] = jsonrpc;
+ result['method'] = method.toJson();
if (params != null) {
- __result['params'] = params;
+ result['params'] = params;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1479,14 +1477,14 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (children != null) {
- __result['children'] = children?.map((item) => item.toJson()).toList();
+ result['children'] = children?.map((item) => item.toJson()).toList();
}
- __result['codeRange'] = codeRange.toJson();
- __result['element'] = element.toJson();
- __result['range'] = range.toJson();
- return __result;
+ result['codeRange'] = codeRange.toJson();
+ result['element'] = element.toJson();
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1612,9 +1610,9 @@
final String packageName;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['packageName'] = packageName;
- return __result;
+ var result = <String, Object?>{};
+ result['packageName'] = packageName;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1688,10 +1686,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['labels'] = labels.map((item) => item.toJson()).toList();
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['labels'] = labels.map((item) => item.toJson()).toList();
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1788,10 +1786,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['outline'] = outline.toJson();
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['outline'] = outline.toJson();
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1883,10 +1881,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['outline'] = outline.toJson();
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['outline'] = outline.toJson();
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1997,17 +1995,17 @@
final Object? params;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (clientRequestTime != null) {
- __result['clientRequestTime'] = clientRequestTime;
+ result['clientRequestTime'] = clientRequestTime;
}
- __result['id'] = id;
- __result['jsonrpc'] = jsonrpc;
- __result['method'] = method.toJson();
+ result['id'] = id;
+ result['jsonrpc'] = jsonrpc;
+ result['method'] = method.toJson();
if (params != null) {
- __result['params'] = params;
+ result['params'] = params;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2142,13 +2140,13 @@
final String message;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['code'] = code.toJson();
+ var result = <String, Object?>{};
+ result['code'] = code.toJson();
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
- __result['message'] = message;
- return __result;
+ result['message'] = message;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2276,20 +2274,20 @@
final Object? result;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var map = <String, Object?>{};
if (clientRequestTime != null) {
- __result['clientRequestTime'] = clientRequestTime;
+ map['clientRequestTime'] = clientRequestTime;
}
- __result['id'] = id;
- __result['jsonrpc'] = jsonrpc;
+ map['id'] = id;
+ map['jsonrpc'] = jsonrpc;
if (error != null && result != null) {
throw 'result and error cannot both be set';
} else if (error != null) {
- __result['error'] = error;
+ map['error'] = error;
} else {
- __result['result'] = result;
+ map['result'] = result;
}
- return __result;
+ return map;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2415,11 +2413,11 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['insertTextFormat'] = insertTextFormat.toJson();
- __result['newText'] = newText;
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['insertTextFormat'] = insertTextFormat.toJson();
+ result['newText'] = newText;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2532,12 +2530,12 @@
final bool valid;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (message != null) {
- __result['message'] = message;
+ result['message'] = message;
}
- __result['valid'] = valid;
- return __result;
+ result['valid'] = valid;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index 84ccaac..736dda0 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -7,7 +7,6 @@
// "pkg/analysis_server/tool/lsp_spec/generate_all.dart".
// ignore_for_file: annotate_overrides
-// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: prefer_is_not_operator
// ignore_for_file: unnecessary_parenthesis
@@ -59,11 +58,11 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['annotationId'] = annotationId;
- __result['newText'] = newText;
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['annotationId'] = annotationId;
+ result['newText'] = newText;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -180,12 +179,12 @@
final String? label;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['edit'] = edit.toJson();
+ var result = <String, Object?>{};
+ result['edit'] = edit.toJson();
if (label != null) {
- __result['label'] = label;
+ result['label'] = label;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -284,15 +283,15 @@
final String? failureReason;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['applied'] = applied;
+ var result = <String, Object?>{};
+ result['applied'] = applied;
if (failedChange != null) {
- __result['failedChange'] = failedChange;
+ result['failedChange'] = failedChange;
}
if (failureReason != null) {
- __result['failureReason'] = failureReason;
+ result['failureReason'] = failureReason;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -389,11 +388,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -462,10 +461,10 @@
final List<Range> fromRanges;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['from'] = from.toJson();
- __result['fromRanges'] = fromRanges.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['from'] = from.toJson();
+ result['fromRanges'] = fromRanges.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -584,15 +583,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['item'] = item.toJson();
+ var result = <String, Object?>{};
+ result['item'] = item.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -744,22 +743,22 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
if (detail != null) {
- __result['detail'] = detail;
+ result['detail'] = detail;
}
- __result['kind'] = kind.toJson();
- __result['name'] = name;
- __result['range'] = range.toJson();
- __result['selectionRange'] = selectionRange.toJson();
+ result['kind'] = kind.toJson();
+ result['name'] = name;
+ result['range'] = range.toJson();
+ result['selectionRange'] = selectionRange.toJson();
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- __result['uri'] = uri;
- return __result;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -938,11 +937,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1011,10 +1010,10 @@
final CallHierarchyItem to;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['fromRanges'] = fromRanges.map((item) => item.toJson()).toList();
- __result['to'] = to.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['fromRanges'] = fromRanges.map((item) => item.toJson()).toList();
+ result['to'] = to.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1133,15 +1132,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['item'] = item.toJson();
+ var result = <String, Object?>{};
+ result['item'] = item.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1259,13 +1258,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1390,15 +1389,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1496,9 +1495,9 @@
final Either2<int, String> id;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['id'] = id;
- return __result;
+ var result = <String, Object?>{};
+ result['id'] = id;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1583,15 +1582,15 @@
final bool? needsConfirmation;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (description != null) {
- __result['description'] = description;
+ result['description'] = description;
}
- __result['label'] = label;
+ result['label'] = label;
if (needsConfirmation != null) {
- __result['needsConfirmation'] = needsConfirmation;
+ result['needsConfirmation'] = needsConfirmation;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1735,26 +1734,26 @@
final WorkspaceClientCapabilities? workspace;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (experimental != null) {
- __result['experimental'] = experimental;
+ result['experimental'] = experimental;
}
if (general != null) {
- __result['general'] = general?.toJson();
+ result['general'] = general?.toJson();
}
if (notebookDocument != null) {
- __result['notebookDocument'] = notebookDocument?.toJson();
+ result['notebookDocument'] = notebookDocument?.toJson();
}
if (textDocument != null) {
- __result['textDocument'] = textDocument?.toJson();
+ result['textDocument'] = textDocument?.toJson();
}
if (window != null) {
- __result['window'] = window?.toJson();
+ result['window'] = window?.toJson();
}
if (workspace != null) {
- __result['workspace'] = workspace?.toJson();
+ result['workspace'] = workspace?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -1964,31 +1963,31 @@
final String title;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (command != null) {
- __result['command'] = command?.toJson();
+ result['command'] = command?.toJson();
}
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
if (diagnostics != null) {
- __result['diagnostics'] =
+ result['diagnostics'] =
diagnostics?.map((item) => item.toJson()).toList();
}
if (disabled != null) {
- __result['disabled'] = disabled?.toJson();
+ result['disabled'] = disabled?.toJson();
}
if (edit != null) {
- __result['edit'] = edit?.toJson();
+ result['edit'] = edit?.toJson();
}
if (isPreferred != null) {
- __result['isPreferred'] = isPreferred;
+ result['isPreferred'] = isPreferred;
}
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- __result['title'] = title;
- return __result;
+ result['title'] = title;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2197,29 +2196,29 @@
final CodeActionClientCapabilitiesResolveSupport? resolveSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (codeActionLiteralSupport != null) {
- __result['codeActionLiteralSupport'] = codeActionLiteralSupport?.toJson();
+ result['codeActionLiteralSupport'] = codeActionLiteralSupport?.toJson();
}
if (dataSupport != null) {
- __result['dataSupport'] = dataSupport;
+ result['dataSupport'] = dataSupport;
}
if (disabledSupport != null) {
- __result['disabledSupport'] = disabledSupport;
+ result['disabledSupport'] = disabledSupport;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (honorsChangeAnnotations != null) {
- __result['honorsChangeAnnotations'] = honorsChangeAnnotations;
+ result['honorsChangeAnnotations'] = honorsChangeAnnotations;
}
if (isPreferredSupport != null) {
- __result['isPreferredSupport'] = isPreferredSupport;
+ result['isPreferredSupport'] = isPreferredSupport;
}
if (resolveSupport != null) {
- __result['resolveSupport'] = resolveSupport?.toJson();
+ result['resolveSupport'] = resolveSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2363,9 +2362,9 @@
final CodeActionLiteralSupportCodeActionKind codeActionKind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['codeActionKind'] = codeActionKind.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['codeActionKind'] = codeActionKind.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2439,9 +2438,9 @@
final List<String> properties;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['properties'] = properties;
- return __result;
+ var result = <String, Object?>{};
+ result['properties'] = properties;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2543,15 +2542,15 @@
final CodeActionTriggerKind? triggerKind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['diagnostics'] = diagnostics.map((item) => item.toJson()).toList();
+ var result = <String, Object?>{};
+ result['diagnostics'] = diagnostics.map((item) => item.toJson()).toList();
if (only != null) {
- __result['only'] = only?.map((item) => item.toJson()).toList();
+ result['only'] = only?.map((item) => item.toJson()).toList();
}
if (triggerKind != null) {
- __result['triggerKind'] = triggerKind?.toJson();
+ result['triggerKind'] = triggerKind?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2654,9 +2653,9 @@
final String reason;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['reason'] = reason;
- return __result;
+ var result = <String, Object?>{};
+ result['reason'] = reason;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2778,7 +2777,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is CodeActionKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is CodeActionKind && other._value == _value;
}
class CodeActionLiteralSupportCodeActionKind implements ToJsonable {
@@ -2807,9 +2807,9 @@
final List<CodeActionKind> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -2903,18 +2903,18 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (codeActionKinds != null) {
- __result['codeActionKinds'] =
+ result['codeActionKinds'] =
codeActionKinds?.map((item) => item.toJson()).toList();
}
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3048,17 +3048,17 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['context'] = context.toJson();
+ var result = <String, Object?>{};
+ result['context'] = context.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3224,19 +3224,19 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (codeActionKinds != null) {
- __result['codeActionKinds'] =
+ result['codeActionKinds'] =
codeActionKinds?.map((item) => item.toJson()).toList();
}
- __result['documentSelector'] = documentSelector;
+ result['documentSelector'] = documentSelector;
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3354,8 +3354,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is CodeActionTriggerKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is CodeActionTriggerKind && other._value == _value;
}
/// Structure to capture a description for an error code.
@@ -3381,9 +3381,9 @@
final String href;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['href'] = href;
- return __result;
+ var result = <String, Object?>{};
+ result['href'] = href;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3473,15 +3473,15 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (command != null) {
- __result['command'] = command?.toJson();
+ result['command'] = command?.toJson();
}
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
- __result['range'] = range.toJson();
- return __result;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3564,11 +3564,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3635,14 +3635,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3744,15 +3744,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3864,15 +3864,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -3973,11 +3973,11 @@
final bool? refreshSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (refreshSupport != null) {
- __result['refreshSupport'] = refreshSupport;
+ result['refreshSupport'] = refreshSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4059,12 +4059,12 @@
final num red;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['alpha'] = alpha;
- __result['blue'] = blue;
- __result['green'] = green;
- __result['red'] = red;
- return __result;
+ var result = <String, Object?>{};
+ result['alpha'] = alpha;
+ result['blue'] = blue;
+ result['green'] = green;
+ result['red'] = red;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4200,10 +4200,10 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['color'] = color.toJson();
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['color'] = color.toJson();
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4314,16 +4314,16 @@
final TextEdit? textEdit;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (additionalTextEdits != null) {
- __result['additionalTextEdits'] =
+ result['additionalTextEdits'] =
additionalTextEdits?.map((item) => item.toJson()).toList();
}
- __result['label'] = label;
+ result['label'] = label;
if (textEdit != null) {
- __result['textEdit'] = textEdit?.toJson();
+ result['textEdit'] = textEdit?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4463,17 +4463,17 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['color'] = color.toJson();
+ var result = <String, Object?>{};
+ result['color'] = color.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4624,13 +4624,13 @@
final String title;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (arguments != null) {
- __result['arguments'] = arguments;
+ result['arguments'] = arguments;
}
- __result['command'] = command;
- __result['title'] = title;
- return __result;
+ result['command'] = command;
+ result['title'] = title;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -4782,26 +4782,26 @@
final InsertTextMode? insertTextMode;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (completionItem != null) {
- __result['completionItem'] = completionItem?.toJson();
+ result['completionItem'] = completionItem?.toJson();
}
if (completionItemKind != null) {
- __result['completionItemKind'] = completionItemKind?.toJson();
+ result['completionItemKind'] = completionItemKind?.toJson();
}
if (completionList != null) {
- __result['completionList'] = completionList?.toJson();
+ result['completionList'] = completionList?.toJson();
}
if (contextSupport != null) {
- __result['contextSupport'] = contextSupport;
+ result['contextSupport'] = contextSupport;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (insertTextMode != null) {
- __result['insertTextMode'] = insertTextMode?.toJson();
+ result['insertTextMode'] = insertTextMode?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -5028,39 +5028,39 @@
final CompletionItemTagSupport? tagSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (commitCharactersSupport != null) {
- __result['commitCharactersSupport'] = commitCharactersSupport;
+ result['commitCharactersSupport'] = commitCharactersSupport;
}
if (deprecatedSupport != null) {
- __result['deprecatedSupport'] = deprecatedSupport;
+ result['deprecatedSupport'] = deprecatedSupport;
}
if (documentationFormat != null) {
- __result['documentationFormat'] =
+ result['documentationFormat'] =
documentationFormat?.map((item) => item.toJson()).toList();
}
if (insertReplaceSupport != null) {
- __result['insertReplaceSupport'] = insertReplaceSupport;
+ result['insertReplaceSupport'] = insertReplaceSupport;
}
if (insertTextModeSupport != null) {
- __result['insertTextModeSupport'] = insertTextModeSupport?.toJson();
+ result['insertTextModeSupport'] = insertTextModeSupport?.toJson();
}
if (labelDetailsSupport != null) {
- __result['labelDetailsSupport'] = labelDetailsSupport;
+ result['labelDetailsSupport'] = labelDetailsSupport;
}
if (preselectSupport != null) {
- __result['preselectSupport'] = preselectSupport;
+ result['preselectSupport'] = preselectSupport;
}
if (resolveSupport != null) {
- __result['resolveSupport'] = resolveSupport?.toJson();
+ result['resolveSupport'] = resolveSupport?.toJson();
}
if (snippetSupport != null) {
- __result['snippetSupport'] = snippetSupport;
+ result['snippetSupport'] = snippetSupport;
}
if (tagSupport != null) {
- __result['tagSupport'] = tagSupport?.toJson();
+ result['tagSupport'] = tagSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -5251,11 +5251,11 @@
final List<CompletionItemKind>? valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (valueSet != null) {
- __result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
+ result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -5328,11 +5328,11 @@
final List<String>? itemDefaults;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (itemDefaults != null) {
- __result['itemDefaults'] = itemDefaults;
+ result['itemDefaults'] = itemDefaults;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -5406,12 +5406,12 @@
final CompletionTriggerKind triggerKind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (triggerCharacter != null) {
- __result['triggerCharacter'] = triggerCharacter;
+ result['triggerCharacter'] = triggerCharacter;
}
- __result['triggerKind'] = triggerKind.toJson();
- return __result;
+ result['triggerKind'] = triggerKind.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -5729,64 +5729,64 @@
final String? textEditText;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (additionalTextEdits != null) {
- __result['additionalTextEdits'] =
+ result['additionalTextEdits'] =
additionalTextEdits?.map((item) => item.toJson()).toList();
}
if (command != null) {
- __result['command'] = command?.toJson();
+ result['command'] = command?.toJson();
}
if (commitCharacters != null) {
- __result['commitCharacters'] = commitCharacters;
+ result['commitCharacters'] = commitCharacters;
}
if (data != null) {
- __result['data'] = data?.toJson();
+ result['data'] = data?.toJson();
}
if (deprecated != null) {
- __result['deprecated'] = deprecated;
+ result['deprecated'] = deprecated;
}
if (detail != null) {
- __result['detail'] = detail;
+ result['detail'] = detail;
}
if (documentation != null) {
- __result['documentation'] = documentation;
+ result['documentation'] = documentation;
}
if (filterText != null) {
- __result['filterText'] = filterText;
+ result['filterText'] = filterText;
}
if (insertText != null) {
- __result['insertText'] = insertText;
+ result['insertText'] = insertText;
}
if (insertTextFormat != null) {
- __result['insertTextFormat'] = insertTextFormat?.toJson();
+ result['insertTextFormat'] = insertTextFormat?.toJson();
}
if (insertTextMode != null) {
- __result['insertTextMode'] = insertTextMode?.toJson();
+ result['insertTextMode'] = insertTextMode?.toJson();
}
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- __result['label'] = label;
+ result['label'] = label;
if (labelDetails != null) {
- __result['labelDetails'] = labelDetails?.toJson();
+ result['labelDetails'] = labelDetails?.toJson();
}
if (preselect != null) {
- __result['preselect'] = preselect;
+ result['preselect'] = preselect;
}
if (sortText != null) {
- __result['sortText'] = sortText;
+ result['sortText'] = sortText;
}
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
if (textEdit != null) {
- __result['textEdit'] = textEdit;
+ result['textEdit'] = textEdit;
}
if (textEditText != null) {
- __result['textEditText'] = textEditText;
+ result['textEditText'] = textEditText;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6094,9 +6094,9 @@
final List<InsertTextMode> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6192,7 +6192,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is CompletionItemKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is CompletionItemKind && other._value == _value;
}
/// Additional details for a completion item label.
@@ -6229,14 +6230,14 @@
final String? detail;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (description != null) {
- __result['description'] = description;
+ result['description'] = description;
}
if (detail != null) {
- __result['detail'] = detail;
+ result['detail'] = detail;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6310,9 +6311,9 @@
final List<String> properties;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['properties'] = properties;
- return __result;
+ var result = <String, Object?>{};
+ result['properties'] = properties;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6385,7 +6386,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is CompletionItemTag && o._value == _value;
+ bool operator ==(Object other) =>
+ other is CompletionItemTag && other._value == _value;
}
class CompletionItemTagSupport implements ToJsonable {
@@ -6411,9 +6413,9 @@
final List<CompletionItemTag> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6519,13 +6521,13 @@
final List<CompletionItem> items;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['isIncomplete'] = isIncomplete;
+ var result = <String, Object?>{};
+ result['isIncomplete'] = isIncomplete;
if (itemDefaults != null) {
- __result['itemDefaults'] = itemDefaults?.toJson();
+ result['itemDefaults'] = itemDefaults?.toJson();
}
- __result['items'] = items.map((item) => item.toJson()).toList();
- return __result;
+ result['items'] = items.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6634,10 +6636,10 @@
final Range replace;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['insert'] = insert.toJson();
- __result['replace'] = replace.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['insert'] = insert.toJson();
+ result['replace'] = replace.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6765,20 +6767,20 @@
final InsertTextMode? insertTextMode;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (commitCharacters != null) {
- __result['commitCharacters'] = commitCharacters;
+ result['commitCharacters'] = commitCharacters;
}
if (editRange != null) {
- __result['editRange'] = editRange;
+ result['editRange'] = editRange;
}
if (insertTextFormat != null) {
- __result['insertTextFormat'] = insertTextFormat?.toJson();
+ result['insertTextFormat'] = insertTextFormat?.toJson();
}
if (insertTextMode != null) {
- __result['insertTextMode'] = insertTextMode?.toJson();
+ result['insertTextMode'] = insertTextMode?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -6939,23 +6941,23 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (allCommitCharacters != null) {
- __result['allCommitCharacters'] = allCommitCharacters;
+ result['allCommitCharacters'] = allCommitCharacters;
}
if (completionItem != null) {
- __result['completionItem'] = completionItem?.toJson();
+ result['completionItem'] = completionItem?.toJson();
}
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (triggerCharacters != null) {
- __result['triggerCharacters'] = triggerCharacters;
+ result['triggerCharacters'] = triggerCharacters;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7076,11 +7078,11 @@
final bool? labelDetailsSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (labelDetailsSupport != null) {
- __result['labelDetailsSupport'] = labelDetailsSupport;
+ result['labelDetailsSupport'] = labelDetailsSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7189,19 +7191,19 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (context != null) {
- __result['context'] = context?.toJson();
+ result['context'] = context?.toJson();
}
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7392,24 +7394,24 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (allCommitCharacters != null) {
- __result['allCommitCharacters'] = allCommitCharacters;
+ result['allCommitCharacters'] = allCommitCharacters;
}
if (completionItem != null) {
- __result['completionItem'] = completionItem?.toJson();
+ result['completionItem'] = completionItem?.toJson();
}
- __result['documentSelector'] = documentSelector;
+ result['documentSelector'] = documentSelector;
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (triggerCharacters != null) {
- __result['triggerCharacters'] = triggerCharacters;
+ result['triggerCharacters'] = triggerCharacters;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7563,8 +7565,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is CompletionTriggerKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is CompletionTriggerKind && other._value == _value;
}
class ConfigurationItem implements ToJsonable {
@@ -7595,14 +7597,14 @@
final String? section;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (scopeUri != null) {
- __result['scopeUri'] = scopeUri;
+ result['scopeUri'] = scopeUri;
}
if (section != null) {
- __result['section'] = section;
+ result['section'] = section;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7674,9 +7676,9 @@
final List<ConfigurationItem> items;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['items'] = items.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7776,16 +7778,16 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (annotationId != null) {
- __result['annotationId'] = annotationId;
+ result['annotationId'] = annotationId;
}
- __result['kind'] = kind;
+ result['kind'] = kind;
if (options != null) {
- __result['options'] = options?.toJson();
+ result['options'] = options?.toJson();
}
- __result['uri'] = uri;
- return __result;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7907,14 +7909,14 @@
final bool? overwrite;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (ignoreIfExists != null) {
- __result['ignoreIfExists'] = ignoreIfExists;
+ result['ignoreIfExists'] = ignoreIfExists;
}
if (overwrite != null) {
- __result['overwrite'] = overwrite;
+ result['overwrite'] = overwrite;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -7992,9 +7994,9 @@
final List<FileCreate> files;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['files'] = files.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['files'] = files.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8072,14 +8074,14 @@
final bool? linkSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (linkSupport != null) {
- __result['linkSupport'] = linkSupport;
+ result['linkSupport'] = linkSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8155,11 +8157,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8258,16 +8260,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8404,15 +8406,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8514,14 +8516,14 @@
final bool? linkSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (linkSupport != null) {
- __result['linkSupport'] = linkSupport;
+ result['linkSupport'] = linkSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8597,11 +8599,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8699,16 +8701,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8833,12 +8835,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -8949,16 +8951,16 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (annotationId != null) {
- __result['annotationId'] = annotationId;
+ result['annotationId'] = annotationId;
}
- __result['kind'] = kind;
+ result['kind'] = kind;
if (options != null) {
- __result['options'] = options?.toJson();
+ result['options'] = options?.toJson();
}
- __result['uri'] = uri;
- return __result;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9080,14 +9082,14 @@
final bool? recursive;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (ignoreIfNotExists != null) {
- __result['ignoreIfNotExists'] = ignoreIfNotExists;
+ result['ignoreIfNotExists'] = ignoreIfNotExists;
}
if (recursive != null) {
- __result['recursive'] = recursive;
+ result['recursive'] = recursive;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9165,9 +9167,9 @@
final List<FileDelete> files;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['files'] = files.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['files'] = files.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9309,32 +9311,32 @@
final List<DiagnosticTag>? tags;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (code != null) {
- __result['code'] = code;
+ result['code'] = code;
}
if (codeDescription != null) {
- __result['codeDescription'] = codeDescription?.toJson();
+ result['codeDescription'] = codeDescription?.toJson();
}
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
- __result['message'] = message;
- __result['range'] = range.toJson();
+ result['message'] = message;
+ result['range'] = range.toJson();
if (relatedInformation != null) {
- __result['relatedInformation'] =
+ result['relatedInformation'] =
relatedInformation?.map((item) => item.toJson()).toList();
}
if (severity != null) {
- __result['severity'] = severity?.toJson();
+ result['severity'] = severity?.toJson();
}
if (source != null) {
- __result['source'] = source;
+ result['source'] = source;
}
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9525,14 +9527,14 @@
final bool? relatedDocumentSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (relatedDocumentSupport != null) {
- __result['relatedDocumentSupport'] = relatedDocumentSupport;
+ result['relatedDocumentSupport'] = relatedDocumentSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9635,16 +9637,16 @@
final bool workspaceDiagnostics;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (identifier != null) {
- __result['identifier'] = identifier;
+ result['identifier'] = identifier;
}
- __result['interFileDependencies'] = interFileDependencies;
+ result['interFileDependencies'] = interFileDependencies;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- __result['workspaceDiagnostics'] = workspaceDiagnostics;
- return __result;
+ result['workspaceDiagnostics'] = workspaceDiagnostics;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9806,20 +9808,20 @@
final bool workspaceDiagnostics;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (identifier != null) {
- __result['identifier'] = identifier;
+ result['identifier'] = identifier;
}
- __result['interFileDependencies'] = interFileDependencies;
+ result['interFileDependencies'] = interFileDependencies;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- __result['workspaceDiagnostics'] = workspaceDiagnostics;
- return __result;
+ result['workspaceDiagnostics'] = workspaceDiagnostics;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -9975,10 +9977,10 @@
final String message;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['location'] = location.toJson();
- __result['message'] = message;
- return __result;
+ var result = <String, Object?>{};
+ result['location'] = location.toJson();
+ result['message'] = message;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10067,9 +10069,9 @@
final bool retriggerRequest;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['retriggerRequest'] = retriggerRequest;
- return __result;
+ var result = <String, Object?>{};
+ result['retriggerRequest'] = retriggerRequest;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10145,7 +10147,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is DiagnosticSeverity && o._value == _value;
+ bool operator ==(Object other) =>
+ other is DiagnosticSeverity && other._value == _value;
}
/// The diagnostic tags.
@@ -10179,7 +10182,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is DiagnosticTag && o._value == _value;
+ bool operator ==(Object other) =>
+ other is DiagnosticTag && other._value == _value;
}
/// Workspace client capabilities specific to diagnostic pull requests.
@@ -10212,11 +10216,11 @@
final bool? refreshSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (refreshSupport != null) {
- __result['refreshSupport'] = refreshSupport;
+ result['refreshSupport'] = refreshSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10277,11 +10281,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10341,9 +10345,9 @@
final Object? settings;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['settings'] = settings;
- return __result;
+ var result = <String, Object?>{};
+ result['settings'] = settings;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10414,10 +10418,10 @@
final VersionedNotebookDocumentIdentifier notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['change'] = change.toJson();
- __result['notebookDocument'] = notebookDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['change'] = change.toJson();
+ result['notebookDocument'] = notebookDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10543,10 +10547,10 @@
final VersionedTextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['contentChanges'] = contentChanges;
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['contentChanges'] = contentChanges;
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10663,14 +10667,14 @@
final bool? relativePatternSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (relativePatternSupport != null) {
- __result['relativePatternSupport'] = relativePatternSupport;
+ result['relativePatternSupport'] = relativePatternSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10748,9 +10752,9 @@
final List<FileEvent> changes;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['changes'] = changes.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['changes'] = changes.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10824,9 +10828,9 @@
final List<FileSystemWatcher> watchers;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['watchers'] = watchers.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['watchers'] = watchers.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10899,9 +10903,9 @@
final WorkspaceFoldersChangeEvent event;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['event'] = event.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['event'] = event.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -10982,11 +10986,11 @@
final NotebookDocumentIdentifier notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['cellTextDocuments'] =
+ var result = <String, Object?>{};
+ result['cellTextDocuments'] =
cellTextDocuments.map((item) => item.toJson()).toList();
- __result['notebookDocument'] = notebookDocument.toJson();
- return __result;
+ result['notebookDocument'] = notebookDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11081,9 +11085,9 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11162,11 +11166,11 @@
final NotebookDocument notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['cellTextDocuments'] =
+ var result = <String, Object?>{};
+ result['cellTextDocuments'] =
cellTextDocuments.map((item) => item.toJson()).toList();
- __result['notebookDocument'] = notebookDocument.toJson();
- return __result;
+ result['notebookDocument'] = notebookDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11260,9 +11264,9 @@
final TextDocumentItem textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11332,9 +11336,9 @@
final NotebookDocumentIdentifier notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['notebookDocument'] = notebookDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['notebookDocument'] = notebookDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11411,12 +11415,12 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (text != null) {
- __result['text'] = text;
+ result['text'] = text;
}
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11496,11 +11500,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11561,11 +11565,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11653,15 +11657,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11779,15 +11783,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -11926,21 +11930,21 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (identifier != null) {
- __result['identifier'] = identifier;
+ result['identifier'] = identifier;
}
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
if (previousResultId != null) {
- __result['previousResultId'] = previousResultId;
+ result['previousResultId'] = previousResultId;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12065,8 +12069,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is DocumentDiagnosticReportKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is DocumentDiagnosticReportKind && other._value == _value;
}
/// A partial result for a document diagnostic report.
@@ -12107,9 +12111,9 @@
UnchangedDocumentDiagnosticReport>> relatedDocuments;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['relatedDocuments'] = relatedDocuments;
- return __result;
+ var result = <String, Object?>{};
+ result['relatedDocuments'] = relatedDocuments;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12195,11 +12199,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12262,11 +12266,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12347,13 +12351,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['options'] = options.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['options'] = options.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12470,12 +12474,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12570,12 +12574,12 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- __result['range'] = range.toJson();
- return __result;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12655,11 +12659,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12726,8 +12730,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is DocumentHighlightKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is DocumentHighlightKind && other._value == _value;
}
class DocumentHighlightOptions implements WorkDoneProgressOptions, ToJsonable {
@@ -12754,11 +12758,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12857,16 +12861,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -12996,12 +13000,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13114,18 +13118,18 @@
final String? tooltip;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
- __result['range'] = range.toJson();
+ result['range'] = range.toJson();
if (target != null) {
- __result['target'] = target;
+ result['target'] = target;
}
if (tooltip != null) {
- __result['tooltip'] = tooltip;
+ result['tooltip'] = tooltip;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13228,14 +13232,14 @@
final bool? tooltipSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (tooltipSupport != null) {
- __result['tooltipSupport'] = tooltipSupport;
+ result['tooltipSupport'] = tooltipSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13317,14 +13321,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13427,15 +13431,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13551,15 +13555,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13654,11 +13658,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13731,12 +13735,12 @@
final List<String>? moreTriggerCharacter;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['firstTriggerCharacter'] = firstTriggerCharacter;
+ var result = <String, Object?>{};
+ result['firstTriggerCharacter'] = firstTriggerCharacter;
if (moreTriggerCharacter != null) {
- __result['moreTriggerCharacter'] = moreTriggerCharacter;
+ result['moreTriggerCharacter'] = moreTriggerCharacter;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -13849,12 +13853,12 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['ch'] = ch;
- __result['options'] = options.toJson();
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['ch'] = ch;
+ result['options'] = options.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14009,13 +14013,13 @@
final List<String>? moreTriggerCharacter;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
- __result['firstTriggerCharacter'] = firstTriggerCharacter;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
+ result['firstTriggerCharacter'] = firstTriggerCharacter;
if (moreTriggerCharacter != null) {
- __result['moreTriggerCharacter'] = moreTriggerCharacter;
+ result['moreTriggerCharacter'] = moreTriggerCharacter;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14122,11 +14126,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14190,11 +14194,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14283,14 +14287,14 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['options'] = options.toJson();
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['options'] = options.toJson();
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14427,12 +14431,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14581,24 +14585,24 @@
final List<SymbolTag>? tags;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (children != null) {
- __result['children'] = children?.map((item) => item.toJson()).toList();
+ result['children'] = children?.map((item) => item.toJson()).toList();
}
if (deprecated != null) {
- __result['deprecated'] = deprecated;
+ result['deprecated'] = deprecated;
}
if (detail != null) {
- __result['detail'] = detail;
+ result['detail'] = detail;
}
- __result['kind'] = kind.toJson();
- __result['name'] = name;
- __result['range'] = range.toJson();
- __result['selectionRange'] = selectionRange.toJson();
+ result['kind'] = kind.toJson();
+ result['name'] = name;
+ result['range'] = range.toJson();
+ result['selectionRange'] = selectionRange.toJson();
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14823,24 +14827,24 @@
final DocumentSymbolClientCapabilitiesTagSupport? tagSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (hierarchicalDocumentSymbolSupport != null) {
- __result['hierarchicalDocumentSymbolSupport'] =
+ result['hierarchicalDocumentSymbolSupport'] =
hierarchicalDocumentSymbolSupport;
}
if (labelSupport != null) {
- __result['labelSupport'] = labelSupport;
+ result['labelSupport'] = labelSupport;
}
if (symbolKind != null) {
- __result['symbolKind'] = symbolKind?.toJson();
+ result['symbolKind'] = symbolKind?.toJson();
}
if (tagSupport != null) {
- __result['tagSupport'] = tagSupport?.toJson();
+ result['tagSupport'] = tagSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -14967,11 +14971,11 @@
final List<SymbolKind>? valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (valueSet != null) {
- __result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
+ result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15039,9 +15043,9 @@
final List<SymbolTag> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15122,14 +15126,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (label != null) {
- __result['label'] = label;
+ result['label'] = label;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15232,15 +15236,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15358,15 +15362,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (label != null) {
- __result['label'] = label;
+ result['label'] = label;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15514,7 +15518,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is ErrorCodes && o._value == _value;
+ bool operator ==(Object other) =>
+ other is ErrorCodes && other._value == _value;
}
class ExecuteCommandClientCapabilities implements ToJsonable {
@@ -15538,11 +15543,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15610,12 +15615,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['commands'] = commands;
+ var result = <String, Object?>{};
+ result['commands'] = commands;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15720,15 +15725,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (arguments != null) {
- __result['arguments'] = arguments;
+ result['arguments'] = arguments;
}
- __result['command'] = command;
+ result['command'] = command;
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15834,12 +15839,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['commands'] = commands;
+ var result = <String, Object?>{};
+ result['commands'] = commands;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -15931,12 +15936,12 @@
final bool? success;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['executionOrder'] = executionOrder;
+ var result = <String, Object?>{};
+ result['executionOrder'] = executionOrder;
if (success != null) {
- __result['success'] = success;
+ result['success'] = success;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16040,7 +16045,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is FailureHandlingKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is FailureHandlingKind && other._value == _value;
}
/// The file event type.
@@ -16071,7 +16077,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is FileChangeType && o._value == _value;
+ bool operator ==(Object other) =>
+ other is FileChangeType && other._value == _value;
}
/// Represents information on a file/folder create.
@@ -16097,9 +16104,9 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16167,9 +16174,9 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16243,10 +16250,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['type'] = type;
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['type'] = type;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16376,29 +16383,29 @@
final bool? willRename;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (didCreate != null) {
- __result['didCreate'] = didCreate;
+ result['didCreate'] = didCreate;
}
if (didDelete != null) {
- __result['didDelete'] = didDelete;
+ result['didDelete'] = didDelete;
}
if (didRename != null) {
- __result['didRename'] = didRename;
+ result['didRename'] = didRename;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (willCreate != null) {
- __result['willCreate'] = willCreate;
+ result['willCreate'] = willCreate;
}
if (willDelete != null) {
- __result['willDelete'] = willDelete;
+ result['willDelete'] = willDelete;
}
if (willRename != null) {
- __result['willRename'] = willRename;
+ result['willRename'] = willRename;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16543,12 +16550,12 @@
final String? scheme;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['pattern'] = pattern.toJson();
+ var result = <String, Object?>{};
+ result['pattern'] = pattern.toJson();
if (scheme != null) {
- __result['scheme'] = scheme;
+ result['scheme'] = scheme;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16681,26 +16688,26 @@
final FileOperationRegistrationOptions? willRename;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (didCreate != null) {
- __result['didCreate'] = didCreate?.toJson();
+ result['didCreate'] = didCreate?.toJson();
}
if (didDelete != null) {
- __result['didDelete'] = didDelete?.toJson();
+ result['didDelete'] = didDelete?.toJson();
}
if (didRename != null) {
- __result['didRename'] = didRename?.toJson();
+ result['didRename'] = didRename?.toJson();
}
if (willCreate != null) {
- __result['willCreate'] = willCreate?.toJson();
+ result['willCreate'] = willCreate?.toJson();
}
if (willDelete != null) {
- __result['willDelete'] = willDelete?.toJson();
+ result['willDelete'] = willDelete?.toJson();
}
if (willRename != null) {
- __result['willRename'] = willRename?.toJson();
+ result['willRename'] = willRename?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16871,15 +16878,15 @@
final FileOperationPatternOptions? options;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['glob'] = glob;
+ var result = <String, Object?>{};
+ result['glob'] = glob;
if (matches != null) {
- __result['matches'] = matches?.toJson();
+ result['matches'] = matches?.toJson();
}
if (options != null) {
- __result['options'] = options?.toJson();
+ result['options'] = options?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -16980,8 +16987,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is FileOperationPatternKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is FileOperationPatternKind && other._value == _value;
}
/// Matching options for the file operation pattern.
@@ -17007,11 +17014,11 @@
final bool? ignoreCase;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (ignoreCase != null) {
- __result['ignoreCase'] = ignoreCase;
+ result['ignoreCase'] = ignoreCase;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17075,9 +17082,9 @@
final List<FileOperationFilter> filters;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['filters'] = filters.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['filters'] = filters.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17157,10 +17164,10 @@
final String oldUri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['newUri'] = newUri;
- __result['oldUri'] = oldUri;
- return __result;
+ var result = <String, Object?>{};
+ result['newUri'] = newUri;
+ result['oldUri'] = oldUri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17262,12 +17269,12 @@
final WatchKind? kind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['globPattern'] = globPattern;
+ var result = <String, Object?>{};
+ result['globPattern'] = globPattern;
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17399,22 +17406,22 @@
final int startLine;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (collapsedText != null) {
- __result['collapsedText'] = collapsedText;
+ result['collapsedText'] = collapsedText;
}
if (endCharacter != null) {
- __result['endCharacter'] = endCharacter;
+ result['endCharacter'] = endCharacter;
}
- __result['endLine'] = endLine;
+ result['endLine'] = endLine;
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
if (startCharacter != null) {
- __result['startCharacter'] = startCharacter;
+ result['startCharacter'] = startCharacter;
}
- __result['startLine'] = startLine;
- return __result;
+ result['startLine'] = startLine;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17593,23 +17600,23 @@
final int? rangeLimit;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (foldingRange != null) {
- __result['foldingRange'] = foldingRange?.toJson();
+ result['foldingRange'] = foldingRange?.toJson();
}
if (foldingRangeKind != null) {
- __result['foldingRangeKind'] = foldingRangeKind?.toJson();
+ result['foldingRangeKind'] = foldingRangeKind?.toJson();
}
if (lineFoldingOnly != null) {
- __result['lineFoldingOnly'] = lineFoldingOnly;
+ result['lineFoldingOnly'] = lineFoldingOnly;
}
if (rangeLimit != null) {
- __result['rangeLimit'] = rangeLimit;
+ result['rangeLimit'] = rangeLimit;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17728,11 +17735,11 @@
final bool? collapsedText;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (collapsedText != null) {
- __result['collapsedText'] = collapsedText;
+ result['collapsedText'] = collapsedText;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17797,11 +17804,11 @@
final List<FoldingRangeKind>? valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (valueSet != null) {
- __result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
+ result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17873,7 +17880,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is FoldingRangeKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is FoldingRangeKind && other._value == _value;
}
class FoldingRangeOptions implements WorkDoneProgressOptions, ToJsonable {
@@ -17899,11 +17907,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -17991,15 +17999,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18117,15 +18125,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18251,19 +18259,19 @@
final bool? trimTrailingWhitespace;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (insertFinalNewline != null) {
- __result['insertFinalNewline'] = insertFinalNewline;
+ result['insertFinalNewline'] = insertFinalNewline;
}
- __result['insertSpaces'] = insertSpaces;
- __result['tabSize'] = tabSize;
+ result['insertSpaces'] = insertSpaces;
+ result['tabSize'] = tabSize;
if (trimFinalNewlines != null) {
- __result['trimFinalNewlines'] = trimFinalNewlines;
+ result['trimFinalNewlines'] = trimFinalNewlines;
}
if (trimTrailingWhitespace != null) {
- __result['trimTrailingWhitespace'] = trimTrailingWhitespace;
+ result['trimTrailingWhitespace'] = trimTrailingWhitespace;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18420,13 +18428,13 @@
final String? resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items.map((item) => item.toJson()).toList();
- __result['kind'] = kind;
+ var result = <String, Object?>{};
+ result['items'] = items.map((item) => item.toJson()).toList();
+ result['kind'] = kind;
if (resultId != null) {
- __result['resultId'] = resultId;
+ result['resultId'] = resultId;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18581,21 +18589,21 @@
final GeneralClientCapabilitiesStaleRequestSupport? staleRequestSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (markdown != null) {
- __result['markdown'] = markdown?.toJson();
+ result['markdown'] = markdown?.toJson();
}
if (positionEncodings != null) {
- __result['positionEncodings'] =
+ result['positionEncodings'] =
positionEncodings?.map((item) => item.toJson()).toList();
}
if (regularExpressions != null) {
- __result['regularExpressions'] = regularExpressions?.toJson();
+ result['regularExpressions'] = regularExpressions?.toJson();
}
if (staleRequestSupport != null) {
- __result['staleRequestSupport'] = staleRequestSupport?.toJson();
+ result['staleRequestSupport'] = staleRequestSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18715,10 +18723,10 @@
final List<String> retryOnContentModified;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['cancel'] = cancel;
- __result['retryOnContentModified'] = retryOnContentModified;
- return __result;
+ var result = <String, Object?>{};
+ result['cancel'] = cancel;
+ result['retryOnContentModified'] = retryOnContentModified;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18827,12 +18835,12 @@
final Range? range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['contents'] = contents;
+ var result = <String, Object?>{};
+ result['contents'] = contents;
if (range != null) {
- __result['range'] = range?.toJson();
+ result['range'] = range?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -18924,15 +18932,15 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (contentFormat != null) {
- __result['contentFormat'] =
+ result['contentFormat'] =
contentFormat?.map((item) => item.toJson()).toList();
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19012,11 +19020,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19096,13 +19104,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19214,12 +19222,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19311,14 +19319,14 @@
final bool? linkSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (linkSupport != null) {
- __result['linkSupport'] = linkSupport;
+ result['linkSupport'] = linkSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19394,11 +19402,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19497,16 +19505,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19644,15 +19652,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -19839,33 +19847,33 @@
final List<WorkspaceFolder>? workspaceFolders;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['capabilities'] = capabilities.toJson();
+ var result = <String, Object?>{};
+ result['capabilities'] = capabilities.toJson();
if (clientInfo != null) {
- __result['clientInfo'] = clientInfo?.toJson();
+ result['clientInfo'] = clientInfo?.toJson();
}
if (initializationOptions != null) {
- __result['initializationOptions'] = initializationOptions;
+ result['initializationOptions'] = initializationOptions;
}
if (locale != null) {
- __result['locale'] = locale;
+ result['locale'] = locale;
}
- __result['processId'] = processId;
+ result['processId'] = processId;
if (rootPath != null) {
- __result['rootPath'] = rootPath;
+ result['rootPath'] = rootPath;
}
- __result['rootUri'] = rootUri;
+ result['rootUri'] = rootUri;
if (trace != null) {
- __result['trace'] = trace;
+ result['trace'] = trace;
}
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
if (workspaceFolders != null) {
- __result['workspaceFolders'] =
+ result['workspaceFolders'] =
workspaceFolders?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20055,12 +20063,12 @@
final String? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['name'] = name;
+ var result = <String, Object?>{};
+ result['name'] = name;
if (version != null) {
- __result['version'] = version;
+ result['version'] = version;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20152,12 +20160,12 @@
final InitializeResultServerInfo? serverInfo;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['capabilities'] = capabilities.toJson();
+ var result = <String, Object?>{};
+ result['capabilities'] = capabilities.toJson();
if (serverInfo != null) {
- __result['serverInfo'] = serverInfo?.toJson();
+ result['serverInfo'] = serverInfo?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20246,12 +20254,12 @@
final String? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['name'] = name;
+ var result = <String, Object?>{};
+ result['name'] = name;
if (version != null) {
- __result['version'] = version;
+ result['version'] = version;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20321,8 +20329,8 @@
}
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- return __result;
+ var result = <String, Object?>{};
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20463,28 +20471,28 @@
final Either2<MarkupContent, String>? tooltip;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- __result['label'] = label;
+ result['label'] = label;
if (paddingLeft != null) {
- __result['paddingLeft'] = paddingLeft;
+ result['paddingLeft'] = paddingLeft;
}
if (paddingRight != null) {
- __result['paddingRight'] = paddingRight;
+ result['paddingRight'] = paddingRight;
}
- __result['position'] = position.toJson();
+ result['position'] = position.toJson();
if (textEdits != null) {
- __result['textEdits'] = textEdits?.map((item) => item.toJson()).toList();
+ result['textEdits'] = textEdits?.map((item) => item.toJson()).toList();
}
if (tooltip != null) {
- __result['tooltip'] = tooltip;
+ result['tooltip'] = tooltip;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20658,14 +20666,14 @@
final InlayHintClientCapabilitiesResolveSupport? resolveSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (resolveSupport != null) {
- __result['resolveSupport'] = resolveSupport?.toJson();
+ result['resolveSupport'] = resolveSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20745,9 +20753,9 @@
final List<String> properties;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['properties'] = properties;
- return __result;
+ var result = <String, Object?>{};
+ result['properties'] = properties;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -20823,7 +20831,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is InlayHintKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is InlayHintKind && other._value == _value;
}
/// An inlay hint label part allows for interactive and composite labels of
@@ -20896,18 +20905,18 @@
final String value;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (command != null) {
- __result['command'] = command?.toJson();
+ result['command'] = command?.toJson();
}
if (location != null) {
- __result['location'] = location?.toJson();
+ result['location'] = location?.toJson();
}
if (tooltip != null) {
- __result['tooltip'] = tooltip;
+ result['tooltip'] = tooltip;
}
- __result['value'] = value;
- return __result;
+ result['value'] = value;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21027,14 +21036,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21130,13 +21139,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21270,18 +21279,18 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21396,11 +21405,11 @@
final bool? refreshSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (refreshSupport != null) {
- __result['refreshSupport'] = refreshSupport;
+ result['refreshSupport'] = refreshSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21463,11 +21472,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21536,10 +21545,10 @@
final Range stoppedLocation;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['frameId'] = frameId;
- __result['stoppedLocation'] = stoppedLocation.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['frameId'] = frameId;
+ result['stoppedLocation'] = stoppedLocation.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21644,12 +21653,12 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (expression != null) {
- __result['expression'] = expression;
+ result['expression'] = expression;
}
- __result['range'] = range.toJson();
- return __result;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21733,11 +21742,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21828,14 +21837,14 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['context'] = context.toJson();
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['context'] = context.toJson();
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -21981,15 +21990,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22092,10 +22101,10 @@
final String text;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['range'] = range.toJson();
- __result['text'] = text;
- return __result;
+ var result = <String, Object?>{};
+ result['range'] = range.toJson();
+ result['text'] = text;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22204,13 +22213,13 @@
final String? variableName;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['caseSensitiveLookup'] = caseSensitiveLookup;
- __result['range'] = range.toJson();
+ var result = <String, Object?>{};
+ result['caseSensitiveLookup'] = caseSensitiveLookup;
+ result['range'] = range.toJson();
if (variableName != null) {
- __result['variableName'] = variableName;
+ result['variableName'] = variableName;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22321,11 +22330,11 @@
final bool? refreshSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (refreshSupport != null) {
- __result['refreshSupport'] = refreshSupport;
+ result['refreshSupport'] = refreshSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22401,11 +22410,11 @@
final Range replace;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['insert'] = insert.toJson();
- __result['newText'] = newText;
- __result['replace'] = replace.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['insert'] = insert.toJson();
+ result['newText'] = newText;
+ result['replace'] = replace.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22529,7 +22538,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is InsertTextFormat && o._value == _value;
+ bool operator ==(Object other) =>
+ other is InsertTextFormat && other._value == _value;
}
/// How whitespace and indentation is handled during completion item insertion.
@@ -22566,7 +22576,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is InsertTextMode && o._value == _value;
+ bool operator ==(Object other) =>
+ other is InsertTextMode && other._value == _value;
}
class LinkedEditingRangeClientCapabilities implements ToJsonable {
@@ -22594,11 +22605,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22661,11 +22672,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22746,13 +22757,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22878,15 +22889,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -22994,12 +23005,12 @@
final String? wordPattern;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['ranges'] = ranges.map((item) => item.toJson()).toList();
+ var result = <String, Object?>{};
+ result['ranges'] = ranges.map((item) => item.toJson()).toList();
if (wordPattern != null) {
- __result['wordPattern'] = wordPattern;
+ result['wordPattern'] = wordPattern;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23086,10 +23097,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['range'] = range.toJson();
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['range'] = range.toJson();
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23208,14 +23219,14 @@
final String targetUri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (originSelectionRange != null) {
- __result['originSelectionRange'] = originSelectionRange?.toJson();
+ result['originSelectionRange'] = originSelectionRange?.toJson();
}
- __result['targetRange'] = targetRange.toJson();
- __result['targetSelectionRange'] = targetSelectionRange.toJson();
- __result['targetUri'] = targetUri;
- return __result;
+ result['targetRange'] = targetRange.toJson();
+ result['targetSelectionRange'] = targetSelectionRange.toJson();
+ result['targetUri'] = targetUri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23344,10 +23355,10 @@
final MessageType type;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['message'] = message;
- __result['type'] = type.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['message'] = message;
+ result['type'] = type.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23442,12 +23453,12 @@
final String? verbose;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['message'] = message;
+ var result = <String, Object?>{};
+ result['message'] = message;
if (verbose != null) {
- __result['verbose'] = verbose;
+ result['verbose'] = verbose;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23545,15 +23556,15 @@
final String? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (allowedTags != null) {
- __result['allowedTags'] = allowedTags;
+ result['allowedTags'] = allowedTags;
}
- __result['parser'] = parser;
+ result['parser'] = parser;
if (version != null) {
- __result['version'] = version;
+ result['version'] = version;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23677,10 +23688,10 @@
final String value;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind.toJson();
- __result['value'] = value;
- return __result;
+ var result = <String, Object?>{};
+ result['kind'] = kind.toJson();
+ result['value'] = value;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23780,7 +23791,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is MarkupKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is MarkupKind && other._value == _value;
}
class MessageActionItem implements ToJsonable {
@@ -23804,9 +23816,9 @@
final String title;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['title'] = title;
- return __result;
+ var result = <String, Object?>{};
+ result['title'] = title;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -23881,7 +23893,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is MessageType && o._value == _value;
+ bool operator ==(Object other) =>
+ other is MessageType && other._value == _value;
}
/// Valid LSP methods known at the time of code generation from the spec.
@@ -24207,7 +24220,7 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is Method && o._value == _value;
+ bool operator ==(Object other) => other is Method && other._value == _value;
}
/// Moniker definition to match LSIF 0.5 moniker definition.
@@ -24255,14 +24268,14 @@
final UniquenessLevel unique;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['identifier'] = identifier;
+ var result = <String, Object?>{};
+ result['identifier'] = identifier;
if (kind != null) {
- __result['kind'] = kind?.toJson();
+ result['kind'] = kind?.toJson();
}
- __result['scheme'] = scheme;
- __result['unique'] = unique.toJson();
- return __result;
+ result['scheme'] = scheme;
+ result['unique'] = unique.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24386,11 +24399,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24457,7 +24470,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is MonikerKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is MonikerKind && other._value == _value;
}
class MonikerOptions implements WorkDoneProgressOptions, ToJsonable {
@@ -24483,11 +24497,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24585,16 +24599,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24719,12 +24733,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24836,16 +24850,16 @@
final Object? metadata;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['document'] = document;
+ var result = <String, Object?>{};
+ result['document'] = document;
if (executionSummary != null) {
- __result['executionSummary'] = executionSummary?.toJson();
+ result['executionSummary'] = executionSummary?.toJson();
}
- __result['kind'] = kind.toJson();
+ result['kind'] = kind.toJson();
if (metadata != null) {
- __result['metadata'] = metadata;
+ result['metadata'] = metadata;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -24967,13 +24981,13 @@
final int start;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (cells != null) {
- __result['cells'] = cells?.map((item) => item.toJson()).toList();
+ result['cells'] = cells?.map((item) => item.toJson()).toList();
}
- __result['deleteCount'] = deleteCount;
- __result['start'] = start;
- return __result;
+ result['deleteCount'] = deleteCount;
+ result['start'] = start;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25084,7 +25098,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is NotebookCellKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is NotebookCellKind && other._value == _value;
}
/// A notebook cell text document filter denotes a cell text document by
@@ -25140,12 +25155,12 @@
String> notebook;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (language != null) {
- __result['language'] = language;
+ result['language'] = language;
}
- __result['notebook'] = notebook;
- return __result;
+ result['notebook'] = notebook;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25262,15 +25277,15 @@
final int version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['cells'] = cells.map((item) => item.toJson()).toList();
+ var result = <String, Object?>{};
+ result['cells'] = cells.map((item) => item.toJson()).toList();
if (metadata != null) {
- __result['metadata'] = metadata;
+ result['metadata'] = metadata;
}
- __result['notebookType'] = notebookType;
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ result['notebookType'] = notebookType;
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25415,14 +25430,14 @@
final Object? metadata;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (cells != null) {
- __result['cells'] = cells?.toJson();
+ result['cells'] = cells?.toJson();
}
if (metadata != null) {
- __result['metadata'] = metadata;
+ result['metadata'] = metadata;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25509,18 +25524,18 @@
final List<NotebookDocumentChangeEventTextContent>? textContent;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data?.map((item) => item.toJson()).toList();
+ result['data'] = data?.map((item) => item.toJson()).toList();
}
if (structure != null) {
- __result['structure'] = structure?.toJson();
+ result['structure'] = structure?.toJson();
}
if (textContent != null) {
- __result['textContent'] =
+ result['textContent'] =
textContent?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25644,15 +25659,15 @@
final List<TextDocumentItem>? didOpen;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['array'] = array.toJson();
+ var result = <String, Object?>{};
+ result['array'] = array.toJson();
if (didClose != null) {
- __result['didClose'] = didClose?.map((item) => item.toJson()).toList();
+ result['didClose'] = didClose?.map((item) => item.toJson()).toList();
}
if (didOpen != null) {
- __result['didOpen'] = didOpen?.map((item) => item.toJson()).toList();
+ result['didOpen'] = didOpen?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25774,10 +25789,10 @@
final VersionedTextDocumentIdentifier document;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['changes'] = changes;
- __result['document'] = document.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['changes'] = changes;
+ result['document'] = document.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25887,9 +25902,9 @@
final NotebookDocumentSyncClientCapabilities synchronization;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['synchronization'] = synchronization.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['synchronization'] = synchronization.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -25973,15 +25988,15 @@
final String? scheme;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['notebookType'] = notebookType;
+ var result = <String, Object?>{};
+ result['notebookType'] = notebookType;
if (pattern != null) {
- __result['pattern'] = pattern;
+ result['pattern'] = pattern;
}
if (scheme != null) {
- __result['scheme'] = scheme;
+ result['scheme'] = scheme;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26089,15 +26104,15 @@
final String scheme;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (notebookType != null) {
- __result['notebookType'] = notebookType;
+ result['notebookType'] = notebookType;
}
if (pattern != null) {
- __result['pattern'] = pattern;
+ result['pattern'] = pattern;
}
- __result['scheme'] = scheme;
- return __result;
+ result['scheme'] = scheme;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26205,15 +26220,15 @@
final String? scheme;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (notebookType != null) {
- __result['notebookType'] = notebookType;
+ result['notebookType'] = notebookType;
}
- __result['pattern'] = pattern;
+ result['pattern'] = pattern;
if (scheme != null) {
- __result['scheme'] = scheme;
+ result['scheme'] = scheme;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26309,9 +26324,9 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26384,11 +26399,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26482,12 +26497,12 @@
final bool? save;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['notebookSelector'] = notebookSelector;
+ var result = <String, Object?>{};
+ result['notebookSelector'] = notebookSelector;
if (save != null) {
- __result['save'] = save;
+ result['save'] = save;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26583,9 +26598,9 @@
final String language;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['language'] = language;
- return __result;
+ var result = <String, Object?>{};
+ result['language'] = language;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26651,9 +26666,9 @@
final String language;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['language'] = language;
- return __result;
+ var result = <String, Object?>{};
+ result['language'] = language;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26750,12 +26765,12 @@
String> notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (cells != null) {
- __result['cells'] = cells?.map((item) => item.toJson()).toList();
+ result['cells'] = cells?.map((item) => item.toJson()).toList();
}
- __result['notebookDocument'] = notebookDocument;
- return __result;
+ result['notebookDocument'] = notebookDocument;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -26883,12 +26898,12 @@
String>? notebookDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['cells'] = cells.map((item) => item.toJson()).toList();
+ var result = <String, Object?>{};
+ result['cells'] = cells.map((item) => item.toJson()).toList();
if (notebookDocument != null) {
- __result['notebookDocument'] = notebookDocument;
+ result['notebookDocument'] = notebookDocument;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27022,15 +27037,15 @@
final bool? save;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
- __result['notebookSelector'] = notebookSelector;
+ result['notebookSelector'] = notebookSelector;
if (save != null) {
- __result['save'] = save;
+ result['save'] = save;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27157,10 +27172,10 @@
final int? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27271,12 +27286,12 @@
final String label;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (documentation != null) {
- __result['documentation'] = documentation;
+ result['documentation'] = documentation;
}
- __result['label'] = label;
- return __result;
+ result['label'] = label;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27446,11 +27461,11 @@
final Either2<int, String>? partialResultToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27514,10 +27529,10 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['placeholder'] = placeholder;
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['placeholder'] = placeholder;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27616,10 +27631,10 @@
final int line;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['character'] = character;
- __result['line'] = line;
- return __result;
+ var result = <String, Object?>{};
+ result['character'] = character;
+ result['line'] = line;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27720,7 +27735,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is PositionEncodingKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is PositionEncodingKind && other._value == _value;
}
class PrepareRenameParams implements TextDocumentPositionParams, ToJsonable {
@@ -27752,10 +27768,10 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27846,8 +27862,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is PrepareSupportDefaultBehavior && o._value == _value;
+ bool operator ==(Object other) =>
+ other is PrepareSupportDefaultBehavior && other._value == _value;
}
/// A previous result id in a workspace pull request.
@@ -27880,10 +27896,10 @@
final String value;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- __result['value'] = value;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ result['value'] = value;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -27981,10 +27997,10 @@
final Object? value;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['token'] = token;
- __result['value'] = value;
- return __result;
+ var result = <String, Object?>{};
+ result['token'] = token;
+ result['value'] = value;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28093,23 +28109,23 @@
final bool? versionSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (codeDescriptionSupport != null) {
- __result['codeDescriptionSupport'] = codeDescriptionSupport;
+ result['codeDescriptionSupport'] = codeDescriptionSupport;
}
if (dataSupport != null) {
- __result['dataSupport'] = dataSupport;
+ result['dataSupport'] = dataSupport;
}
if (relatedInformation != null) {
- __result['relatedInformation'] = relatedInformation;
+ result['relatedInformation'] = relatedInformation;
}
if (tagSupport != null) {
- __result['tagSupport'] = tagSupport?.toJson();
+ result['tagSupport'] = tagSupport?.toJson();
}
if (versionSupport != null) {
- __result['versionSupport'] = versionSupport;
+ result['versionSupport'] = versionSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28227,9 +28243,9 @@
final List<DiagnosticTag> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28319,13 +28335,13 @@
final int? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['diagnostics'] = diagnostics.map((item) => item.toJson()).toList();
- __result['uri'] = uri;
+ var result = <String, Object?>{};
+ result['diagnostics'] = diagnostics.map((item) => item.toJson()).toList();
+ result['uri'] = uri;
if (version != null) {
- __result['version'] = version;
+ result['version'] = version;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28437,10 +28453,10 @@
final Position start;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['end'] = end.toJson();
- __result['start'] = start.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['end'] = end.toJson();
+ result['start'] = start.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28527,11 +28543,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28590,9 +28606,9 @@
final bool includeDeclaration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['includeDeclaration'] = includeDeclaration;
- return __result;
+ var result = <String, Object?>{};
+ result['includeDeclaration'] = includeDeclaration;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28660,11 +28676,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28769,17 +28785,17 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['context'] = context.toJson();
+ var result = <String, Object?>{};
+ result['context'] = context.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -28924,12 +28940,12 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29027,13 +29043,13 @@
final Object? registerOptions;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['id'] = id;
- __result['method'] = method;
+ var result = <String, Object?>{};
+ result['id'] = id;
+ result['method'] = method;
if (registerOptions != null) {
- __result['registerOptions'] = registerOptions;
+ result['registerOptions'] = registerOptions;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29125,10 +29141,10 @@
final List<Registration> registrations;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['registrations'] =
+ var result = <String, Object?>{};
+ result['registrations'] =
registrations.map((item) => item.toJson()).toList();
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29208,12 +29224,12 @@
final String? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['engine'] = engine;
+ var result = <String, Object?>{};
+ result['engine'] = engine;
if (version != null) {
- __result['version'] = version;
+ result['version'] = version;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29346,16 +29362,16 @@
final String? resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items.map((item) => item.toJson()).toList();
- __result['kind'] = kind;
+ var result = <String, Object?>{};
+ result['items'] = items.map((item) => item.toJson()).toList();
+ result['kind'] = kind;
if (relatedDocuments != null) {
- __result['relatedDocuments'] = relatedDocuments;
+ result['relatedDocuments'] = relatedDocuments;
}
if (resultId != null) {
- __result['resultId'] = resultId;
+ result['resultId'] = resultId;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29534,13 +29550,13 @@
final String resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind;
+ var result = <String, Object?>{};
+ result['kind'] = kind;
if (relatedDocuments != null) {
- __result['relatedDocuments'] = relatedDocuments;
+ result['relatedDocuments'] = relatedDocuments;
}
- __result['resultId'] = resultId;
- return __result;
+ result['resultId'] = resultId;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29678,10 +29694,10 @@
final String pattern;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['baseUri'] = baseUri;
- __result['pattern'] = pattern;
- return __result;
+ var result = <String, Object?>{};
+ result['baseUri'] = baseUri;
+ result['pattern'] = pattern;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29806,21 +29822,21 @@
final PrepareSupportDefaultBehavior? prepareSupportDefaultBehavior;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (honorsChangeAnnotations != null) {
- __result['honorsChangeAnnotations'] = honorsChangeAnnotations;
+ result['honorsChangeAnnotations'] = honorsChangeAnnotations;
}
if (prepareSupport != null) {
- __result['prepareSupport'] = prepareSupport;
+ result['prepareSupport'] = prepareSupport;
}
if (prepareSupportDefaultBehavior != null) {
- __result['prepareSupportDefaultBehavior'] =
+ result['prepareSupportDefaultBehavior'] =
prepareSupportDefaultBehavior?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -29959,17 +29975,17 @@
final RenameFileOptions? options;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (annotationId != null) {
- __result['annotationId'] = annotationId;
+ result['annotationId'] = annotationId;
}
- __result['kind'] = kind;
- __result['newUri'] = newUri;
- __result['oldUri'] = oldUri;
+ result['kind'] = kind;
+ result['newUri'] = newUri;
+ result['oldUri'] = oldUri;
if (options != null) {
- __result['options'] = options?.toJson();
+ result['options'] = options?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30111,14 +30127,14 @@
final bool? overwrite;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (ignoreIfExists != null) {
- __result['ignoreIfExists'] = ignoreIfExists;
+ result['ignoreIfExists'] = ignoreIfExists;
}
if (overwrite != null) {
- __result['overwrite'] = overwrite;
+ result['overwrite'] = overwrite;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30197,9 +30213,9 @@
final List<FileRename> files;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['files'] = files.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['files'] = files.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30276,14 +30292,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (prepareProvider != null) {
- __result['prepareProvider'] = prepareProvider;
+ result['prepareProvider'] = prepareProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30386,14 +30402,14 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['newName'] = newName;
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['newName'] = newName;
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30532,15 +30548,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (prepareProvider != null) {
- __result['prepareProvider'] = prepareProvider;
+ result['prepareProvider'] = prepareProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30646,8 +30662,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is ResourceOperationKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is ResourceOperationKind && other._value == _value;
}
class SaveOptions implements ToJsonable {
@@ -30671,11 +30687,11 @@
final bool? includeText;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (includeText != null) {
- __result['includeText'] = includeText;
+ result['includeText'] = includeText;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30743,12 +30759,12 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (parent != null) {
- __result['parent'] = parent?.toJson();
+ result['parent'] = parent?.toJson();
}
- __result['range'] = range.toJson();
- return __result;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30830,11 +30846,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30895,11 +30911,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -30996,16 +31012,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['positions'] = positions.map((item) => item.toJson()).toList();
- __result['textDocument'] = textDocument.toJson();
+ result['positions'] = positions.map((item) => item.toJson()).toList();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31145,15 +31161,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31255,8 +31271,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is SemanticTokenModifiers && o._value == _value;
+ bool operator ==(Object other) =>
+ other is SemanticTokenModifiers && other._value == _value;
}
class SemanticTokenTypes implements ToJsonable {
@@ -31303,7 +31319,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is SemanticTokenTypes && o._value == _value;
+ bool operator ==(Object other) =>
+ other is SemanticTokenTypes && other._value == _value;
}
class SemanticTokens implements ToJsonable {
@@ -31338,12 +31355,12 @@
final String? resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['data'] = data;
+ var result = <String, Object?>{};
+ result['data'] = data;
if (resultId != null) {
- __result['resultId'] = resultId;
+ result['resultId'] = resultId;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31506,27 +31523,27 @@
final List<String> tokenTypes;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (augmentsSyntaxTokens != null) {
- __result['augmentsSyntaxTokens'] = augmentsSyntaxTokens;
+ result['augmentsSyntaxTokens'] = augmentsSyntaxTokens;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- __result['formats'] = formats.map((item) => item.toJson()).toList();
+ result['formats'] = formats.map((item) => item.toJson()).toList();
if (multilineTokenSupport != null) {
- __result['multilineTokenSupport'] = multilineTokenSupport;
+ result['multilineTokenSupport'] = multilineTokenSupport;
}
if (overlappingTokenSupport != null) {
- __result['overlappingTokenSupport'] = overlappingTokenSupport;
+ result['overlappingTokenSupport'] = overlappingTokenSupport;
}
- __result['requests'] = requests.toJson();
+ result['requests'] = requests.toJson();
if (serverCancelSupport != null) {
- __result['serverCancelSupport'] = serverCancelSupport;
+ result['serverCancelSupport'] = serverCancelSupport;
}
- __result['tokenModifiers'] = tokenModifiers;
- __result['tokenTypes'] = tokenTypes;
- return __result;
+ result['tokenModifiers'] = tokenModifiers;
+ result['tokenTypes'] = tokenTypes;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31727,11 +31744,11 @@
final bool? delta;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (delta != null) {
- __result['delta'] = delta;
+ result['delta'] = delta;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31782,8 +31799,8 @@
}
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- return __result;
+ var result = <String, Object?>{};
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31861,14 +31878,14 @@
final Either2<bool, SemanticTokensClientCapabilitiesRange>? range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (full != null) {
- __result['full'] = full;
+ result['full'] = full;
}
if (range != null) {
- __result['range'] = range;
+ result['range'] = range;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -31957,12 +31974,12 @@
final String? resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['edits'] = edits.map((item) => item.toJson()).toList();
+ var result = <String, Object?>{};
+ result['edits'] = edits.map((item) => item.toJson()).toList();
if (resultId != null) {
- __result['resultId'] = resultId;
+ result['resultId'] = resultId;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32084,16 +32101,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['previousResultId'] = previousResultId;
- __result['textDocument'] = textDocument.toJson();
+ result['previousResultId'] = previousResultId;
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32211,9 +32228,9 @@
final List<SemanticTokensEdit> edits;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['edits'] = edits.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['edits'] = edits.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32299,13 +32316,13 @@
final int start;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
- __result['deleteCount'] = deleteCount;
- __result['start'] = start;
- return __result;
+ result['deleteCount'] = deleteCount;
+ result['start'] = start;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32419,10 +32436,10 @@
final List<String> tokenTypes;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['tokenModifiers'] = tokenModifiers;
- __result['tokenTypes'] = tokenTypes;
- return __result;
+ var result = <String, Object?>{};
+ result['tokenModifiers'] = tokenModifiers;
+ result['tokenTypes'] = tokenTypes;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32557,18 +32574,18 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (full != null) {
- __result['full'] = full;
+ result['full'] = full;
}
- __result['legend'] = legend.toJson();
+ result['legend'] = legend.toJson();
if (range != null) {
- __result['range'] = range;
+ result['range'] = range;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32680,11 +32697,11 @@
final bool? delta;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (delta != null) {
- __result['delta'] = delta;
+ result['delta'] = delta;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32733,8 +32750,8 @@
}
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- return __result;
+ var result = <String, Object?>{};
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32812,15 +32829,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['textDocument'] = textDocument.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -32916,9 +32933,9 @@
final List<int> data;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['data'] = data;
- return __result;
+ var result = <String, Object?>{};
+ result['data'] = data;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -33021,16 +33038,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['range'] = range.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['range'] = range.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -33208,22 +33225,22 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (full != null) {
- __result['full'] = full;
+ result['full'] = full;
}
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
- __result['legend'] = legend.toJson();
+ result['legend'] = legend.toJson();
if (range != null) {
- __result['range'] = range;
+ result['range'] = range;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -33374,11 +33391,11 @@
final bool? refreshSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (refreshSupport != null) {
- __result['refreshSupport'] = refreshSupport;
+ result['refreshSupport'] = refreshSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -34065,115 +34082,115 @@
final Either2<bool, WorkspaceSymbolOptions>? workspaceSymbolProvider;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (callHierarchyProvider != null) {
- __result['callHierarchyProvider'] = callHierarchyProvider;
+ result['callHierarchyProvider'] = callHierarchyProvider;
}
if (codeActionProvider != null) {
- __result['codeActionProvider'] = codeActionProvider;
+ result['codeActionProvider'] = codeActionProvider;
}
if (codeLensProvider != null) {
- __result['codeLensProvider'] = codeLensProvider?.toJson();
+ result['codeLensProvider'] = codeLensProvider?.toJson();
}
if (colorProvider != null) {
- __result['colorProvider'] = colorProvider;
+ result['colorProvider'] = colorProvider;
}
if (completionProvider != null) {
- __result['completionProvider'] = completionProvider?.toJson();
+ result['completionProvider'] = completionProvider?.toJson();
}
if (declarationProvider != null) {
- __result['declarationProvider'] = declarationProvider;
+ result['declarationProvider'] = declarationProvider;
}
if (definitionProvider != null) {
- __result['definitionProvider'] = definitionProvider;
+ result['definitionProvider'] = definitionProvider;
}
if (diagnosticProvider != null) {
- __result['diagnosticProvider'] = diagnosticProvider;
+ result['diagnosticProvider'] = diagnosticProvider;
}
if (documentFormattingProvider != null) {
- __result['documentFormattingProvider'] = documentFormattingProvider;
+ result['documentFormattingProvider'] = documentFormattingProvider;
}
if (documentHighlightProvider != null) {
- __result['documentHighlightProvider'] = documentHighlightProvider;
+ result['documentHighlightProvider'] = documentHighlightProvider;
}
if (documentLinkProvider != null) {
- __result['documentLinkProvider'] = documentLinkProvider?.toJson();
+ result['documentLinkProvider'] = documentLinkProvider?.toJson();
}
if (documentOnTypeFormattingProvider != null) {
- __result['documentOnTypeFormattingProvider'] =
+ result['documentOnTypeFormattingProvider'] =
documentOnTypeFormattingProvider?.toJson();
}
if (documentRangeFormattingProvider != null) {
- __result['documentRangeFormattingProvider'] =
+ result['documentRangeFormattingProvider'] =
documentRangeFormattingProvider;
}
if (documentSymbolProvider != null) {
- __result['documentSymbolProvider'] = documentSymbolProvider;
+ result['documentSymbolProvider'] = documentSymbolProvider;
}
if (executeCommandProvider != null) {
- __result['executeCommandProvider'] = executeCommandProvider?.toJson();
+ result['executeCommandProvider'] = executeCommandProvider?.toJson();
}
if (experimental != null) {
- __result['experimental'] = experimental;
+ result['experimental'] = experimental;
}
if (foldingRangeProvider != null) {
- __result['foldingRangeProvider'] = foldingRangeProvider;
+ result['foldingRangeProvider'] = foldingRangeProvider;
}
if (hoverProvider != null) {
- __result['hoverProvider'] = hoverProvider;
+ result['hoverProvider'] = hoverProvider;
}
if (implementationProvider != null) {
- __result['implementationProvider'] = implementationProvider;
+ result['implementationProvider'] = implementationProvider;
}
if (inlayHintProvider != null) {
- __result['inlayHintProvider'] = inlayHintProvider;
+ result['inlayHintProvider'] = inlayHintProvider;
}
if (inlineValueProvider != null) {
- __result['inlineValueProvider'] = inlineValueProvider;
+ result['inlineValueProvider'] = inlineValueProvider;
}
if (linkedEditingRangeProvider != null) {
- __result['linkedEditingRangeProvider'] = linkedEditingRangeProvider;
+ result['linkedEditingRangeProvider'] = linkedEditingRangeProvider;
}
if (monikerProvider != null) {
- __result['monikerProvider'] = monikerProvider;
+ result['monikerProvider'] = monikerProvider;
}
if (notebookDocumentSync != null) {
- __result['notebookDocumentSync'] = notebookDocumentSync;
+ result['notebookDocumentSync'] = notebookDocumentSync;
}
if (positionEncoding != null) {
- __result['positionEncoding'] = positionEncoding?.toJson();
+ result['positionEncoding'] = positionEncoding?.toJson();
}
if (referencesProvider != null) {
- __result['referencesProvider'] = referencesProvider;
+ result['referencesProvider'] = referencesProvider;
}
if (renameProvider != null) {
- __result['renameProvider'] = renameProvider;
+ result['renameProvider'] = renameProvider;
}
if (selectionRangeProvider != null) {
- __result['selectionRangeProvider'] = selectionRangeProvider;
+ result['selectionRangeProvider'] = selectionRangeProvider;
}
if (semanticTokensProvider != null) {
- __result['semanticTokensProvider'] = semanticTokensProvider;
+ result['semanticTokensProvider'] = semanticTokensProvider;
}
if (signatureHelpProvider != null) {
- __result['signatureHelpProvider'] = signatureHelpProvider?.toJson();
+ result['signatureHelpProvider'] = signatureHelpProvider?.toJson();
}
if (textDocumentSync != null) {
- __result['textDocumentSync'] = textDocumentSync;
+ result['textDocumentSync'] = textDocumentSync;
}
if (typeDefinitionProvider != null) {
- __result['typeDefinitionProvider'] = typeDefinitionProvider;
+ result['typeDefinitionProvider'] = typeDefinitionProvider;
}
if (typeHierarchyProvider != null) {
- __result['typeHierarchyProvider'] = typeHierarchyProvider;
+ result['typeHierarchyProvider'] = typeHierarchyProvider;
}
if (workspace != null) {
- __result['workspace'] = workspace?.toJson();
+ result['workspace'] = workspace?.toJson();
}
if (workspaceSymbolProvider != null) {
- __result['workspaceSymbolProvider'] = workspaceSymbolProvider;
+ result['workspaceSymbolProvider'] = workspaceSymbolProvider;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -34780,14 +34797,14 @@
final WorkspaceFoldersServerCapabilities? workspaceFolders;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (fileOperations != null) {
- __result['fileOperations'] = fileOperations?.toJson();
+ result['fileOperations'] = fileOperations?.toJson();
}
if (workspaceFolders != null) {
- __result['workspaceFolders'] = workspaceFolders?.toJson();
+ result['workspaceFolders'] = workspaceFolders?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -34867,9 +34884,9 @@
final String value;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['value'] = value;
- return __result;
+ var result = <String, Object?>{};
+ result['value'] = value;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -34938,9 +34955,9 @@
final bool support;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['support'] = support;
- return __result;
+ var result = <String, Object?>{};
+ result['support'] = support;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35038,18 +35055,18 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (external != null) {
- __result['external'] = external;
+ result['external'] = external;
}
if (selection != null) {
- __result['selection'] = selection?.toJson();
+ result['selection'] = selection?.toJson();
}
if (takeFocus != null) {
- __result['takeFocus'] = takeFocus;
+ result['takeFocus'] = takeFocus;
}
- __result['uri'] = uri;
- return __result;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35157,9 +35174,9 @@
final bool success;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['success'] = success;
- return __result;
+ var result = <String, Object?>{};
+ result['success'] = success;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35233,10 +35250,10 @@
final MessageType type;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['message'] = message;
- __result['type'] = type.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['message'] = message;
+ result['type'] = type.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35329,11 +35346,11 @@
messageActionItem;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (messageActionItem != null) {
- __result['messageActionItem'] = messageActionItem?.toJson();
+ result['messageActionItem'] = messageActionItem?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35400,11 +35417,11 @@
final bool? additionalPropertiesSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (additionalPropertiesSupport != null) {
- __result['additionalPropertiesSupport'] = additionalPropertiesSupport;
+ result['additionalPropertiesSupport'] = additionalPropertiesSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35484,13 +35501,13 @@
final MessageType type;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (actions != null) {
- __result['actions'] = actions?.map((item) => item.toJson()).toList();
+ result['actions'] = actions?.map((item) => item.toJson()).toList();
}
- __result['message'] = message;
- __result['type'] = type.toJson();
- return __result;
+ result['message'] = message;
+ result['type'] = type.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35629,15 +35646,15 @@
final List<SignatureInformation> signatures;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (activeParameter != null) {
- __result['activeParameter'] = activeParameter;
+ result['activeParameter'] = activeParameter;
}
if (activeSignature != null) {
- __result['activeSignature'] = activeSignature;
+ result['activeSignature'] = activeSignature;
}
- __result['signatures'] = signatures.map((item) => item.toJson()).toList();
- return __result;
+ result['signatures'] = signatures.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35756,17 +35773,17 @@
signatureInformation;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (contextSupport != null) {
- __result['contextSupport'] = contextSupport;
+ result['contextSupport'] = contextSupport;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (signatureInformation != null) {
- __result['signatureInformation'] = signatureInformation?.toJson();
+ result['signatureInformation'] = signatureInformation?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -35879,18 +35896,18 @@
final SignatureInformationParameterInformation? parameterInformation;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (activeParameterSupport != null) {
- __result['activeParameterSupport'] = activeParameterSupport;
+ result['activeParameterSupport'] = activeParameterSupport;
}
if (documentationFormat != null) {
- __result['documentationFormat'] =
+ result['documentationFormat'] =
documentationFormat?.map((item) => item.toJson()).toList();
}
if (parameterInformation != null) {
- __result['parameterInformation'] = parameterInformation?.toJson();
+ result['parameterInformation'] = parameterInformation?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36024,16 +36041,16 @@
final SignatureHelpTriggerKind triggerKind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (activeSignatureHelp != null) {
- __result['activeSignatureHelp'] = activeSignatureHelp?.toJson();
+ result['activeSignatureHelp'] = activeSignatureHelp?.toJson();
}
- __result['isRetrigger'] = isRetrigger;
+ result['isRetrigger'] = isRetrigger;
if (triggerCharacter != null) {
- __result['triggerCharacter'] = triggerCharacter;
+ result['triggerCharacter'] = triggerCharacter;
}
- __result['triggerKind'] = triggerKind.toJson();
- return __result;
+ result['triggerKind'] = triggerKind.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36171,17 +36188,17 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (retriggerCharacters != null) {
- __result['retriggerCharacters'] = retriggerCharacters;
+ result['retriggerCharacters'] = retriggerCharacters;
}
if (triggerCharacters != null) {
- __result['triggerCharacters'] = triggerCharacters;
+ result['triggerCharacters'] = triggerCharacters;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36307,16 +36324,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (context != null) {
- __result['context'] = context?.toJson();
+ result['context'] = context?.toJson();
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36467,18 +36484,18 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (retriggerCharacters != null) {
- __result['retriggerCharacters'] = retriggerCharacters;
+ result['retriggerCharacters'] = retriggerCharacters;
}
if (triggerCharacters != null) {
- __result['triggerCharacters'] = triggerCharacters;
+ result['triggerCharacters'] = triggerCharacters;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36599,8 +36616,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is SignatureHelpTriggerKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is SignatureHelpTriggerKind && other._value == _value;
}
/// Represents the signature of something callable. A signature can have a
@@ -36661,19 +36678,18 @@
final List<ParameterInformation>? parameters;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (activeParameter != null) {
- __result['activeParameter'] = activeParameter;
+ result['activeParameter'] = activeParameter;
}
if (documentation != null) {
- __result['documentation'] = documentation;
+ result['documentation'] = documentation;
}
- __result['label'] = label;
+ result['label'] = label;
if (parameters != null) {
- __result['parameters'] =
- parameters?.map((item) => item.toJson()).toList();
+ result['parameters'] = parameters?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36789,11 +36805,11 @@
final bool? labelOffsetSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (labelOffsetSupport != null) {
- __result['labelOffsetSupport'] = labelOffsetSupport;
+ result['labelOffsetSupport'] = labelOffsetSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -36899,11 +36915,11 @@
final String? id;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -37015,20 +37031,20 @@
final List<SymbolTag>? tags;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (containerName != null) {
- __result['containerName'] = containerName;
+ result['containerName'] = containerName;
}
if (deprecated != null) {
- __result['deprecated'] = deprecated;
+ result['deprecated'] = deprecated;
}
- __result['kind'] = kind.toJson();
- __result['location'] = location.toJson();
- __result['name'] = name;
+ result['kind'] = kind.toJson();
+ result['location'] = location.toJson();
+ result['name'] = name;
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -37200,7 +37216,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is SymbolKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is SymbolKind && other._value == _value;
}
/// Symbol tags are extra annotations that tweak the rendering of a symbol.
@@ -37226,7 +37243,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is SymbolTag && o._value == _value;
+ bool operator ==(Object other) =>
+ other is SymbolTag && other._value == _value;
}
/// Describe options to be used when registering for text document change
@@ -37266,10 +37284,10 @@
final TextDocumentSyncKind syncKind;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
- __result['syncKind'] = syncKind.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
+ result['syncKind'] = syncKind.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -37667,98 +37685,98 @@
final TypeHierarchyClientCapabilities1? typeHierarchy;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (callHierarchy != null) {
- __result['callHierarchy'] = callHierarchy?.toJson();
+ result['callHierarchy'] = callHierarchy?.toJson();
}
if (codeAction != null) {
- __result['codeAction'] = codeAction?.toJson();
+ result['codeAction'] = codeAction?.toJson();
}
if (codeLens != null) {
- __result['codeLens'] = codeLens?.toJson();
+ result['codeLens'] = codeLens?.toJson();
}
if (colorProvider != null) {
- __result['colorProvider'] = colorProvider?.toJson();
+ result['colorProvider'] = colorProvider?.toJson();
}
if (completion != null) {
- __result['completion'] = completion?.toJson();
+ result['completion'] = completion?.toJson();
}
if (declaration != null) {
- __result['declaration'] = declaration?.toJson();
+ result['declaration'] = declaration?.toJson();
}
if (definition != null) {
- __result['definition'] = definition?.toJson();
+ result['definition'] = definition?.toJson();
}
if (diagnostic != null) {
- __result['diagnostic'] = diagnostic?.toJson();
+ result['diagnostic'] = diagnostic?.toJson();
}
if (documentHighlight != null) {
- __result['documentHighlight'] = documentHighlight?.toJson();
+ result['documentHighlight'] = documentHighlight?.toJson();
}
if (documentLink != null) {
- __result['documentLink'] = documentLink?.toJson();
+ result['documentLink'] = documentLink?.toJson();
}
if (documentSymbol != null) {
- __result['documentSymbol'] = documentSymbol?.toJson();
+ result['documentSymbol'] = documentSymbol?.toJson();
}
if (foldingRange != null) {
- __result['foldingRange'] = foldingRange?.toJson();
+ result['foldingRange'] = foldingRange?.toJson();
}
if (formatting != null) {
- __result['formatting'] = formatting?.toJson();
+ result['formatting'] = formatting?.toJson();
}
if (hover != null) {
- __result['hover'] = hover?.toJson();
+ result['hover'] = hover?.toJson();
}
if (implementation != null) {
- __result['implementation'] = implementation?.toJson();
+ result['implementation'] = implementation?.toJson();
}
if (inlayHint != null) {
- __result['inlayHint'] = inlayHint?.toJson();
+ result['inlayHint'] = inlayHint?.toJson();
}
if (inlineValue != null) {
- __result['inlineValue'] = inlineValue?.toJson();
+ result['inlineValue'] = inlineValue?.toJson();
}
if (linkedEditingRange != null) {
- __result['linkedEditingRange'] = linkedEditingRange?.toJson();
+ result['linkedEditingRange'] = linkedEditingRange?.toJson();
}
if (moniker != null) {
- __result['moniker'] = moniker?.toJson();
+ result['moniker'] = moniker?.toJson();
}
if (onTypeFormatting != null) {
- __result['onTypeFormatting'] = onTypeFormatting?.toJson();
+ result['onTypeFormatting'] = onTypeFormatting?.toJson();
}
if (publishDiagnostics != null) {
- __result['publishDiagnostics'] = publishDiagnostics?.toJson();
+ result['publishDiagnostics'] = publishDiagnostics?.toJson();
}
if (rangeFormatting != null) {
- __result['rangeFormatting'] = rangeFormatting?.toJson();
+ result['rangeFormatting'] = rangeFormatting?.toJson();
}
if (references != null) {
- __result['references'] = references?.toJson();
+ result['references'] = references?.toJson();
}
if (rename != null) {
- __result['rename'] = rename?.toJson();
+ result['rename'] = rename?.toJson();
}
if (selectionRange != null) {
- __result['selectionRange'] = selectionRange?.toJson();
+ result['selectionRange'] = selectionRange?.toJson();
}
if (semanticTokens != null) {
- __result['semanticTokens'] = semanticTokens?.toJson();
+ result['semanticTokens'] = semanticTokens?.toJson();
}
if (signatureHelp != null) {
- __result['signatureHelp'] = signatureHelp?.toJson();
+ result['signatureHelp'] = signatureHelp?.toJson();
}
if (synchronization != null) {
- __result['synchronization'] = synchronization?.toJson();
+ result['synchronization'] = synchronization?.toJson();
}
if (typeDefinition != null) {
- __result['typeDefinition'] = typeDefinition?.toJson();
+ result['typeDefinition'] = typeDefinition?.toJson();
}
if (typeHierarchy != null) {
- __result['typeHierarchy'] = typeHierarchy?.toJson();
+ result['typeHierarchy'] = typeHierarchy?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38249,13 +38267,13 @@
final String text;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['range'] = range.toJson();
+ var result = <String, Object?>{};
+ result['range'] = range.toJson();
if (rangeLength != null) {
- __result['rangeLength'] = rangeLength;
+ result['rangeLength'] = rangeLength;
}
- __result['text'] = text;
- return __result;
+ result['text'] = text;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38357,9 +38375,9 @@
final String text;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['text'] = text;
- return __result;
+ var result = <String, Object?>{};
+ result['text'] = text;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38447,10 +38465,10 @@
final OptionalVersionedTextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['edits'] = edits;
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['edits'] = edits;
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38578,17 +38596,17 @@
final String? scheme;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (language != null) {
- __result['language'] = language;
+ result['language'] = language;
}
if (pattern != null) {
- __result['pattern'] = pattern;
+ result['pattern'] = pattern;
}
if (scheme != null) {
- __result['scheme'] = scheme;
+ result['scheme'] = scheme;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38681,9 +38699,9 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38772,12 +38790,12 @@
final int version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['languageId'] = languageId;
- __result['text'] = text;
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ var result = <String, Object?>{};
+ result['languageId'] = languageId;
+ result['text'] = text;
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -38959,10 +38977,10 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39154,9 +39172,9 @@
final List<TextDocumentFilter>? documentSelector;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
- return __result;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39232,8 +39250,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) =>
- o is TextDocumentSaveReason && o._value == _value;
+ bool operator ==(Object other) =>
+ other is TextDocumentSaveReason && other._value == _value;
}
class TextDocumentSaveRegistrationOptions
@@ -39270,12 +39288,12 @@
final bool? includeText;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (includeText != null) {
- __result['includeText'] = includeText;
+ result['includeText'] = includeText;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39382,20 +39400,20 @@
final bool? willSaveWaitUntil;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (didSave != null) {
- __result['didSave'] = didSave;
+ result['didSave'] = didSave;
}
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (willSave != null) {
- __result['willSave'] = willSave;
+ result['willSave'] = willSave;
}
if (willSaveWaitUntil != null) {
- __result['willSaveWaitUntil'] = willSaveWaitUntil;
+ result['willSaveWaitUntil'] = willSaveWaitUntil;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39503,7 +39521,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is TextDocumentSyncKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is TextDocumentSyncKind && other._value == _value;
}
class TextDocumentSyncOptions implements ToJsonable {
@@ -39571,23 +39590,23 @@
final bool? willSaveWaitUntil;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (change != null) {
- __result['change'] = change?.toJson();
+ result['change'] = change?.toJson();
}
if (openClose != null) {
- __result['openClose'] = openClose;
+ result['openClose'] = openClose;
}
if (save != null) {
- __result['save'] = save;
+ result['save'] = save;
}
if (willSave != null) {
- __result['willSave'] = willSave;
+ result['willSave'] = willSave;
}
if (willSaveWaitUntil != null) {
- __result['willSaveWaitUntil'] = willSaveWaitUntil;
+ result['willSaveWaitUntil'] = willSaveWaitUntil;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39713,10 +39732,10 @@
final Range range;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['newText'] = newText;
- __result['range'] = range.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['newText'] = newText;
+ result['range'] = range.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39802,7 +39821,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is TokenFormat && o._value == _value;
+ bool operator ==(Object other) =>
+ other is TokenFormat && other._value == _value;
}
class TypeDefinitionClientCapabilities implements ToJsonable {
@@ -39836,14 +39856,14 @@
final bool? linkSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (linkSupport != null) {
- __result['linkSupport'] = linkSupport;
+ result['linkSupport'] = linkSupport;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -39919,11 +39939,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40022,16 +40042,16 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40169,15 +40189,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40274,11 +40294,11 @@
final bool? dynamicRegistration;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40395,22 +40415,22 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (data != null) {
- __result['data'] = data;
+ result['data'] = data;
}
if (detail != null) {
- __result['detail'] = detail;
+ result['detail'] = detail;
}
- __result['kind'] = kind.toJson();
- __result['name'] = name;
- __result['range'] = range.toJson();
- __result['selectionRange'] = selectionRange.toJson();
+ result['kind'] = kind.toJson();
+ result['name'] = name;
+ result['range'] = range.toJson();
+ result['selectionRange'] = selectionRange.toJson();
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- __result['uri'] = uri;
- return __result;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40589,11 +40609,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40674,13 +40694,13 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['position'] = position.toJson();
- __result['textDocument'] = textDocument.toJson();
+ var result = <String, Object?>{};
+ result['position'] = position.toJson();
+ result['textDocument'] = textDocument.toJson();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40805,15 +40825,15 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['documentSelector'] = documentSelector;
+ var result = <String, Object?>{};
+ result['documentSelector'] = documentSelector;
if (id != null) {
- __result['id'] = id;
+ result['id'] = id;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -40934,15 +40954,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['item'] = item.toJson();
+ var result = <String, Object?>{};
+ result['item'] = item.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41065,15 +41085,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['item'] = item.toJson();
+ var result = <String, Object?>{};
+ result['item'] = item.toJson();
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41193,10 +41213,10 @@
final String resultId;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind;
- __result['resultId'] = resultId;
- return __result;
+ var result = <String, Object?>{};
+ result['kind'] = kind;
+ result['resultId'] = resultId;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41297,7 +41317,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is UniquenessLevel && o._value == _value;
+ bool operator ==(Object other) =>
+ other is UniquenessLevel && other._value == _value;
}
/// General parameters to unregister a capability.
@@ -41330,10 +41351,10 @@
final String method;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['id'] = id;
- __result['method'] = method;
- return __result;
+ var result = <String, Object?>{};
+ result['id'] = id;
+ result['method'] = method;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41424,10 +41445,10 @@
final List<Unregistration> unregisterations;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['unregisterations'] =
+ var result = <String, Object?>{};
+ result['unregisterations'] =
unregisterations.map((item) => item.toJson()).toList();
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41508,10 +41529,10 @@
final int version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41611,10 +41632,10 @@
final int version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41708,7 +41729,8 @@
@override
int get hashCode => _value.hashCode;
- bool operator ==(Object o) => o is WatchKind && o._value == _value;
+ bool operator ==(Object other) =>
+ other is WatchKind && other._value == _value;
}
/// The parameters send in a will save text document notification.
@@ -41741,10 +41763,10 @@
final TextDocumentIdentifier textDocument;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['reason'] = reason.toJson();
- __result['textDocument'] = textDocument.toJson();
- return __result;
+ var result = <String, Object?>{};
+ result['reason'] = reason.toJson();
+ result['textDocument'] = textDocument.toJson();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -41862,17 +41884,17 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (showDocument != null) {
- __result['showDocument'] = showDocument?.toJson();
+ result['showDocument'] = showDocument?.toJson();
}
if (showMessage != null) {
- __result['showMessage'] = showMessage?.toJson();
+ result['showMessage'] = showMessage?.toJson();
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42008,19 +42030,19 @@
final String title;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (cancellable != null) {
- __result['cancellable'] = cancellable;
+ result['cancellable'] = cancellable;
}
- __result['kind'] = kind;
+ result['kind'] = kind;
if (message != null) {
- __result['message'] = message;
+ result['message'] = message;
}
if (percentage != null) {
- __result['percentage'] = percentage;
+ result['percentage'] = percentage;
}
- __result['title'] = title;
- return __result;
+ result['title'] = title;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42150,9 +42172,9 @@
final Either2<int, String> token;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['token'] = token;
- return __result;
+ var result = <String, Object?>{};
+ result['token'] = token;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42223,9 +42245,9 @@
final Either2<int, String> token;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['token'] = token;
- return __result;
+ var result = <String, Object?>{};
+ result['token'] = token;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42303,12 +42325,12 @@
final String? message;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind;
+ var result = <String, Object?>{};
+ result['kind'] = kind;
if (message != null) {
- __result['message'] = message;
+ result['message'] = message;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42474,11 +42496,11 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42657,11 +42679,11 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -42757,18 +42779,18 @@
final int? percentage;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (cancellable != null) {
- __result['cancellable'] = cancellable;
+ result['cancellable'] = cancellable;
}
- __result['kind'] = kind;
+ result['kind'] = kind;
if (message != null) {
- __result['message'] = message;
+ result['message'] = message;
}
if (percentage != null) {
- __result['percentage'] = percentage;
+ result['percentage'] = percentage;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43010,50 +43032,50 @@
final bool? workspaceFolders;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (applyEdit != null) {
- __result['applyEdit'] = applyEdit;
+ result['applyEdit'] = applyEdit;
}
if (codeLens != null) {
- __result['codeLens'] = codeLens?.toJson();
+ result['codeLens'] = codeLens?.toJson();
}
if (configuration != null) {
- __result['configuration'] = configuration;
+ result['configuration'] = configuration;
}
if (diagnostics != null) {
- __result['diagnostics'] = diagnostics?.toJson();
+ result['diagnostics'] = diagnostics?.toJson();
}
if (didChangeConfiguration != null) {
- __result['didChangeConfiguration'] = didChangeConfiguration?.toJson();
+ result['didChangeConfiguration'] = didChangeConfiguration?.toJson();
}
if (didChangeWatchedFiles != null) {
- __result['didChangeWatchedFiles'] = didChangeWatchedFiles?.toJson();
+ result['didChangeWatchedFiles'] = didChangeWatchedFiles?.toJson();
}
if (executeCommand != null) {
- __result['executeCommand'] = executeCommand?.toJson();
+ result['executeCommand'] = executeCommand?.toJson();
}
if (fileOperations != null) {
- __result['fileOperations'] = fileOperations?.toJson();
+ result['fileOperations'] = fileOperations?.toJson();
}
if (inlayHint != null) {
- __result['inlayHint'] = inlayHint?.toJson();
+ result['inlayHint'] = inlayHint?.toJson();
}
if (inlineValue != null) {
- __result['inlineValue'] = inlineValue?.toJson();
+ result['inlineValue'] = inlineValue?.toJson();
}
if (semanticTokens != null) {
- __result['semanticTokens'] = semanticTokens?.toJson();
+ result['semanticTokens'] = semanticTokens?.toJson();
}
if (symbol != null) {
- __result['symbol'] = symbol?.toJson();
+ result['symbol'] = symbol?.toJson();
}
if (workspaceEdit != null) {
- __result['workspaceEdit'] = workspaceEdit?.toJson();
+ result['workspaceEdit'] = workspaceEdit?.toJson();
}
if (workspaceFolders != null) {
- __result['workspaceFolders'] = workspaceFolders;
+ result['workspaceFolders'] = workspaceFolders;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43342,19 +43364,19 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (identifier != null) {
- __result['identifier'] = identifier;
+ result['identifier'] = identifier;
}
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['previousResultIds'] =
+ result['previousResultIds'] =
previousResultIds.map((item) => item.toJson()).toList();
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43480,9 +43502,9 @@
WorkspaceUnchangedDocumentDiagnosticReport>> items;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items;
- return __result;
+ var result = <String, Object?>{};
+ result['items'] = items;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43581,9 +43603,9 @@
WorkspaceUnchangedDocumentDiagnosticReport>> items;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items;
- return __result;
+ var result = <String, Object?>{};
+ result['items'] = items;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43721,17 +43743,17 @@
documentChanges;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (changeAnnotations != null) {
- __result['changeAnnotations'] = changeAnnotations;
+ result['changeAnnotations'] = changeAnnotations;
}
if (changes != null) {
- __result['changes'] = changes;
+ result['changes'] = changes;
}
if (documentChanges != null) {
- __result['documentChanges'] = documentChanges;
+ result['documentChanges'] = documentChanges;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -43891,24 +43913,24 @@
final List<ResourceOperationKind>? resourceOperations;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (changeAnnotationSupport != null) {
- __result['changeAnnotationSupport'] = changeAnnotationSupport?.toJson();
+ result['changeAnnotationSupport'] = changeAnnotationSupport?.toJson();
}
if (documentChanges != null) {
- __result['documentChanges'] = documentChanges;
+ result['documentChanges'] = documentChanges;
}
if (failureHandling != null) {
- __result['failureHandling'] = failureHandling?.toJson();
+ result['failureHandling'] = failureHandling?.toJson();
}
if (normalizesLineEndings != null) {
- __result['normalizesLineEndings'] = normalizesLineEndings;
+ result['normalizesLineEndings'] = normalizesLineEndings;
}
if (resourceOperations != null) {
- __result['resourceOperations'] =
+ result['resourceOperations'] =
resourceOperations?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44030,11 +44052,11 @@
final bool? groupsOnLabel;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (groupsOnLabel != null) {
- __result['groupsOnLabel'] = groupsOnLabel;
+ result['groupsOnLabel'] = groupsOnLabel;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44103,10 +44125,10 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['name'] = name;
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['name'] = name;
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44205,10 +44227,10 @@
final List<WorkspaceFolder> removed;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['added'] = added.map((item) => item.toJson()).toList();
- __result['removed'] = removed.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['added'] = added.map((item) => item.toJson()).toList();
+ result['removed'] = removed.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44323,14 +44345,14 @@
final bool? supported;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (changeNotifications != null) {
- __result['changeNotifications'] = changeNotifications;
+ result['changeNotifications'] = changeNotifications;
}
if (supported != null) {
- __result['supported'] = supported;
+ result['supported'] = supported;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44446,15 +44468,15 @@
final int? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['items'] = items.map((item) => item.toJson()).toList();
- __result['kind'] = kind;
+ var result = <String, Object?>{};
+ result['items'] = items.map((item) => item.toJson()).toList();
+ result['kind'] = kind;
if (resultId != null) {
- __result['resultId'] = resultId;
+ result['resultId'] = resultId;
}
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44641,17 +44663,17 @@
final List<SymbolTag>? tags;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (containerName != null) {
- __result['containerName'] = containerName;
+ result['containerName'] = containerName;
}
- __result['kind'] = kind.toJson();
- __result['location'] = location;
- __result['name'] = name;
+ result['kind'] = kind.toJson();
+ result['location'] = location;
+ result['name'] = name;
if (tags != null) {
- __result['tags'] = tags?.map((item) => item.toJson()).toList();
+ result['tags'] = tags?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44824,20 +44846,20 @@
final WorkspaceSymbolClientCapabilitiesTagSupport? tagSupport;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (dynamicRegistration != null) {
- __result['dynamicRegistration'] = dynamicRegistration;
+ result['dynamicRegistration'] = dynamicRegistration;
}
if (resolveSupport != null) {
- __result['resolveSupport'] = resolveSupport?.toJson();
+ result['resolveSupport'] = resolveSupport?.toJson();
}
if (symbolKind != null) {
- __result['symbolKind'] = symbolKind?.toJson();
+ result['symbolKind'] = symbolKind?.toJson();
}
if (tagSupport != null) {
- __result['tagSupport'] = tagSupport?.toJson();
+ result['tagSupport'] = tagSupport?.toJson();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -44947,9 +44969,9 @@
final List<String> properties;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['properties'] = properties;
- return __result;
+ var result = <String, Object?>{};
+ result['properties'] = properties;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45028,11 +45050,11 @@
final List<SymbolKind>? valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (valueSet != null) {
- __result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
+ result['valueSet'] = valueSet?.map((item) => item.toJson()).toList();
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45100,9 +45122,9 @@
final List<SymbolTag> valueSet;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
- return __result;
+ var result = <String, Object?>{};
+ result['valueSet'] = valueSet.map((item) => item.toJson()).toList();
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45172,9 +45194,9 @@
final String uri;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['uri'] = uri;
- return __result;
+ var result = <String, Object?>{};
+ result['uri'] = uri;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45252,14 +45274,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45363,15 +45385,15 @@
final Either2<int, String>? workDoneToken;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (partialResultToken != null) {
- __result['partialResultToken'] = partialResultToken;
+ result['partialResultToken'] = partialResultToken;
}
- __result['query'] = query;
+ result['query'] = query;
if (workDoneToken != null) {
- __result['workDoneToken'] = workDoneToken;
+ result['workDoneToken'] = workDoneToken;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45476,14 +45498,14 @@
final bool? workDoneProgress;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
+ var result = <String, Object?>{};
if (resolveProvider != null) {
- __result['resolveProvider'] = resolveProvider;
+ result['resolveProvider'] = resolveProvider;
}
if (workDoneProgress != null) {
- __result['workDoneProgress'] = workDoneProgress;
+ result['workDoneProgress'] = workDoneProgress;
}
- return __result;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
@@ -45590,12 +45612,12 @@
final int? version;
Map<String, Object?> toJson() {
- var __result = <String, Object?>{};
- __result['kind'] = kind;
- __result['resultId'] = resultId;
- __result['uri'] = uri;
- __result['version'] = version;
- return __result;
+ var result = <String, Object?>{};
+ result['kind'] = kind;
+ result['resultId'] = resultId;
+ result['uri'] = uri;
+ result['version'] = version;
+ return result;
}
static bool canParse(Object? obj, LspJsonReporter reporter) {
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
index 57cce17..610813f 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
@@ -70,6 +70,7 @@
const Either2.t1(T1 this._t1)
: _t2 = null,
_which = 1;
+
const Either2.t2(T2 this._t2)
: _t1 = null,
_which = 2;
@@ -78,8 +79,10 @@
int get hashCode => map(lspHashCode, lspHashCode);
@override
- bool operator ==(o) =>
- o is Either2<T1, T2> && lspEquals(o._t1, _t1) && lspEquals(o._t2, _t2);
+ bool operator ==(other) =>
+ other is Either2<T1, T2> &&
+ lspEquals(other._t1, _t1) &&
+ lspEquals(other._t2, _t2);
T map<T>(T Function(T1) f1, T Function(T2) f2) {
return _which == 1 ? f1(_t1 as T1) : f2(_t2 as T2);
@@ -104,10 +107,12 @@
: _t2 = null,
_t3 = null,
_which = 1;
+
Either3.t2(this._t2)
: _t1 = null,
_t3 = null,
_which = 2;
+
Either3.t3(this._t3)
: _t1 = null,
_t2 = null,
@@ -117,11 +122,11 @@
int get hashCode => map(lspHashCode, lspHashCode, lspHashCode);
@override
- bool operator ==(o) =>
- o is Either3<T1, T2, T3> &&
- lspEquals(o._t1, _t1) &&
- lspEquals(o._t2, _t2) &&
- lspEquals(o._t3, _t3);
+ bool operator ==(other) =>
+ other is Either3<T1, T2, T3> &&
+ lspEquals(other._t1, _t1) &&
+ lspEquals(other._t2, _t2) &&
+ lspEquals(other._t3, _t3);
T map<T>(T Function(T1) f1, T Function(T2) f2, T Function(T3) f3) {
switch (_which) {
@@ -161,16 +166,19 @@
_t3 = null,
_t4 = null,
_which = 1;
+
Either4.t2(this._t2)
: _t1 = null,
_t3 = null,
_t4 = null,
_which = 2;
+
Either4.t3(this._t3)
: _t1 = null,
_t2 = null,
_t4 = null,
_which = 3;
+
Either4.t4(this._t4)
: _t1 = null,
_t2 = null,
@@ -181,12 +189,12 @@
int get hashCode => map(lspHashCode, lspHashCode, lspHashCode, lspHashCode);
@override
- bool operator ==(o) =>
- o is Either4<T1, T2, T3, T4> &&
- lspEquals(o._t1, _t1) &&
- lspEquals(o._t2, _t2) &&
- lspEquals(o._t3, _t3) &&
- lspEquals(o._t4, _t4);
+ bool operator ==(other) =>
+ other is Either4<T1, T2, T3, T4> &&
+ lspEquals(other._t1, _t1) &&
+ lspEquals(other._t2, _t2) &&
+ lspEquals(other._t3, _t3) &&
+ lspEquals(other._t4, _t4);
T map<T>(T Function(T1) f1, T Function(T2) f2, T Function(T3) f3,
T Function(T4) f4) {
@@ -221,6 +229,7 @@
class ErrorOr<T> extends Either2<ResponseError, T> {
ErrorOr.error(super.error) : super.t1();
+
ErrorOr.success(super.result) : super.t2();
/// Returns the error or throws if object is not an error. Check [isError]
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 5974884..c2fa2c8 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -931,26 +931,25 @@
}
@override
- void listenAnalysisDriver(analysis.AnalysisDriver analysisDriver) {
- analysisDriver.results.listen((result) {
+ void listenAnalysisDriver(analysis.AnalysisDriver driver) {
+ driver.results.listen((result) {
if (result is FileResult) {
_handleFileResult(result);
}
});
- analysisDriver.exceptions.listen(analysisServer.logExceptionResult);
- analysisDriver.priorityFiles = analysisServer.priorityFiles.toList();
+ driver.exceptions.listen(analysisServer.logExceptionResult);
+ driver.priorityFiles = analysisServer.priorityFiles.toList();
}
@override
- void pubspecChanged(String pubspecPath) {
- analysisServer.pubPackageService.fetchPackageVersionsViaPubOutdated(
- pubspecPath,
- pubspecWasModified: true);
+ void pubspecChanged(String path) {
+ analysisServer.pubPackageService
+ .fetchPackageVersionsViaPubOutdated(path, pubspecWasModified: true);
}
@override
- void pubspecRemoved(String pubspecPath) {
- analysisServer.pubPackageService.flushPackageCaches(pubspecPath);
+ void pubspecRemoved(String path) {
+ analysisServer.pubPackageService.flushPackageCaches(path);
}
@override
diff --git a/pkg/analysis_server/lib/src/channel/channel.dart b/pkg/analysis_server/lib/src/channel/channel.dart
index 37a6e86..3005cf3 100644
--- a/pkg/analysis_server/lib/src/channel/channel.dart
+++ b/pkg/analysis_server/lib/src/channel/channel.dart
@@ -61,7 +61,7 @@
/// Instances of the class [JsonStreamDecoder] convert JSON strings to values.
class JsonStreamDecoder extends Converter<String, Object?> {
@override
- Object? convert(String text) => json.decode(text);
+ Object? convert(String input) => json.decode(input);
@override
ChunkedConversionSink<String> startChunkedConversion(Sink<Object?> sink) =>
@@ -73,7 +73,7 @@
class NotificationConverter
extends Converter<Map<String, Object?>, Notification> {
@override
- Notification convert(Map json) => Notification.fromJson(json);
+ Notification convert(Map input) => Notification.fromJson(input);
@override
ChunkedConversionSink<Map<String, Object?>> startChunkedConversion(
@@ -84,7 +84,7 @@
/// Instances of the class [ResponseConverter] convert JSON maps to [Response]s.
class ResponseConverter extends Converter<Map<String, Object?>, Response?> {
@override
- Response? convert(Map<String, Object?> json) => Response.fromJson(json);
+ Response? convert(Map<String, Object?> input) => Response.fromJson(input);
@override
ChunkedConversionSink<Map<String, Object?>> startChunkedConversion(
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/abstract_refactor.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/abstract_refactor.dart
index c710951..414d320 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/abstract_refactor.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/abstract_refactor.dart
@@ -139,7 +139,7 @@
@override
Future<ErrorOr<void>> handle(List<Object?>? arguments,
- ProgressReporter reporter, CancellationToken cancellationToken) async {
+ ProgressReporter progress, CancellationToken cancellationToken) async {
if (arguments == null ||
arguments.length != 6 ||
arguments[0] is! String || // kind
@@ -169,7 +169,7 @@
final options = arguments[5] as Map<String, Object?>?;
return execute(path, kind, offset, length, options, cancellationToken,
- reporter, docVersion);
+ progress, docVersion);
}
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/fix_all.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/fix_all.dart
index c0c9aa7..6d0bdba 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/fix_all.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/fix_all.dart
@@ -19,7 +19,7 @@
@override
Future<ErrorOr<void>> handle(List<Object?>? arguments,
- ProgressReporter reporter, CancellationToken cancellationToken) async {
+ ProgressReporter progress, CancellationToken cancellationToken) async {
if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
return ErrorOr.error(ResponseError(
code: ServerErrorCodes.InvalidCommandArguments,
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
index 5e5bcf9..e7e89cc 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
@@ -17,7 +17,7 @@
@override
Future<ErrorOr<void>> handle(List<Object?>? arguments,
- ProgressReporter reporter, CancellationToken cancellationToken) async {
+ ProgressReporter progress, CancellationToken cancellationToken) async {
if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
return ErrorOr.error(ResponseError(
code: ServerErrorCodes.InvalidCommandArguments,
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
index 0043490..a430214 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
@@ -23,7 +23,7 @@
@override
Future<ErrorOr<void>> handle(List<Object?>? arguments,
- ProgressReporter reporter, CancellationToken cancellationToken) async {
+ ProgressReporter progress, CancellationToken cancellationToken) async {
if (arguments == null ||
arguments.length != 1 ||
arguments[0] is! Map<String, Object?>) {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
index 7634396..b008673 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
@@ -18,7 +18,7 @@
@override
Future<ErrorOr<void>> handle(List<Object?>? arguments,
- ProgressReporter reporter, CancellationToken cancellationToken) async {
+ ProgressReporter progress, CancellationToken cancellationToken) async {
if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
return ErrorOr.error(ResponseError(
code: ServerErrorCodes.InvalidCommandArguments,
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
index 067b15e..d29f493 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
@@ -9,6 +9,7 @@
class DiagnosticServerHandler
extends MessageHandler<void, DartDiagnosticServer> {
DiagnosticServerHandler(super.server);
+
@override
Method get handlesMessage => CustomMethods.diagnosticServer;
@@ -17,7 +18,7 @@
@override
Future<ErrorOr<DartDiagnosticServer>> handle(
- void _, MessageInfo message, CancellationToken token) async {
+ void params, MessageInfo message, CancellationToken token) async {
final diagnosticServer = server.diagnosticServer;
if (diagnosticServer == null) {
return error(ServerErrorCodes.FeatureDisabled,
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart
index 4dde991..b3355c2d 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart
@@ -8,6 +8,7 @@
class ReanalyzeHandler extends MessageHandler<void, void> {
ReanalyzeHandler(super.server);
+
@override
Method get handlesMessage => CustomMethods.reanalyze;
@@ -16,7 +17,7 @@
@override
Future<ErrorOr<void>> handle(
- void _, MessageInfo message, CancellationToken token) async {
+ void params, MessageInfo message, CancellationToken token) async {
server.reanalyze();
return success(null);
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
index 195fe66..772eb6b 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
@@ -33,18 +33,18 @@
@override
Future<ErrorOr<CompletionItem>> handle(
- CompletionItem item,
+ CompletionItem params,
MessageInfo message,
CancellationToken token,
) async {
- final resolutionInfo = item.data;
+ final resolutionInfo = params.data;
if (resolutionInfo is DartSuggestionSetCompletionItemResolutionInfo) {
- return resolveDartSuggestionSetCompletion(item, resolutionInfo, token);
+ return resolveDartSuggestionSetCompletion(params, resolutionInfo, token);
} else if (resolutionInfo is PubPackageCompletionItemResolutionInfo) {
- return resolvePubPackageCompletion(item, resolutionInfo, token);
+ return resolvePubPackageCompletion(params, resolutionInfo, token);
} else {
- return success(item);
+ return success(params);
}
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
index ebf7cdc..6a2cf7e 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
@@ -18,6 +18,7 @@
class ExecuteCommandHandler
extends MessageHandler<ExecuteCommandParams, Object?> {
final Map<String, CommandHandler> commandHandlers;
+
ExecuteCommandHandler(super.server)
: commandHandlers = {
Commands.sortMembers: SortMembersCommandHandler(server),
@@ -37,7 +38,7 @@
@override
Future<ErrorOr<Object?>> handle(ExecuteCommandParams params,
- MessageInfo message, CancellationToken cancellationToken) async {
+ MessageInfo message, CancellationToken token) async {
final handler = commandHandlers[params.command];
if (handler == null) {
return error(ServerErrorCodes.UnknownCommand,
@@ -50,6 +51,6 @@
: server.clientCapabilities?.workDoneProgress ?? false
? ProgressReporter.serverCreated(server)
: ProgressReporter.noop;
- return handler.handle(params.arguments, progress, cancellationToken);
+ return handler.handle(params.arguments, progress, token);
}
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
index e351b48..b8b2dbf 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
@@ -23,7 +23,7 @@
@override
Future<ErrorOr<void>> handle(
- void _, MessageInfo message, CancellationToken token) async {
+ void params, MessageInfo message, CancellationToken token) async {
// Set a flag that the server shutdown is being controlled here to ensure
// that the normal code that shuts down the server when the channel closes
// does not fire.
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
index 105a9e2..14348e8 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
@@ -12,6 +12,7 @@
final Method handlesMessage;
final ErrorCodes errorCode;
final String errorMessage;
+
RejectMessageHandler(
super.server, this.handlesMessage, this.errorCode, this.errorMessage);
@@ -20,7 +21,7 @@
@override
ErrorOr<void> handle(
- Object? _, MessageInfo message, CancellationToken token) {
+ Object? params, MessageInfo message, CancellationToken token) {
return error(errorCode, errorMessage, null);
}
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
index 4655b69..49e30bb 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
@@ -8,6 +8,7 @@
class ShutdownMessageHandler extends MessageHandler<void, void> {
ShutdownMessageHandler(super.server);
+
@override
Method get handlesMessage => Method.shutdown;
@@ -15,7 +16,8 @@
LspJsonHandler<void> get jsonHandler => NullJsonHandler;
@override
- ErrorOr<void> handle(void _, MessageInfo message, CancellationToken token) {
+ ErrorOr<void> handle(
+ void params, MessageInfo message, CancellationToken token) {
// Move to the Shutting Down state so we won't process any more
// requests and the Exit notification will know it was a clean shutdown.
server.messageHandler = ShuttingDownStateMessageHandler(server);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
index 3a80bca..faca1ad 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
@@ -232,8 +232,8 @@
try {
final result = await handler.handleMessage(message, messageInfo, token);
// Do a final check before returning the result, because if the request was
- // cancelled we can save the overhead of serialising everything to JSON
- // and the client to deserialising the same in order to read the ID to see
+ // cancelled we can save the overhead of serializing everything to JSON
+ // and the client to deserializing the same in order to read the ID to see
// that it was a request it didn't need (in the case of completions this
// can be quite large).
await Future.delayed(Duration.zero);
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index dbc2832..5f2e759 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -936,34 +936,33 @@
}
@override
- void listenAnalysisDriver(analysis.AnalysisDriver analysisDriver) {
+ void listenAnalysisDriver(analysis.AnalysisDriver driver) {
// TODO(dantup): Is this required, or covered by
// addContextsToDeclarationsTracker? The original server does not appear to
// have an equivalent call.
- final analysisContext = analysisDriver.analysisContext;
+ final analysisContext = driver.analysisContext;
if (analysisContext != null) {
analysisServer.declarationsTracker?.addContext(analysisContext);
}
- analysisDriver.results.listen((result) {
+ driver.results.listen((result) {
if (result is FileResult) {
_handleFileResult(result);
}
});
- analysisDriver.exceptions.listen(analysisServer.logExceptionResult);
- analysisDriver.priorityFiles = analysisServer.priorityFiles.toList();
+ driver.exceptions.listen(analysisServer.logExceptionResult);
+ driver.priorityFiles = analysisServer.priorityFiles.toList();
}
@override
- void pubspecChanged(String pubspecPath) {
- analysisServer.pubPackageService.fetchPackageVersionsViaPubOutdated(
- pubspecPath,
- pubspecWasModified: true);
+ void pubspecChanged(String path) {
+ analysisServer.pubPackageService
+ .fetchPackageVersionsViaPubOutdated(path, pubspecWasModified: true);
}
@override
- void pubspecRemoved(String pubspecPath) {
- analysisServer.pubPackageService.flushPackageCaches(pubspecPath);
+ void pubspecRemoved(String path) {
+ analysisServer.pubPackageService.flushPackageCaches(path);
}
@override
diff --git a/pkg/analysis_server/lib/src/lsp/mapping.dart b/pkg/analysis_server/lib/src/lsp/mapping.dart
index 9e0fef2..59eb715 100644
--- a/pkg/analysis_server/lib/src/lsp/mapping.dart
+++ b/pkg/analysis_server/lib/src/lsp/mapping.dart
@@ -813,7 +813,7 @@
tags: getDiagnosticTags(supportedTags, error),
relatedInformation: relatedInformation,
// Only include codeDescription if the client explicitly supports it
- // (a minor optimization to avoid unnecessary payload/(de)serialisation).
+ // (a minor optimization to avoid unnecessary payload/(de)serialization).
codeDescription: clientSupportsCodeDescription && documentationUrl != null
? CodeDescription(href: documentationUrl)
: null,
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
index 4b72c5e..e64fb09 100644
--- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
+++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -1415,45 +1415,47 @@
static SignatureElementVisitor instance = SignatureElementVisitor();
@override
- StringBuffer visitCompilationUnitElement(CompilationUnitElement e) {
+ StringBuffer visitCompilationUnitElement(CompilationUnitElement element) {
return StringBuffer();
}
@override
- StringBuffer visitElement(Element e) {
- assert(e is! MultiplyInheritedExecutableElement);
- var enclosingElt = e.enclosingElement!;
+ StringBuffer visitElement(Element element) {
+ assert(element is! MultiplyInheritedExecutableElement);
+ var enclosingElt = element.enclosingElement!;
var buffer = enclosingElt.accept(this)!;
if (buffer.isNotEmpty) {
buffer.write('#');
}
- if (e is MethodElement && e.name == '-' && e.parameters.length == 1) {
+ if (element is MethodElement &&
+ element.name == '-' &&
+ element.parameters.length == 1) {
buffer.write('unary-');
- } else if (e is ConstructorElement) {
- buffer.write(_computeConstructorElementName(e));
+ } else if (element is ConstructorElement) {
+ buffer.write(_computeConstructorElementName(element));
} else {
- buffer.write(e.name);
+ buffer.write(element.name);
}
if (enclosingElt is ExecutableElement) {
buffer
..write('@')
- ..write(e.nameOffset - enclosingElt.nameOffset);
+ ..write(element.nameOffset - enclosingElt.nameOffset);
}
return buffer;
}
@override
- StringBuffer visitLibraryElement(LibraryElement e) {
- return StringBuffer('library:${e.displayName}');
+ StringBuffer visitLibraryElement(LibraryElement element) {
+ return StringBuffer('library:${element.displayName}');
}
@override
- StringBuffer visitTypeParameterElement(TypeParameterElement e) {
+ StringBuffer visitTypeParameterElement(TypeParameterElement element) {
// It is legal to have a named constructor with the same name as a type
// parameter. So we distinguish them by using '.' between the class (or
// typedef) name and the type parameter name.
- return e.enclosingElement!.accept(this)!
+ return element.enclosingElement!.accept(this)!
..write('.')
- ..write(e.name);
+ ..write(element.name);
}
}
diff --git a/pkg/analysis_server/test/lsp/document_symbols_test.dart b/pkg/analysis_server/test/lsp/document_symbols_test.dart
index a64a535..99738c3 100644
--- a/pkg/analysis_server/test/lsp/document_symbols_test.dart
+++ b/pkg/analysis_server/test/lsp/document_symbols_test.dart
@@ -217,7 +217,7 @@
await initialize();
final result = await getDocumentSymbols(pubspecFileUri);
- // Since the list is empty, it will deserialise into whatever the first
+ // Since the list is empty, it will deserialize into whatever the first
// type is, so just accept both types.
final symbols = result.map(
(docsymbols) => docsymbols,
diff --git a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
index 1af098a..b411ff6 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
@@ -92,7 +92,7 @@
);
});
- test('serialises enums to their underlying values', () {
+ test('serializes enums to their underlying values', () {
final foldingRange = FoldingRange(
startLine: 1,
startCharacter: 2,
@@ -374,9 +374,9 @@
expect(message.params, isNull);
});
- test('deserialises subtypes into the correct class', () {
- // Create some JSON that includes a VersionedTextDocumentIdenfitier but
- // where the class definition only references a TextDocumentIdemntifier.
+ test('deserializes subtypes into the correct class', () {
+ // Create some JSON that includes a VersionedTextDocumentIdentifier but
+ // where the class definition only references a TextDocumentIdentifier.
final input = jsonEncode(TextDocumentPositionParams(
textDocument: VersionedTextDocumentIdentifier(
version: 111, uri: 'file:///foo/bar.dart'),
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 3ed9228..14e8620 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'package:collection/collection.dart';
import 'package:dart_style/dart_style.dart';
import 'typescript_parser.dart';
@@ -18,7 +19,7 @@
/// from canParse() for the correct type). This is to allow us to have some
/// type safety for these values but without restricting which values are allowed.
/// This is to support things like custom error codes and also future changes
-/// in the spec (it's important the server doesn't crash on deserialising
+/// in the spec (it's important the server doesn't crash on deserializing
/// newer values).
bool enumClassAllowsAnyValue(String name) {
// The types listed here are the ones that have a guaranteed restricted type
@@ -53,7 +54,7 @@
types.whereType<Interface>().forEach((interface) {
_interfaces[interface.name] = interface;
// Keep track of our base classes so they can look up their super classes
- // later in their fromJson() to deserialise into the most specific type.
+ // later in their fromJson() to deserialize into the most specific type.
for (var base in interface.baseTypes) {
final subTypes = _subtypes[base.dartType] ??= <String>[];
subTypes.add(interface.name);
@@ -136,6 +137,22 @@
return type;
}
+String _determineVariableName(
+ Interface interface, Iterable<String> suggestions) {
+ var fieldNames = _getAllFields(interface).map((f) => f.name).toList();
+ var suggestion = suggestions.firstWhereOrNull((s) => !fieldNames.contains(s));
+ if (suggestion != null) {
+ return suggestion;
+ }
+ var first = suggestions.firstOrNull ?? 'var';
+ for (var i = 1; true; i++) {
+ var suggestion = '$first$i';
+ if (!fieldNames.contains(suggestion)) {
+ return suggestion;
+ }
+ }
+}
+
String _formatCode(String code) {
try {
code = formatter.format(code);
@@ -465,12 +482,13 @@
firstValueType is LiteralType ? firstValueType.type : firstValueType;
final typeOfValues =
resolveTypeAlias(requiredValueType, resolveEnumClasses: true);
+ final namespaceName = namespace.name;
buffer
- ..writeln('class ${namespace.name} implements ToJsonable {')
+ ..writeln('class $namespaceName implements ToJsonable {')
..indent()
- ..writeIndentedln('const ${namespace.name}$constructorName(this._value);')
- ..writeIndentedln('const ${namespace.name}.fromJson(this._value);')
+ ..writeIndentedln('const $namespaceName$constructorName(this._value);')
+ ..writeIndentedln('const $namespaceName.fromJson(this._value);')
..writeln()
..writeIndentedln('final ${typeOfValues.dartTypeWithTypeArgs} _value;')
..writeln()
@@ -506,7 +524,7 @@
}
_writeDocCommentsAndAnnotations(buffer, cons);
buffer.writeIndentedln(
- 'static const ${_makeValidIdentifier(cons.name)} = ${namespace.name}$constructorName(${cons.valueAsLiteral});');
+ 'static const ${_makeValidIdentifier(cons.name)} = $namespaceName$constructorName(${cons.valueAsLiteral});');
});
buffer
..writeln()
@@ -517,7 +535,7 @@
..writeIndentedln('@override int get hashCode => _value.hashCode;')
..writeln()
..writeIndentedln(
- 'bool operator ==(Object o) => o is ${namespace.name} && o._value == _value;')
+ 'bool operator ==(Object other) => other is $namespaceName && other._value == _value;')
..outdent()
..writeln('}')
..writeln();
@@ -710,7 +728,7 @@
..writeIndentedln('static ${interface.nameWithTypeArgs} '
'fromJson${interface.typeArgsString}(Map<String, Object?> json) {')
..indent();
- // First check whether any of our subclasses can deserialise this.
+ // First check whether any of our subclasses can deserialize this.
for (final subclassName in _subtypes[interface.name] ?? const <String>[]) {
final subclass = _interfaces[subclassName]!;
buffer
@@ -873,9 +891,7 @@
}
void _writeToJsonFieldsForResponseMessage(
- IndentableStringBuffer buffer, Interface interface) {
- const mapName = '__result';
-
+ IndentableStringBuffer buffer, Interface interface, String mapName) {
final allFields = _getAllFields(interface);
final standardFields =
allFields.where((f) => f.name != 'error' && f.name != 'result');
@@ -902,24 +918,25 @@
}
void _writeToJsonMethod(IndentableStringBuffer buffer, Interface interface) {
- // It's important the name we use for the map here isn't in use in the object
- // already. 'result' was, so we prefix it with some underscores.
+ final mapName = _determineVariableName(interface,
+ ['result', 'map', 'json', 'toReturn', 'results', 'value', 'values']);
+
buffer
..writeIndentedln('Map<String, Object?> toJson() {')
..indent()
- ..writeIndentedln('var __result = <String, Object?>{};');
+ ..writeIndentedln('var $mapName = <String, Object?>{};');
// ResponseMessage must confirm to JSON-RPC which says only one of
// result/error can be included. Since this isn't encoded in the types we
// need to special-case it's toJson generation.
if (interface.name == 'ResponseMessage') {
- _writeToJsonFieldsForResponseMessage(buffer, interface);
+ _writeToJsonFieldsForResponseMessage(buffer, interface, mapName);
} else {
for (var field in _getAllFields(interface)) {
- _writeJsonMapAssignment(buffer, field, '__result');
+ _writeJsonMapAssignment(buffer, field, mapName);
}
}
buffer
- ..writeIndentedln('return __result;')
+ ..writeIndentedln('return $mapName;')
..outdent()
..writeIndentedln('}');
}
@@ -1012,9 +1029,11 @@
final int _indentSpaces = 2;
int get totalIndent => _indentLevel * _indentSpaces;
+
String get _indentString => ' ' * totalIndent;
void indent() => _indentLevel++;
+
void outdent() => _indentLevel--;
void writeIndented(Object obj) {
diff --git a/pkg/analysis_server/tool/lsp_spec/generate_all.dart b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
index 92e5880..5952649 100644
--- a/pkg/analysis_server/tool/lsp_spec/generate_all.dart
+++ b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
@@ -167,7 +167,6 @@
// "pkg/analysis_server/tool/lsp_spec/generate_all.dart".
// ignore_for_file: annotate_overrides
-// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: prefer_is_not_operator
// ignore_for_file: unnecessary_parenthesis
@@ -276,7 +275,7 @@
[
field('code', type: 'ErrorCodes'),
field('message', type: 'string'),
- // This is Object? normally, but since this class can be serialised
+ // This is Object? normally, but since this class can be serialized
// we will crash if it data is set to something that can't be converted to
// JSON (for ex. Uri) so this forces anyone setting this to convert to a
// String.
@@ -417,7 +416,7 @@
// Generate an enum for all of the request methods to avoid strings.
types.add(extractMethodsEnum(spec));
- // Extract additional inline types that are specificed online in the `results`
+ // Extract additional inline types that are specified online in the `results`
// section of the doc.
types.addAll(extractResultsInlineTypes(spec));
return types;
@@ -472,7 +471,7 @@
final fullUri = baseUri.resolve(relativeUri);
final response = await http.get(fullUri);
if (response.statusCode != 200) {
- throw 'Faild to fetch $fullUri (${response.statusCode} ${response.reasonPhrase})';
+ throw 'Failed to fetch $fullUri (${response.statusCode} ${response.reasonPhrase})';
}
includeStrings[relativeUri] = response.body;
}
diff --git a/pkg/dart2wasm/lib/closures.dart b/pkg/dart2wasm/lib/closures.dart
index cde1b4c..7929e21 100644
--- a/pkg/dart2wasm/lib/closures.dart
+++ b/pkg/dart2wasm/lib/closures.dart
@@ -47,6 +47,9 @@
/// The variables captured by this context.
final List<VariableDeclaration> variables = [];
+ /// The type parameters captured by this context.
+ final List<TypeParameter> typeParameters = [];
+
/// Whether this context contains a captured `this`. Only member contexts can.
bool containsThis = false;
@@ -57,7 +60,8 @@
/// generation.
late w.Local currentLocal;
- bool get isEmpty => variables.isEmpty && !containsThis;
+ bool get isEmpty =>
+ variables.isEmpty && typeParameters.isEmpty && !containsThis;
int get parentFieldIndex {
assert(parent != null);
@@ -74,7 +78,7 @@
/// A captured variable.
class Capture {
- final VariableDeclaration variable;
+ final TreeNode variable;
late final Context context;
late final int fieldIndex;
bool written = false;
@@ -88,7 +92,7 @@
/// tree for a member.
class Closures {
final CodeGenerator codeGen;
- final Map<VariableDeclaration, Capture> captures = {};
+ final Map<TreeNode, Capture> captures = {};
bool isThisCaptured = false;
final Map<FunctionNode, Lambda> lambdas = {};
final Map<TreeNode, Context> contexts = {};
@@ -98,6 +102,9 @@
Translator get translator => codeGen.translator;
+ late final w.ValueType typeType =
+ translator.classInfo[translator.typeClass]!.nullableType;
+
void findCaptures(Member member) {
var find = CaptureFinder(this, member);
if (member is Constructor) {
@@ -144,6 +151,11 @@
translator.translateType(variable.type).withNullability(true)));
captures[variable]!.fieldIndex = index;
}
+ for (TypeParameter parameter in context.typeParameters) {
+ int index = struct.fields.length;
+ struct.fields.add(w.FieldType(typeType));
+ captures[parameter]!.fieldIndex = index;
+ }
}
}
}
@@ -152,7 +164,7 @@
class CaptureFinder extends RecursiveVisitor {
final Closures closures;
final Member member;
- final Map<VariableDeclaration, int> variableDepth = {};
+ final Map<TreeNode, int> variableDepth = {};
int depth = 0;
CaptureFinder(this.closures, this.member);
@@ -170,12 +182,23 @@
super.visitVariableDeclaration(node);
}
- void _visitVariableUse(VariableDeclaration variable) {
+ @override
+ void visitTypeParameter(TypeParameter node) {
+ if (node.parent is FunctionNode) {
+ if (depth > 0) {
+ variableDepth[node] = depth;
+ }
+ }
+ super.visitTypeParameter(node);
+ }
+
+ void _visitVariableUse(TreeNode variable) {
int declDepth = variableDepth[variable] ?? 0;
assert(declDepth <= depth);
if (declDepth < depth) {
closures.captures[variable] = Capture(variable);
- } else if (variable.parent is FunctionDeclaration) {
+ } else if (variable is VariableDeclaration &&
+ variable.parent is FunctionDeclaration) {
closures.closurizedFunctions.add(variable.parent as FunctionDeclaration);
}
}
@@ -213,7 +236,10 @@
void visitTypeParameterType(TypeParameterType node) {
if (node.parameter.parent == member.enclosingClass) {
_visitThis();
+ } else if (node.parameter.parent is FunctionNode) {
+ _visitVariableUse(node.parameter);
}
+ super.visitTypeParameterType(node);
}
void _visitLambda(FunctionNode node) {
@@ -222,6 +248,10 @@
throw "Not supported: Optional parameters for "
"function expression or local function at ${node.location}";
}
+ if (node.typeParameters.isNotEmpty) {
+ throw "Not supported: Type parameters for "
+ "function expression or local function at ${node.location}";
+ }
int parameterCount = node.requiredParameterCount;
w.FunctionType type = translator.closureFunctionType(parameterCount);
w.DefinedFunction function =
@@ -311,6 +341,16 @@
}
@override
+ void visitTypeParameter(TypeParameter node) {
+ Capture? capture = closures.captures[node];
+ if (capture != null) {
+ currentContext!.typeParameters.add(node);
+ capture.context = currentContext!;
+ }
+ super.visitTypeParameter(node);
+ }
+
+ @override
void visitVariableSet(VariableSet node) {
closures.captures[node.variable]?.written = true;
super.visitVariableSet(node);
diff --git a/pkg/dart2wasm/lib/code_generator.dart b/pkg/dart2wasm/lib/code_generator.dart
index 4a0d1c3..fb69fc5 100644
--- a/pkg/dart2wasm/lib/code_generator.dart
+++ b/pkg/dart2wasm/lib/code_generator.dart
@@ -400,6 +400,15 @@
b.struct_set(capture.context.struct, capture.fieldIndex);
}
});
+ typeLocals.forEach((parameter, local) {
+ Capture? capture = closures.captures[parameter];
+ if (capture != null) {
+ b.local_get(capture.context.currentLocal);
+ b.local_get(local);
+ translator.convertType(function, local.type, capture.type);
+ b.struct_set(capture.context.struct, capture.fieldIndex);
+ }
+ });
}
/// Helper function to throw a Wasm ref downcast error.
@@ -475,7 +484,7 @@
}
for (TypeParameter typeParam in cls.typeParameters) {
types.makeType(
- this, TypeParameterType(typeParam, Nullability.nonNullable), node);
+ this, TypeParameterType(typeParam, Nullability.nonNullable));
}
_visitArguments(node.arguments, node.targetReference, 1);
_call(node.targetReference);
@@ -493,7 +502,7 @@
b.ref_as_non_null();
}
for (DartType typeArg in supertype!.typeArguments) {
- types.makeType(this, typeArg, node);
+ types.makeType(this, typeArg);
}
_visitArguments(node.arguments, node.targetReference,
1 + supertype.typeArguments.length);
@@ -1788,7 +1797,7 @@
final w.FunctionType signature = translator.signatureFor(target);
final ParameterInfo paramInfo = translator.paramInfoFor(target);
for (int i = 0; i < node.types.length; i++) {
- types.makeType(this, node.types[i], node);
+ types.makeType(this, node.types[i]);
}
signatureOffset += node.types.length;
for (int i = 0; i < node.positional.length; i++) {
@@ -1827,11 +1836,8 @@
@override
w.ValueType visitStringConcatenation(
StringConcatenation node, w.ValueType expectedType) {
- makeList(
- node.expressions,
- translator.fixedLengthListClass,
- InterfaceType(translator.stringBaseClass, Nullability.nonNullable),
- node);
+ makeList(node.expressions, translator.fixedLengthListClass,
+ InterfaceType(translator.stringBaseClass, Nullability.nonNullable));
return _call(translator.stringInterpolate.reference);
}
@@ -1899,12 +1905,12 @@
@override
w.ValueType visitListLiteral(ListLiteral node, w.ValueType expectedType) {
- return makeList(node.expressions, translator.growableListClass,
- node.typeArgument, node);
+ return makeList(
+ node.expressions, translator.growableListClass, node.typeArgument);
}
- w.ValueType makeList(List<Expression> expressions, Class cls,
- DartType typeArg, TreeNode node) {
+ w.ValueType makeList(
+ List<Expression> expressions, Class cls, DartType typeArg) {
ClassInfo info = translator.classInfo[cls]!;
translator.functions.allocateClass(info.classId);
w.RefType refType = info.struct.fields.last.type.unpacked as w.RefType;
@@ -1914,7 +1920,7 @@
b.i32_const(info.classId);
b.i32_const(initialIdentityHash);
- types.makeType(this, typeArg, node);
+ types.makeType(this, typeArg);
b.i64_const(length);
if (options.lazyConstants) {
// Avoid array.init instruction in lazy constants mode
@@ -1950,8 +1956,8 @@
w.BaseFunction mapFactory =
translator.functions.getFunction(translator.mapFactory.reference);
w.ValueType factoryReturnType = mapFactory.type.outputs.single;
- types.makeType(this, node.keyType, node);
- types.makeType(this, node.valueType, node);
+ types.makeType(this, node.keyType);
+ types.makeType(this, node.valueType);
b.call(mapFactory);
if (node.entries.isEmpty) {
return factoryReturnType;
@@ -1980,7 +1986,7 @@
w.BaseFunction setFactory =
translator.functions.getFunction(translator.setFactory.reference);
w.ValueType factoryReturnType = setFactory.type.outputs.single;
- types.makeType(this, node.typeArgument, node);
+ types.makeType(this, node.typeArgument);
b.call(setFactory);
if (node.expressions.isEmpty) {
return factoryReturnType;
@@ -2005,7 +2011,7 @@
@override
w.ValueType visitTypeLiteral(TypeLiteral node, w.ValueType expectedType) {
- return types.makeType(this, node.type, node);
+ return types.makeType(this, node.type);
}
@override
@@ -2027,7 +2033,7 @@
types.emitTypeTest(this, node.type, dartTypeOf(node.operand), node);
b.br_if(asCheckBlock);
b.local_get(operand);
- types.makeType(this, node.type, node);
+ types.makeType(this, node.type);
_call(translator.stackTraceCurrent.reference);
_call(translator.throwAsCheckError.reference);
b.unreachable();
@@ -2035,6 +2041,36 @@
b.local_get(operand);
return operand.type;
}
+
+ w.ValueType instantiateTypeParameter(TypeParameter parameter) {
+ w.ValueType resultType;
+ if (parameter.parent is FunctionNode) {
+ // Type argument to function
+ w.Local? local = typeLocals[parameter];
+ if (local != null) {
+ b.local_get(local);
+ resultType = local.type;
+ } else {
+ Capture capture = closures.captures[parameter]!;
+ b.local_get(capture.context.currentLocal);
+ b.struct_get(capture.context.struct, capture.fieldIndex);
+ resultType = capture.type;
+ }
+ } else {
+ // Type argument of class
+ Class cls = parameter.parent as Class;
+ ClassInfo info = translator.classInfo[cls]!;
+ int fieldIndex = translator.typeParameterIndex[parameter]!;
+ w.ValueType thisType = visitThis(info.nonNullableType);
+ translator.convertType(function, thisType, info.nonNullableType);
+ b.struct_get(info.struct, fieldIndex);
+ resultType = info.struct.fields[fieldIndex].type.unpacked;
+ }
+ final w.ValueType nonNullableTypeType =
+ translator.classInfo[translator.typeClass]!.nonNullableType;
+ translator.convertType(function, resultType, nonNullableTypeType);
+ return nonNullableTypeType;
+ }
}
class TryBlockFinalizer {
diff --git a/pkg/dart2wasm/lib/types.dart b/pkg/dart2wasm/lib/types.dart
index b94a144..53df180 100644
--- a/pkg/dart2wasm/lib/types.dart
+++ b/pkg/dart2wasm/lib/types.dart
@@ -117,27 +117,24 @@
throw "Unexpected DartType: $type";
}
- void _makeTypeList(
- CodeGenerator codeGen, List<DartType> types, TreeNode node) {
+ void _makeTypeList(CodeGenerator codeGen, List<DartType> types) {
w.ValueType listType = codeGen.makeList(
types.map((t) => TypeLiteral(t)).toList(),
translator.fixedLengthListClass,
- InterfaceType(translator.typeClass, Nullability.nonNullable),
- node);
+ InterfaceType(translator.typeClass, Nullability.nonNullable));
translator.convertType(codeGen.function, listType, typeListExpectedType);
}
- void _makeInterfaceType(CodeGenerator codeGen, ClassInfo info,
- InterfaceType type, TreeNode node) {
+ void _makeInterfaceType(
+ CodeGenerator codeGen, ClassInfo info, InterfaceType type) {
w.Instructions b = codeGen.b;
ClassInfo typeInfo = translator.classInfo[type.classNode]!;
encodeNullability(b, type);
b.i64_const(typeInfo.classId);
- _makeTypeList(codeGen, type.typeArguments, node);
+ _makeTypeList(codeGen, type.typeArguments);
}
- void _makeFutureOrType(
- CodeGenerator codeGen, FutureOrType type, TreeNode node) {
+ void _makeFutureOrType(CodeGenerator codeGen, FutureOrType type) {
w.Instructions b = codeGen.b;
w.DefinedFunction function = codeGen.function;
@@ -146,7 +143,7 @@
// undetermined nullability. To handle this, we emit the type argument, and
// read back its nullability at runtime.
if (type.nullability == Nullability.undetermined) {
- w.ValueType typeArgumentType = makeType(codeGen, type.typeArgument, node);
+ w.ValueType typeArgumentType = makeType(codeGen, type.typeArgument);
w.Local typeArgumentTemporary = codeGen.addLocal(typeArgumentType);
b.local_tee(typeArgumentTemporary);
b.struct_get(typeClassInfo.struct, FieldIndex.typeIsNullable);
@@ -154,15 +151,15 @@
translator.convertType(function, typeArgumentType, nonNullableTypeType);
} else {
encodeNullability(b, type);
- makeType(codeGen, type.typeArgument, node);
+ makeType(codeGen, type.typeArgument);
}
}
void _makeFunctionType(
- CodeGenerator codeGen, ClassInfo info, FunctionType type, TreeNode node) {
+ CodeGenerator codeGen, ClassInfo info, FunctionType type) {
w.Instructions b = codeGen.b;
encodeNullability(b, type);
- makeType(codeGen, type.returnType, node);
+ makeType(codeGen, type.returnType);
if (type.positionalParameters.every(_isTypeConstant)) {
translator.constants.instantiateConstant(
codeGen.function,
@@ -170,7 +167,7 @@
translator.constants.makeTypeList(type.positionalParameters),
typeListExpectedType);
} else {
- _makeTypeList(codeGen, type.positionalParameters, node);
+ _makeTypeList(codeGen, type.positionalParameters);
}
b.i64_const(type.requiredParameterCount);
if (type.namedParameters.every((n) => _isTypeConstant(n.type))) {
@@ -197,8 +194,8 @@
BoolLiteral(n.isRequired)
])));
}
- w.ValueType namedParametersListType = codeGen.makeList(expressions,
- translator.fixedLengthListClass, namedParameterType, node);
+ w.ValueType namedParametersListType = codeGen.makeList(
+ expressions, translator.fixedLengthListClass, namedParameterType);
translator.convertType(codeGen.function, namedParametersListType,
namedParametersExpectedType);
}
@@ -207,7 +204,7 @@
/// Makes a `_Type` object on the stack.
/// TODO(joshualitt): Refactor this logic to remove the dependency on
/// CodeGenerator.
- w.ValueType makeType(CodeGenerator codeGen, DartType type, TreeNode node) {
+ w.ValueType makeType(CodeGenerator codeGen, DartType type) {
w.Instructions b = codeGen.b;
if (_isTypeConstant(type)) {
translator.constants.instantiateConstant(
@@ -221,38 +218,16 @@
type is FutureOrType ||
type is FunctionType);
if (type is TypeParameterType) {
- if (type.parameter.parent is FunctionNode) {
- // Type argument to function
- w.Local? local = codeGen.typeLocals[type.parameter];
- if (local != null) {
- b.local_get(local);
- translator.convertType(
- codeGen.function, local.type, nonNullableTypeType);
- return nonNullableTypeType;
- } else {
- codeGen.unimplemented(node, "Type parameter access inside lambda",
- [nonNullableTypeType]);
- return nonNullableTypeType;
- }
- }
- // Type argument of class
- Class cls = type.parameter.parent as Class;
- ClassInfo info = translator.classInfo[cls]!;
- int fieldIndex = translator.typeParameterIndex[type.parameter]!;
- w.ValueType thisType = codeGen.visitThis(info.nonNullableType);
- translator.convertType(codeGen.function, thisType, info.nonNullableType);
- b.struct_get(info.struct, fieldIndex);
- b.ref_as_non_null();
- return nonNullableTypeType;
+ return codeGen.instantiateTypeParameter(type.parameter);
}
ClassInfo info = translator.classInfo[classForType(type)]!;
translator.functions.allocateClass(info.classId);
b.i32_const(info.classId);
b.i32_const(initialIdentityHash);
if (type is InterfaceType) {
- _makeInterfaceType(codeGen, info, type, node);
+ _makeInterfaceType(codeGen, info, type);
} else if (type is FutureOrType) {
- _makeFutureOrType(codeGen, type, node);
+ _makeFutureOrType(codeGen, type);
} else if (type is FunctionType) {
if (isGenericFunction(type)) {
// TODO(joshualitt): Implement generic function types and share most of
@@ -260,7 +235,7 @@
print("Not implemented: RTI ${type}");
encodeNullability(b, type);
} else {
- _makeFunctionType(codeGen, info, type, node);
+ _makeFunctionType(codeGen, info, type);
}
} else {
throw '`$type` should have already been handled.';
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 3926219..a0bc52a4 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -16,12 +16,12 @@
general/no_such_method_forwarder: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242444
general/tear_off_patch/main: semiFuzzFailureOnForceRebuildBodies # needs custom libraries.json (and platform?) not setup here
general/with_dependencies/issue_43084/issue_43084: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242543
+inference_update_1/horizontal_inference_extension_method: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/245004
late_lowering/issue41436b: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242445
late_lowering/issue41436c/issue41436c: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242445
late_lowering/late_override: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242445
late_lowering/private_members: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242285
macros/multiple_imports: SemiFuzzFailure # probably augment imports that isn't split correctly.
-nnbd_mixed/const_canonical_type: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242441
nnbd_mixed/hierarchy/in_dill_out_in/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
nnbd_mixed/hierarchy/in_out_dill_in/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
nnbd_mixed/hierarchy/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
index 3edc30c..860daaf 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
@@ -36,13 +36,13 @@
class FooKeep extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, required keyFieldType: core::int, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, required valueFieldType: core::int, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t1;
constructor _() → self::FooKeep
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
index 5f438f9..fc7dd55 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
@@ -29,13 +29,13 @@
class FooKeep extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep", createEmptyInstance: #C2) in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, required keyFieldType: core::int, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, required valueFieldType: core::int, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t1;
constructor _() → self::FooKeep
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
index 0df0c27..1cc8fc6 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
@@ -43,13 +43,13 @@
class FooKeep extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(3, #C1 ?{core::String} "" : "mapKeep", "FooKeep.MapKeepEntry", "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::ZopDrop>(4, #C1 ?{core::String} "" : "mapDrop", "FooKeep.MapDropEntry", "mapDrop", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(3, #C1 ?{core::String} "" : "mapKeep", "FooKeep.MapKeepEntry", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, required keyFieldType: core::int, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, required valueFieldType: core::int, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::ZopDrop>(4, #C1 ?{core::String} "" : "mapDrop", "FooKeep.MapDropEntry", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, required keyFieldType: core::int, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, required valueFieldType: core::int, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t1;
constructor _() → self::FooKeep
@@ -87,8 +87,8 @@
}
class BarKeep extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "BarKeep") in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(2, #C1 ?{core::String} "" : "bDrop", "bDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(2, #C1 ?{core::String} "" : "bDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t2;
constructor _() → self::BarKeep
@@ -144,7 +144,7 @@
}
class ZopDrop extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t5 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ZopDrop") in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aDrop", "aDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t5;
constructor _() → self::ZopDrop
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
index 426f988..5eaaf9d 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
@@ -39,13 +39,13 @@
class FooKeep extends pro::GeneratedMessage {
[@vm.inferred-type.metadata=protobuf::BuilderInfo?] static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, required keyFieldType: core::int, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, required valueFieldType: core::int, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
- [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+ [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
[@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
} =>#t1;
constructor _() → self::FooKeep
diff --git a/pkg/wasm_builder/lib/src/instructions.dart b/pkg/wasm_builder/lib/src/instructions.dart
index 6c04e05..f91b26f 100644
--- a/pkg/wasm_builder/lib/src/instructions.dart
+++ b/pkg/wasm_builder/lib/src/instructions.dart
@@ -114,6 +114,11 @@
/// Column width for the instructions.
int instructionColumnWidth = 50;
+ /// The maximum number of stack slots for which to print the types after each
+ /// instruction. When the stack is higher than this, some elements in the
+ /// middle of the stack are left out.
+ int maxStackShown = 10;
+
int _indent = 1;
final List<String> _traceLines = [];
@@ -149,7 +154,16 @@
instr = instr.length > instructionColumnWidth - 2
? instr.substring(0, instructionColumnWidth - 4) + "... "
: instr.padRight(instructionColumnWidth);
- final String stack = reachableAfter ? _stackTypes.join(', ') : "-";
+ final int stackHeight = _stackTypes.length;
+ final String stack = reachableAfter
+ ? stackHeight <= maxStackShown
+ ? _stackTypes.join(', ')
+ : [
+ ..._stackTypes.sublist(0, maxStackShown ~/ 2),
+ "... ${stackHeight - maxStackShown} omitted ...",
+ ..._stackTypes.sublist(stackHeight - (maxStackShown + 1) ~/ 2)
+ ].join(', ')
+ : "-";
final String line = "$byteOffset$instr$stack\n";
_indent += indentAfter;
diff --git a/tools/VERSION b/tools/VERSION
index b393a78..2c21a7b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 137
+PRERELEASE 138
PRERELEASE_PATCH 0
\ No newline at end of file