diff --git a/CHANGELOG.md b/CHANGELOG.md index c9dcb5ee..2dab7c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +- Upgrade to protobuf v6 + +## 1.8.0 +- Fixed named constructors not getting indexed +- Index directives (import, export, part, part of) + ## 1.7.0 - Added support for `enclosing_range` on occurrences definitions - Upgraded to Dart `3.12.2` diff --git a/lib/src/gen/scip.pb.dart b/lib/src/gen/scip.pb.dart index 97b47b3d..d43264c6 100644 --- a/lib/src/gen/scip.pb.dart +++ b/lib/src/gen/scip.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: lib/src/gen/scip.proto -// -// @dart = 2.12 +// Generated from lib/src/gen/scip.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports import 'dart:core' as $core; @@ -15,6 +16,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'scip.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'scip.pbenum.dart'; /// Index represents a complete SCIP index for a workspace this is rooted at a @@ -29,65 +32,69 @@ class Index extends $pb.GeneratedMessage { $core.Iterable? documents, $core.Iterable? externalSymbols, }) { - final $result = create(); - if (metadata != null) { - $result.metadata = metadata; - } - if (documents != null) { - $result.documents.addAll(documents); - } - if (externalSymbols != null) { - $result.externalSymbols.addAll(externalSymbols); - } - return $result; + final result = Index._(); + if (metadata != null) result.metadata = metadata; + if (documents != null) result.documents.addAll(documents); + if (externalSymbols != null) result.externalSymbols.addAll(externalSymbols); + return result; } - Index._() : super(); - factory Index.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Index.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Index', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) - ..aOM(1, _omitFieldNames ? '' : 'metadata', subBuilder: Metadata.create) - ..pc(2, _omitFieldNames ? '' : 'documents', $pb.PbFieldType.PM, subBuilder: Document.create) - ..pc(3, _omitFieldNames ? '' : 'externalSymbols', $pb.PbFieldType.PM, subBuilder: SymbolInformation.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Index clone() => Index()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Index copyWith(void Function(Index) updates) => super.copyWith((message) => updates(message as Index)) as Index; + Index._(); + + factory Index.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Index()..mergeFromBuffer(data, registry); + factory Index.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Index()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Index', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Index.$_createMessage) + ..aOM(1, _omitFieldNames ? '' : 'metadata', + subBuilder: Metadata.$_createMessage) + ..pPM(2, _omitFieldNames ? '' : 'documents', + subBuilder: Document.$_createMessage) + ..pPM(3, _omitFieldNames ? '' : 'externalSymbols', + subBuilder: SymbolInformation.$_createMessage) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Index clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Index copyWith(void Function(Index) updates) => + super.copyWith((message) => updates(message as Index)) as Index; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Index() / Index.new instead') static Index create() => Index._(); - Index createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Index._(); + @$core.override + Index createEmptyInstance() => Index._(); @$core.pragma('dart2js:noInline') - static Index getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Index getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Index.$_createMessage); static Index? _defaultInstance; /// Metadata about this index. @$pb.TagNumber(1) Metadata get metadata => $_getN(0); @$pb.TagNumber(1) - set metadata(Metadata v) { setField(1, v); } + set metadata(Metadata value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasMetadata() => $_has(0); @$pb.TagNumber(1) - void clearMetadata() => clearField(1); + void clearMetadata() => $_clearField(1); @$pb.TagNumber(1) Metadata ensureMetadata() => $_ensure(0); /// Documents that belong to this index. @$pb.TagNumber(2) - $core.List get documents => $_getList(1); + $pb.PbList get documents => $_getList(1); /// (optional) Symbols that are referenced from this index but are defined in /// an external package (a separate `Index` message). Leave this field empty @@ -95,7 +102,7 @@ class Index extends $pb.GeneratedMessage { /// external package won't get indexed for some reason then you can use this /// field to provide hover documentation for those external symbols. @$pb.TagNumber(3) - $core.List get externalSymbols => $_getList(2); + $pb.PbList get externalSymbols => $_getList(2); } class Metadata extends $pb.GeneratedMessage { @@ -105,73 +112,76 @@ class Metadata extends $pb.GeneratedMessage { $core.String? projectRoot, TextEncoding? textDocumentEncoding, }) { - final $result = create(); - if (version != null) { - $result.version = version; - } - if (toolInfo != null) { - $result.toolInfo = toolInfo; - } - if (projectRoot != null) { - $result.projectRoot = projectRoot; - } - if (textDocumentEncoding != null) { - $result.textDocumentEncoding = textDocumentEncoding; - } - return $result; + final result = Metadata._(); + if (version != null) result.version = version; + if (toolInfo != null) result.toolInfo = toolInfo; + if (projectRoot != null) result.projectRoot = projectRoot; + if (textDocumentEncoding != null) + result.textDocumentEncoding = textDocumentEncoding; + return result; } - Metadata._() : super(); - factory Metadata.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Metadata.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Metadata', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) - ..e(1, _omitFieldNames ? '' : 'version', $pb.PbFieldType.OE, defaultOrMaker: ProtocolVersion.UnspecifiedProtocolVersion, valueOf: ProtocolVersion.valueOf, enumValues: ProtocolVersion.values) - ..aOM(2, _omitFieldNames ? '' : 'toolInfo', subBuilder: ToolInfo.create) + Metadata._(); + + factory Metadata.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Metadata()..mergeFromBuffer(data, registry); + factory Metadata.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Metadata()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Metadata', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Metadata.$_createMessage) + ..aE(1, _omitFieldNames ? '' : 'version', + enumValues: ProtocolVersion.values) + ..aOM(2, _omitFieldNames ? '' : 'toolInfo', + subBuilder: ToolInfo.$_createMessage) ..aOS(3, _omitFieldNames ? '' : 'projectRoot') - ..e(4, _omitFieldNames ? '' : 'textDocumentEncoding', $pb.PbFieldType.OE, defaultOrMaker: TextEncoding.UnspecifiedTextEncoding, valueOf: TextEncoding.valueOf, enumValues: TextEncoding.values) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Metadata clone() => Metadata()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Metadata copyWith(void Function(Metadata) updates) => super.copyWith((message) => updates(message as Metadata)) as Metadata; + ..aE(4, _omitFieldNames ? '' : 'textDocumentEncoding', + enumValues: TextEncoding.values) + ..hasRequiredFields = false; + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Metadata clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Metadata copyWith(void Function(Metadata) updates) => + super.copyWith((message) => updates(message as Metadata)) as Metadata; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Metadata() / Metadata.new instead') static Metadata create() => Metadata._(); - Metadata createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Metadata._(); + @$core.override + Metadata createEmptyInstance() => Metadata._(); @$core.pragma('dart2js:noInline') - static Metadata getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Metadata getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Metadata.$_createMessage); static Metadata? _defaultInstance; /// Which version of this protocol was used to generate this index? @$pb.TagNumber(1) ProtocolVersion get version => $_getN(0); @$pb.TagNumber(1) - set version(ProtocolVersion v) { setField(1, v); } + set version(ProtocolVersion value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasVersion() => $_has(0); @$pb.TagNumber(1) - void clearVersion() => clearField(1); + void clearVersion() => $_clearField(1); /// Information about the tool that produced this index. @$pb.TagNumber(2) ToolInfo get toolInfo => $_getN(1); @$pb.TagNumber(2) - set toolInfo(ToolInfo v) { setField(2, v); } + set toolInfo(ToolInfo value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasToolInfo() => $_has(1); @$pb.TagNumber(2) - void clearToolInfo() => clearField(2); + void clearToolInfo() => $_clearField(2); @$pb.TagNumber(2) ToolInfo ensureToolInfo() => $_ensure(1); @@ -181,11 +191,11 @@ class Metadata extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get projectRoot => $_getSZ(2); @$pb.TagNumber(3) - set projectRoot($core.String v) { $_setString(2, v); } + set projectRoot($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasProjectRoot() => $_has(2); @$pb.TagNumber(3) - void clearProjectRoot() => clearField(3); + void clearProjectRoot() => $_clearField(3); /// Text encoding of the source files on disk that are referenced from /// `Document.relative_path`. This value is unrelated to the `Document.text` @@ -193,11 +203,11 @@ class Metadata extends $pb.GeneratedMessage { @$pb.TagNumber(4) TextEncoding get textDocumentEncoding => $_getN(3); @$pb.TagNumber(4) - set textDocumentEncoding(TextEncoding v) { setField(4, v); } + set textDocumentEncoding(TextEncoding value) => $_setField(4, value); @$pb.TagNumber(4) $core.bool hasTextDocumentEncoding() => $_has(3); @$pb.TagNumber(4) - void clearTextDocumentEncoding() => clearField(4); + void clearTextDocumentEncoding() => $_clearField(4); } class ToolInfo extends $pb.GeneratedMessage { @@ -206,73 +216,74 @@ class ToolInfo extends $pb.GeneratedMessage { $core.String? version, $core.Iterable<$core.String>? arguments, }) { - final $result = create(); - if (name != null) { - $result.name = name; - } - if (version != null) { - $result.version = version; - } - if (arguments != null) { - $result.arguments.addAll(arguments); - } - return $result; + final result = ToolInfo._(); + if (name != null) result.name = name; + if (version != null) result.version = version; + if (arguments != null) result.arguments.addAll(arguments); + return result; } - ToolInfo._() : super(); - factory ToolInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ToolInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToolInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + ToolInfo._(); + + factory ToolInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + ToolInfo()..mergeFromBuffer(data, registry); + factory ToolInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + ToolInfo()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ToolInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: ToolInfo.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'name') ..aOS(2, _omitFieldNames ? '' : 'version') ..pPS(3, _omitFieldNames ? '' : 'arguments') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ToolInfo clone() => ToolInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ToolInfo copyWith(void Function(ToolInfo) updates) => super.copyWith((message) => updates(message as ToolInfo)) as ToolInfo; + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ToolInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ToolInfo copyWith(void Function(ToolInfo) updates) => + super.copyWith((message) => updates(message as ToolInfo)) as ToolInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use ToolInfo() / ToolInfo.new instead') static ToolInfo create() => ToolInfo._(); - ToolInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => ToolInfo._(); + @$core.override + ToolInfo createEmptyInstance() => ToolInfo._(); @$core.pragma('dart2js:noInline') - static ToolInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ToolInfo getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(ToolInfo.$_createMessage); static ToolInfo? _defaultInstance; /// Name of the indexer that produced this index. @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } + set name($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$pb.TagNumber(1) - void clearName() => clearField(1); + void clearName() => $_clearField(1); /// Version of the indexer that produced this index. @$pb.TagNumber(2) $core.String get version => $_getSZ(1); @$pb.TagNumber(2) - set version($core.String v) { $_setString(1, v); } + set version($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasVersion() => $_has(1); @$pb.TagNumber(2) - void clearVersion() => clearField(2); + void clearVersion() => $_clearField(2); /// Command-line arguments that were used to invoke this indexer. @$pb.TagNumber(3) - $core.List<$core.String> get arguments => $_getList(2); + $pb.PbList<$core.String> get arguments => $_getList(2); } /// Document defines the metadata about a source file on disk. @@ -285,91 +296,89 @@ class Document extends $pb.GeneratedMessage { $core.String? text, PositionEncoding? positionEncoding, }) { - final $result = create(); - if (relativePath != null) { - $result.relativePath = relativePath; - } - if (occurrences != null) { - $result.occurrences.addAll(occurrences); - } - if (symbols != null) { - $result.symbols.addAll(symbols); - } - if (language != null) { - $result.language = language; - } - if (text != null) { - $result.text = text; - } - if (positionEncoding != null) { - $result.positionEncoding = positionEncoding; - } - return $result; + final result = Document._(); + if (relativePath != null) result.relativePath = relativePath; + if (occurrences != null) result.occurrences.addAll(occurrences); + if (symbols != null) result.symbols.addAll(symbols); + if (language != null) result.language = language; + if (text != null) result.text = text; + if (positionEncoding != null) result.positionEncoding = positionEncoding; + return result; } - Document._() : super(); - factory Document.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Document.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Document', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + Document._(); + + factory Document.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Document()..mergeFromBuffer(data, registry); + factory Document.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Document()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Document', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Document.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'relativePath') - ..pc(2, _omitFieldNames ? '' : 'occurrences', $pb.PbFieldType.PM, subBuilder: Occurrence.create) - ..pc(3, _omitFieldNames ? '' : 'symbols', $pb.PbFieldType.PM, subBuilder: SymbolInformation.create) + ..pPM(2, _omitFieldNames ? '' : 'occurrences', + subBuilder: Occurrence.$_createMessage) + ..pPM(3, _omitFieldNames ? '' : 'symbols', + subBuilder: SymbolInformation.$_createMessage) ..aOS(4, _omitFieldNames ? '' : 'language') ..aOS(5, _omitFieldNames ? '' : 'text') - ..e(6, _omitFieldNames ? '' : 'positionEncoding', $pb.PbFieldType.OE, defaultOrMaker: PositionEncoding.UnspecifiedPositionEncoding, valueOf: PositionEncoding.valueOf, enumValues: PositionEncoding.values) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Document clone() => Document()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Document copyWith(void Function(Document) updates) => super.copyWith((message) => updates(message as Document)) as Document; + ..aE(6, _omitFieldNames ? '' : 'positionEncoding', + enumValues: PositionEncoding.values) + ..hasRequiredFields = false; + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document copyWith(void Function(Document) updates) => + super.copyWith((message) => updates(message as Document)) as Document; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Document() / Document.new instead') static Document create() => Document._(); - Document createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Document._(); + @$core.override + Document createEmptyInstance() => Document._(); @$core.pragma('dart2js:noInline') - static Document getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Document getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Document.$_createMessage); static Document? _defaultInstance; - /// (Required) Unique path to the text document. + /// (Required) Unique path to the text document. /// - /// 1. The path must be relative to the directory supplied in the associated - /// `Metadata.project_root`. - /// 2. The path must not begin with a leading '/'. - /// 3. The path must point to a regular file, not a symbolic link. - /// 4. The path must use '/' as the separator, including on Windows. - /// 5. The path must be canonical; it cannot include empty components ('//'), - /// or '.' or '..'. + /// 1. The path must be relative to the directory supplied in the associated + /// `Metadata.project_root`. + /// 2. The path must not begin with a leading '/'. + /// 3. The path must point to a regular file, not a symbolic link. + /// 4. The path must use '/' as the separator, including on Windows. + /// 5. The path must be canonical; it cannot include empty components ('//'), + /// or '.' or '..'. @$pb.TagNumber(1) $core.String get relativePath => $_getSZ(0); @$pb.TagNumber(1) - set relativePath($core.String v) { $_setString(0, v); } + set relativePath($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasRelativePath() => $_has(0); @$pb.TagNumber(1) - void clearRelativePath() => clearField(1); + void clearRelativePath() => $_clearField(1); /// Occurrences that appear in this file. @$pb.TagNumber(2) - $core.List get occurrences => $_getList(1); + $pb.PbList get occurrences => $_getList(1); - /// Symbols that are "defined" within this document. + /// Symbols that are "defined" within this document. /// - /// This should include symbols which technically do not have any definition, - /// but have a reference and are defined by some other symbol (see - /// Relationship.is_definition). + /// This should include symbols which technically do not have any definition, + /// but have a reference and are defined by some other symbol (see + /// Relationship.is_definition). @$pb.TagNumber(3) - $core.List get symbols => $_getList(2); + $pb.PbList get symbols => $_getList(2); /// The string ID for the programming language this file is written in. /// The `Language` enum contains the names of most common programming languages. @@ -378,11 +387,11 @@ class Document extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get language => $_getSZ(3); @$pb.TagNumber(4) - set language($core.String v) { $_setString(3, v); } + set language($core.String value) => $_setString(3, value); @$pb.TagNumber(4) $core.bool hasLanguage() => $_has(3); @$pb.TagNumber(4) - void clearLanguage() => clearField(4); + void clearLanguage() => $_clearField(4); /// (optional) Text contents of the this document. Indexers are not expected to /// include the text by default. It's preferrable that clients read the text @@ -394,227 +403,231 @@ class Document extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get text => $_getSZ(4); @$pb.TagNumber(5) - set text($core.String v) { $_setString(4, v); } + set text($core.String value) => $_setString(4, value); @$pb.TagNumber(5) $core.bool hasText() => $_has(4); @$pb.TagNumber(5) - void clearText() => clearField(5); + void clearText() => $_clearField(5); - /// Specifies the encoding used for source ranges in this Document. + /// Specifies the encoding used for source ranges in this Document. /// - /// Usually, this will match the type used to index the string type - /// in the indexer's implementation language in O(1) time. - /// - For an indexer implemented in JVM/.NET language or JavaScript/TypeScript, - /// use UTF16CodeUnitOffsetFromLineStart. - /// - For an indexer implemented in Python, - /// use UTF32CodeUnitOffsetFromLineStart. - /// - For an indexer implemented in Go, Rust or C++, - /// use UTF8ByteOffsetFromLineStart. + /// Usually, this will match the type used to index the string type + /// in the indexer's implementation language in O(1) time. + /// - For an indexer implemented in JVM/.NET language or JavaScript/TypeScript, + /// use UTF16CodeUnitOffsetFromLineStart. + /// - For an indexer implemented in Python, + /// use UTF32CodeUnitOffsetFromLineStart. + /// - For an indexer implemented in Go, Rust or C++, + /// use UTF8ByteOffsetFromLineStart. @$pb.TagNumber(6) PositionEncoding get positionEncoding => $_getN(5); @$pb.TagNumber(6) - set positionEncoding(PositionEncoding v) { setField(6, v); } + set positionEncoding(PositionEncoding value) => $_setField(6, value); @$pb.TagNumber(6) $core.bool hasPositionEncoding() => $_has(5); @$pb.TagNumber(6) - void clearPositionEncoding() => clearField(6); + void clearPositionEncoding() => $_clearField(6); } -/// Symbol is similar to a URI, it identifies a class, method, or a local -/// variable. `SymbolInformation` contains rich metadata about symbols such as -/// the docstring. +/// Symbol is similar to a URI, it identifies a class, method, or a local +/// variable. `SymbolInformation` contains rich metadata about symbols such as +/// the docstring. /// -/// Symbol has a standardized string representation, which can be used -/// interchangeably with `Symbol`. The syntax for Symbol is the following: -/// ``` -/// # ()+ stands for one or more repetitions of -/// # ()? stands for zero or one occurrence of -/// ::= ' ' ' ' ()+ | 'local ' -/// ::= ' ' ' ' -/// ::= any UTF-8, escape spaces with double space. Must not be empty nor start with 'local' -/// ::= any UTF-8, escape spaces with double space. Use the placeholder '.' to indicate an empty value -/// ::= same as above -/// ::= same as above -/// ::= | | | | | | | -/// ::= '/' -/// ::= '#' -/// ::= '.' -/// ::= ':' -/// ::= '!' -/// ::= '(' ()? ').' -/// ::= '[' ']' -/// ::= '(' ')' -/// ::= -/// ::= -/// ::= | -/// ::= ()+ -/// ::= '_' | '+' | '-' | '$' | ASCII letter or digit -/// ::= '`' ()+ '`', must contain at least one non- -/// ::= any UTF-8, escape backticks with double backtick. -/// ::= -/// ``` +/// Symbol has a standardized string representation, which can be used +/// interchangeably with `Symbol`. The syntax for Symbol is the following: +/// ``` +/// # ()+ stands for one or more repetitions of +/// # ()? stands for zero or one occurrence of +/// ::= ' ' ' ' ()+ | 'local ' +/// ::= ' ' ' ' +/// ::= any UTF-8, escape spaces with double space. Must not be empty nor start with 'local' +/// ::= any UTF-8, escape spaces with double space. Use the placeholder '.' to indicate an empty value +/// ::= same as above +/// ::= same as above +/// ::= | | | | | | | +/// ::= '/' +/// ::= '#' +/// ::= '.' +/// ::= ':' +/// ::= '!' +/// ::= '(' ()? ').' +/// ::= '[' ']' +/// ::= '(' ')' +/// ::= +/// ::= +/// ::= | +/// ::= ()+ +/// ::= '_' | '+' | '-' | '$' | ASCII letter or digit +/// ::= '`' ()+ '`', must contain at least one non- +/// ::= any UTF-8, escape backticks with double backtick. +/// ::= +/// ``` /// -/// The list of descriptors for a symbol should together form a fully -/// qualified name for the symbol. That is, it should serve as a unique -/// identifier across the package. Typically, it will include one descriptor -/// for every node in the AST (along the ancestry path) between the root of -/// the file and the node corresponding to the symbol. +/// The list of descriptors for a symbol should together form a fully +/// qualified name for the symbol. That is, it should serve as a unique +/// identifier across the package. Typically, it will include one descriptor +/// for every node in the AST (along the ancestry path) between the root of +/// the file and the node corresponding to the symbol. /// -/// Local symbols MUST only be used for entities which are local to a Document, -/// and cannot be accessed from outside the Document. +/// Local symbols MUST only be used for entities which are local to a Document, +/// and cannot be accessed from outside the Document. class Symbol extends $pb.GeneratedMessage { factory Symbol({ $core.String? scheme, Package? package, $core.Iterable? descriptors, }) { - final $result = create(); - if (scheme != null) { - $result.scheme = scheme; - } - if (package != null) { - $result.package = package; - } - if (descriptors != null) { - $result.descriptors.addAll(descriptors); - } - return $result; + final result = Symbol._(); + if (scheme != null) result.scheme = scheme; + if (package != null) result.package = package; + if (descriptors != null) result.descriptors.addAll(descriptors); + return result; } - Symbol._() : super(); - factory Symbol.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Symbol.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Symbol', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'scheme') - ..aOM(2, _omitFieldNames ? '' : 'package', subBuilder: Package.create) - ..pc(3, _omitFieldNames ? '' : 'descriptors', $pb.PbFieldType.PM, subBuilder: Descriptor.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Symbol clone() => Symbol()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Symbol copyWith(void Function(Symbol) updates) => super.copyWith((message) => updates(message as Symbol)) as Symbol; + Symbol._(); + + factory Symbol.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Symbol()..mergeFromBuffer(data, registry); + factory Symbol.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Symbol()..mergeFromJson(json, registry); + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Symbol', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Symbol.$_createMessage) + ..aOS(1, _omitFieldNames ? '' : 'scheme') + ..aOM(2, _omitFieldNames ? '' : 'package', + subBuilder: Package.$_createMessage) + ..pPM(3, _omitFieldNames ? '' : 'descriptors', + subBuilder: Descriptor.$_createMessage) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Symbol clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Symbol copyWith(void Function(Symbol) updates) => + super.copyWith((message) => updates(message as Symbol)) as Symbol; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Symbol() / Symbol.new instead') static Symbol create() => Symbol._(); - Symbol createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Symbol._(); + @$core.override + Symbol createEmptyInstance() => Symbol._(); @$core.pragma('dart2js:noInline') - static Symbol getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Symbol getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Symbol.$_createMessage); static Symbol? _defaultInstance; @$pb.TagNumber(1) $core.String get scheme => $_getSZ(0); @$pb.TagNumber(1) - set scheme($core.String v) { $_setString(0, v); } + set scheme($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasScheme() => $_has(0); @$pb.TagNumber(1) - void clearScheme() => clearField(1); + void clearScheme() => $_clearField(1); @$pb.TagNumber(2) Package get package => $_getN(1); @$pb.TagNumber(2) - set package(Package v) { setField(2, v); } + set package(Package value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasPackage() => $_has(1); @$pb.TagNumber(2) - void clearPackage() => clearField(2); + void clearPackage() => $_clearField(2); @$pb.TagNumber(2) Package ensurePackage() => $_ensure(1); @$pb.TagNumber(3) - $core.List get descriptors => $_getList(2); + $pb.PbList get descriptors => $_getList(2); } -/// Unit of packaging and distribution. +/// Unit of packaging and distribution. /// -/// NOTE: This corresponds to a module in Go and JVM languages. +/// NOTE: This corresponds to a module in Go and JVM languages. class Package extends $pb.GeneratedMessage { factory Package({ $core.String? manager, $core.String? name, $core.String? version, }) { - final $result = create(); - if (manager != null) { - $result.manager = manager; - } - if (name != null) { - $result.name = name; - } - if (version != null) { - $result.version = version; - } - return $result; + final result = Package._(); + if (manager != null) result.manager = manager; + if (name != null) result.name = name; + if (version != null) result.version = version; + return result; } - Package._() : super(); - factory Package.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Package.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Package', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + Package._(); + + factory Package.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Package()..mergeFromBuffer(data, registry); + factory Package.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Package()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Package', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Package.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'manager') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'version') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Package clone() => Package()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Package copyWith(void Function(Package) updates) => super.copyWith((message) => updates(message as Package)) as Package; + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Package clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Package copyWith(void Function(Package) updates) => + super.copyWith((message) => updates(message as Package)) as Package; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Package() / Package.new instead') static Package create() => Package._(); - Package createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Package._(); + @$core.override + Package createEmptyInstance() => Package._(); @$core.pragma('dart2js:noInline') - static Package getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Package getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Package.$_createMessage); static Package? _defaultInstance; @$pb.TagNumber(1) $core.String get manager => $_getSZ(0); @$pb.TagNumber(1) - set manager($core.String v) { $_setString(0, v); } + set manager($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasManager() => $_has(0); @$pb.TagNumber(1) - void clearManager() => clearField(1); + void clearManager() => $_clearField(1); @$pb.TagNumber(2) $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } + set name($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasName() => $_has(1); @$pb.TagNumber(2) - void clearName() => clearField(2); + void clearName() => $_clearField(2); @$pb.TagNumber(3) $core.String get version => $_getSZ(2); @$pb.TagNumber(3) - set version($core.String v) { $_setString(2, v); } + set version($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasVersion() => $_has(2); @$pb.TagNumber(3) - void clearVersion() => clearField(3); + void clearVersion() => $_clearField(3); } class Descriptor extends $pb.GeneratedMessage { @@ -623,76 +636,78 @@ class Descriptor extends $pb.GeneratedMessage { $core.String? disambiguator, Descriptor_Suffix? suffix, }) { - final $result = create(); - if (name != null) { - $result.name = name; - } - if (disambiguator != null) { - $result.disambiguator = disambiguator; - } - if (suffix != null) { - $result.suffix = suffix; - } - return $result; + final result = Descriptor._(); + if (name != null) result.name = name; + if (disambiguator != null) result.disambiguator = disambiguator; + if (suffix != null) result.suffix = suffix; + return result; } - Descriptor._() : super(); - factory Descriptor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Descriptor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Descriptor', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + Descriptor._(); + + factory Descriptor.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Descriptor()..mergeFromBuffer(data, registry); + factory Descriptor.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Descriptor()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Descriptor', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Descriptor.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'name') ..aOS(2, _omitFieldNames ? '' : 'disambiguator') - ..e(3, _omitFieldNames ? '' : 'suffix', $pb.PbFieldType.OE, defaultOrMaker: Descriptor_Suffix.UnspecifiedSuffix, valueOf: Descriptor_Suffix.valueOf, enumValues: Descriptor_Suffix.values) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Descriptor clone() => Descriptor()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Descriptor copyWith(void Function(Descriptor) updates) => super.copyWith((message) => updates(message as Descriptor)) as Descriptor; + ..aE(3, _omitFieldNames ? '' : 'suffix', + enumValues: Descriptor_Suffix.values) + ..hasRequiredFields = false; + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Descriptor clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Descriptor copyWith(void Function(Descriptor) updates) => + super.copyWith((message) => updates(message as Descriptor)) as Descriptor; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Descriptor() / Descriptor.new instead') static Descriptor create() => Descriptor._(); - Descriptor createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Descriptor._(); + @$core.override + Descriptor createEmptyInstance() => Descriptor._(); @$core.pragma('dart2js:noInline') - static Descriptor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Descriptor getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Descriptor.$_createMessage); static Descriptor? _defaultInstance; @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } + set name($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$pb.TagNumber(1) - void clearName() => clearField(1); + void clearName() => $_clearField(1); @$pb.TagNumber(2) $core.String get disambiguator => $_getSZ(1); @$pb.TagNumber(2) - set disambiguator($core.String v) { $_setString(1, v); } + set disambiguator($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDisambiguator() => $_has(1); @$pb.TagNumber(2) - void clearDisambiguator() => clearField(2); + void clearDisambiguator() => $_clearField(2); @$pb.TagNumber(3) Descriptor_Suffix get suffix => $_getN(2); @$pb.TagNumber(3) - set suffix(Descriptor_Suffix v) { setField(3, v); } + set suffix(Descriptor_Suffix value) => $_setField(3, value); @$pb.TagNumber(3) $core.bool hasSuffix() => $_has(2); @$pb.TagNumber(3) - void clearSuffix() => clearField(3); + void clearSuffix() => $_clearField(3); } /// SymbolInformation defines metadata about a symbol, such as the symbol's @@ -707,64 +722,63 @@ class SymbolInformation extends $pb.GeneratedMessage { Document? signatureDocumentation, $core.String? enclosingSymbol, }) { - final $result = create(); - if (symbol != null) { - $result.symbol = symbol; - } - if (documentation != null) { - $result.documentation.addAll(documentation); - } - if (relationships != null) { - $result.relationships.addAll(relationships); - } - if (kind != null) { - $result.kind = kind; - } - if (displayName != null) { - $result.displayName = displayName; - } - if (signatureDocumentation != null) { - $result.signatureDocumentation = signatureDocumentation; - } - if (enclosingSymbol != null) { - $result.enclosingSymbol = enclosingSymbol; - } - return $result; + final result = SymbolInformation._(); + if (symbol != null) result.symbol = symbol; + if (documentation != null) result.documentation.addAll(documentation); + if (relationships != null) result.relationships.addAll(relationships); + if (kind != null) result.kind = kind; + if (displayName != null) result.displayName = displayName; + if (signatureDocumentation != null) + result.signatureDocumentation = signatureDocumentation; + if (enclosingSymbol != null) result.enclosingSymbol = enclosingSymbol; + return result; } - SymbolInformation._() : super(); - factory SymbolInformation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SymbolInformation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SymbolInformation', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + SymbolInformation._(); + + factory SymbolInformation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + SymbolInformation()..mergeFromBuffer(data, registry); + factory SymbolInformation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + SymbolInformation()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SymbolInformation', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: SymbolInformation.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'symbol') ..pPS(3, _omitFieldNames ? '' : 'documentation') - ..pc(4, _omitFieldNames ? '' : 'relationships', $pb.PbFieldType.PM, subBuilder: Relationship.create) - ..e(5, _omitFieldNames ? '' : 'kind', $pb.PbFieldType.OE, defaultOrMaker: SymbolInformation_Kind.UnspecifiedKind, valueOf: SymbolInformation_Kind.valueOf, enumValues: SymbolInformation_Kind.values) + ..pPM(4, _omitFieldNames ? '' : 'relationships', + subBuilder: Relationship.$_createMessage) + ..aE(5, _omitFieldNames ? '' : 'kind', + enumValues: SymbolInformation_Kind.values) ..aOS(6, _omitFieldNames ? '' : 'displayName') - ..aOM(7, _omitFieldNames ? '' : 'signatureDocumentation', subBuilder: Document.create) + ..aOM(7, _omitFieldNames ? '' : 'signatureDocumentation', + subBuilder: Document.$_createMessage) ..aOS(8, _omitFieldNames ? '' : 'enclosingSymbol') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SymbolInformation clone() => SymbolInformation()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SymbolInformation copyWith(void Function(SymbolInformation) updates) => super.copyWith((message) => updates(message as SymbolInformation)) as SymbolInformation; + ..hasRequiredFields = false; + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SymbolInformation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SymbolInformation copyWith(void Function(SymbolInformation) updates) => + super.copyWith((message) => updates(message as SymbolInformation)) + as SymbolInformation; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use SymbolInformation() / SymbolInformation.new instead') static SymbolInformation create() => SymbolInformation._(); - SymbolInformation createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => SymbolInformation._(); + @$core.override + SymbolInformation createEmptyInstance() => SymbolInformation._(); @$core.pragma('dart2js:noInline') - static SymbolInformation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SymbolInformation getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor( + SymbolInformation.$_createMessage); static SymbolInformation? _defaultInstance; /// Identifier of this symbol, which can be referenced from `Occurence.symbol`. @@ -772,11 +786,11 @@ class SymbolInformation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get symbol => $_getSZ(0); @$pb.TagNumber(1) - set symbol($core.String v) { $_setString(0, v); } + set symbol($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasSymbol() => $_has(0); @$pb.TagNumber(1) - void clearSymbol() => clearField(1); + void clearSymbol() => $_clearField(1); /// (optional, but strongly recommended) The markdown-formatted documentation /// for this symbol. Use `SymbolInformation.signature_documentation` to @@ -785,11 +799,11 @@ class SymbolInformation extends $pb.GeneratedMessage { /// this field by rendering markdown code blocks. New indexers should only /// include non-code documentation in this field, for example docstrings. @$pb.TagNumber(3) - $core.List<$core.String> get documentation => $_getList(1); + $pb.PbList<$core.String> get documentation => $_getList(1); /// (optional) Relationships to other symbols (e.g., implements, type definition). @$pb.TagNumber(4) - $core.List get relationships => $_getList(2); + $pb.PbList get relationships => $_getList(2); /// The kind of this symbol. Use this field instead of /// `SymbolDescriptor.Suffix` to determine whether something is, for example, a @@ -797,29 +811,29 @@ class SymbolInformation extends $pb.GeneratedMessage { @$pb.TagNumber(5) SymbolInformation_Kind get kind => $_getN(3); @$pb.TagNumber(5) - set kind(SymbolInformation_Kind v) { setField(5, v); } + set kind(SymbolInformation_Kind value) => $_setField(5, value); @$pb.TagNumber(5) $core.bool hasKind() => $_has(3); @$pb.TagNumber(5) - void clearKind() => clearField(5); + void clearKind() => $_clearField(5); - /// (optional) The name of this symbol as it should be displayed to the user. - /// For example, the symbol "com/example/MyClass#myMethod(+1)." should have the - /// display name "myMethod". The `symbol` field is not a reliable source of - /// the display name for several reasons: + /// (optional) The name of this symbol as it should be displayed to the user. + /// For example, the symbol "com/example/MyClass#myMethod(+1)." should have the + /// display name "myMethod". The `symbol` field is not a reliable source of + /// the display name for several reasons: /// - /// - Local symbols don't encode the name. - /// - Some languages have case-insensitive names, so the symbol is all-lowercase. - /// - The symbol may encode names with special characters that should not be - /// displayed to the user. + /// - Local symbols don't encode the name. + /// - Some languages have case-insensitive names, so the symbol is all-lowercase. + /// - The symbol may encode names with special characters that should not be + /// displayed to the user. @$pb.TagNumber(6) $core.String get displayName => $_getSZ(4); @$pb.TagNumber(6) - set displayName($core.String v) { $_setString(4, v); } + set displayName($core.String value) => $_setString(4, value); @$pb.TagNumber(6) $core.bool hasDisplayName() => $_has(4); @$pb.TagNumber(6) - void clearDisplayName() => clearField(6); + void clearDisplayName() => $_clearField(6); /// (optional) The signature of this symbol as it's displayed in API /// documentation or in hover tooltips. For example, a Java method that adds @@ -830,39 +844,39 @@ class SymbolInformation extends $pb.GeneratedMessage { @$pb.TagNumber(7) Document get signatureDocumentation => $_getN(5); @$pb.TagNumber(7) - set signatureDocumentation(Document v) { setField(7, v); } + set signatureDocumentation(Document value) => $_setField(7, value); @$pb.TagNumber(7) $core.bool hasSignatureDocumentation() => $_has(5); @$pb.TagNumber(7) - void clearSignatureDocumentation() => clearField(7); + void clearSignatureDocumentation() => $_clearField(7); @$pb.TagNumber(7) Document ensureSignatureDocumentation() => $_ensure(5); - /// (optional) The enclosing symbol if this is a local symbol. For non-local - /// symbols, the enclosing symbol should be parsed from the `symbol` field - /// using the `Descriptor` grammar. + /// (optional) The enclosing symbol if this is a local symbol. For non-local + /// symbols, the enclosing symbol should be parsed from the `symbol` field + /// using the `Descriptor` grammar. /// - /// The primary use-case for this field is to allow local symbol to be displayed - /// in a symbol hierarchy for API documentation. It's OK to leave this field - /// empty for local variables since local variables usually don't belong in API - /// documentation. However, in the situation that you wish to include a local - /// symbol in the hierarchy, then you can use `enclosing_symbol` to locate the - /// "parent" or "owner" of this local symbol. For example, a Java indexer may - /// choose to use local symbols for private class fields while providing an - /// `enclosing_symbol` to reference the enclosing class to allow the field to - /// be part of the class documentation hierarchy. From the perspective of an - /// author of an indexer, the decision to use a local symbol or global symbol - /// should exclusively be determined whether the local symbol is accessible - /// outside the document, not by the capability to find the enclosing - /// symbol. + /// The primary use-case for this field is to allow local symbol to be displayed + /// in a symbol hierarchy for API documentation. It's OK to leave this field + /// empty for local variables since local variables usually don't belong in API + /// documentation. However, in the situation that you wish to include a local + /// symbol in the hierarchy, then you can use `enclosing_symbol` to locate the + /// "parent" or "owner" of this local symbol. For example, a Java indexer may + /// choose to use local symbols for private class fields while providing an + /// `enclosing_symbol` to reference the enclosing class to allow the field to + /// be part of the class documentation hierarchy. From the perspective of an + /// author of an indexer, the decision to use a local symbol or global symbol + /// should exclusively be determined whether the local symbol is accessible + /// outside the document, not by the capability to find the enclosing + /// symbol. @$pb.TagNumber(8) $core.String get enclosingSymbol => $_getSZ(6); @$pb.TagNumber(8) - set enclosingSymbol($core.String v) { $_setString(6, v); } + set enclosingSymbol($core.String value) => $_setString(6, value); @$pb.TagNumber(8) $core.bool hasEnclosingSymbol() => $_has(6); @$pb.TagNumber(8) - void clearEnclosingSymbol() => clearField(8); + void clearEnclosingSymbol() => $_clearField(8); } class Relationship extends $pb.GeneratedMessage { @@ -873,66 +887,65 @@ class Relationship extends $pb.GeneratedMessage { $core.bool? isTypeDefinition, $core.bool? isDefinition, }) { - final $result = create(); - if (symbol != null) { - $result.symbol = symbol; - } - if (isReference != null) { - $result.isReference = isReference; - } - if (isImplementation != null) { - $result.isImplementation = isImplementation; - } - if (isTypeDefinition != null) { - $result.isTypeDefinition = isTypeDefinition; - } - if (isDefinition != null) { - $result.isDefinition = isDefinition; - } - return $result; + final result = Relationship._(); + if (symbol != null) result.symbol = symbol; + if (isReference != null) result.isReference = isReference; + if (isImplementation != null) result.isImplementation = isImplementation; + if (isTypeDefinition != null) result.isTypeDefinition = isTypeDefinition; + if (isDefinition != null) result.isDefinition = isDefinition; + return result; } - Relationship._() : super(); - factory Relationship.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Relationship.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Relationship', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + Relationship._(); + + factory Relationship.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Relationship()..mergeFromBuffer(data, registry); + factory Relationship.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Relationship()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Relationship', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Relationship.$_createMessage) ..aOS(1, _omitFieldNames ? '' : 'symbol') ..aOB(2, _omitFieldNames ? '' : 'isReference') ..aOB(3, _omitFieldNames ? '' : 'isImplementation') ..aOB(4, _omitFieldNames ? '' : 'isTypeDefinition') ..aOB(5, _omitFieldNames ? '' : 'isDefinition') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Relationship clone() => Relationship()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Relationship copyWith(void Function(Relationship) updates) => super.copyWith((message) => updates(message as Relationship)) as Relationship; + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Relationship clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Relationship copyWith(void Function(Relationship) updates) => + super.copyWith((message) => updates(message as Relationship)) + as Relationship; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Relationship() / Relationship.new instead') static Relationship create() => Relationship._(); - Relationship createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Relationship._(); + @$core.override + Relationship createEmptyInstance() => Relationship._(); @$core.pragma('dart2js:noInline') - static Relationship getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Relationship getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor( + Relationship.$_createMessage); static Relationship? _defaultInstance; @$pb.TagNumber(1) $core.String get symbol => $_getSZ(0); @$pb.TagNumber(1) - set symbol($core.String v) { $_setString(0, v); } + set symbol($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasSymbol() => $_has(0); @$pb.TagNumber(1) - void clearSymbol() => clearField(1); + void clearSymbol() => $_clearField(1); /// When resolving "Find references", this field documents what other symbols /// should be included together with this symbol. For example, consider the @@ -961,11 +974,11 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.bool get isReference => $_getBF(1); @$pb.TagNumber(2) - set isReference($core.bool v) { $_setBool(1, v); } + set isReference($core.bool value) => $_setBool(1, value); @$pb.TagNumber(2) $core.bool hasIsReference() => $_has(1); @$pb.TagNumber(2) - void clearIsReference() => clearField(2); + void clearIsReference() => $_clearField(2); /// Similar to `is_reference` but for "Find implementations". /// It's common for `is_implementation` and `is_reference` to both be true but @@ -978,53 +991,53 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.bool get isImplementation => $_getBF(2); @$pb.TagNumber(3) - set isImplementation($core.bool v) { $_setBool(2, v); } + set isImplementation($core.bool value) => $_setBool(2, value); @$pb.TagNumber(3) $core.bool hasIsImplementation() => $_has(2); @$pb.TagNumber(3) - void clearIsImplementation() => clearField(3); + void clearIsImplementation() => $_clearField(3); /// Similar to `references_symbols` but for "Go to type definition". @$pb.TagNumber(4) $core.bool get isTypeDefinition => $_getBF(3); @$pb.TagNumber(4) - set isTypeDefinition($core.bool v) { $_setBool(3, v); } + set isTypeDefinition($core.bool value) => $_setBool(3, value); @$pb.TagNumber(4) $core.bool hasIsTypeDefinition() => $_has(3); @$pb.TagNumber(4) - void clearIsTypeDefinition() => clearField(4); + void clearIsTypeDefinition() => $_clearField(4); - /// Allows overriding the behavior of "Go to definition" and "Find references" - /// for symbols which do not have a definition of their own or could - /// potentially have multiple definitions. + /// Allows overriding the behavior of "Go to definition" and "Find references" + /// for symbols which do not have a definition of their own or could + /// potentially have multiple definitions. /// - /// For example, in a language with single inheritance and no field overriding, - /// inherited fields can reuse the same symbol as the ancestor which declares - /// the field. In such a situation, is_definition is not needed. + /// For example, in a language with single inheritance and no field overriding, + /// inherited fields can reuse the same symbol as the ancestor which declares + /// the field. In such a situation, is_definition is not needed. /// - /// On the other hand, in languages with single inheritance and some form - /// of mixins, you can use is_definition to relate the symbol to the - /// matching symbol in ancestor classes, and is_reference to relate the - /// symbol to the matching symbol in mixins. + /// On the other hand, in languages with single inheritance and some form + /// of mixins, you can use is_definition to relate the symbol to the + /// matching symbol in ancestor classes, and is_reference to relate the + /// symbol to the matching symbol in mixins. /// - /// NOTE: At the moment, due to limitations of the SCIP to LSIF conversion, - /// only global symbols in an index are allowed to use is_definition. - /// The relationship may not get recorded if either symbol is local. + /// NOTE: At the moment, due to limitations of the SCIP to LSIF conversion, + /// only global symbols in an index are allowed to use is_definition. + /// The relationship may not get recorded if either symbol is local. @$pb.TagNumber(5) $core.bool get isDefinition => $_getBF(4); @$pb.TagNumber(5) - set isDefinition($core.bool v) { $_setBool(4, v); } + set isDefinition($core.bool value) => $_setBool(4, value); @$pb.TagNumber(5) $core.bool hasIsDefinition() => $_has(4); @$pb.TagNumber(5) - void clearIsDefinition() => clearField(5); + void clearIsDefinition() => $_clearField(5); } -/// Occurrence associates a source position with a symbol and/or highlighting -/// information. +/// Occurrence associates a source position with a symbol and/or highlighting +/// information. /// -/// If possible, indexers should try to bundle logically related information -/// across occurrences into a single occurrence to reduce payload sizes. +/// If possible, indexers should try to bundle logically related information +/// across occurrences into a single occurrence to reduce payload sizes. class Occurrence extends $pb.GeneratedMessage { factory Occurrence({ $core.Iterable<$core.int>? range, @@ -1035,193 +1048,190 @@ class Occurrence extends $pb.GeneratedMessage { $core.Iterable? diagnostics, $core.Iterable<$core.int>? enclosingRange, }) { - final $result = create(); - if (range != null) { - $result.range.addAll(range); - } - if (symbol != null) { - $result.symbol = symbol; - } - if (symbolRoles != null) { - $result.symbolRoles = symbolRoles; - } - if (overrideDocumentation != null) { - $result.overrideDocumentation.addAll(overrideDocumentation); - } - if (syntaxKind != null) { - $result.syntaxKind = syntaxKind; - } - if (diagnostics != null) { - $result.diagnostics.addAll(diagnostics); - } - if (enclosingRange != null) { - $result.enclosingRange.addAll(enclosingRange); - } - return $result; + final result = Occurrence._(); + if (range != null) result.range.addAll(range); + if (symbol != null) result.symbol = symbol; + if (symbolRoles != null) result.symbolRoles = symbolRoles; + if (overrideDocumentation != null) + result.overrideDocumentation.addAll(overrideDocumentation); + if (syntaxKind != null) result.syntaxKind = syntaxKind; + if (diagnostics != null) result.diagnostics.addAll(diagnostics); + if (enclosingRange != null) result.enclosingRange.addAll(enclosingRange); + return result; } - Occurrence._() : super(); - factory Occurrence.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Occurrence.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Occurrence', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) + Occurrence._(); + + factory Occurrence.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Occurrence()..mergeFromBuffer(data, registry); + factory Occurrence.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Occurrence()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Occurrence', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Occurrence.$_createMessage) ..p<$core.int>(1, _omitFieldNames ? '' : 'range', $pb.PbFieldType.K3) ..aOS(2, _omitFieldNames ? '' : 'symbol') - ..a<$core.int>(3, _omitFieldNames ? '' : 'symbolRoles', $pb.PbFieldType.O3) + ..aI(3, _omitFieldNames ? '' : 'symbolRoles') ..pPS(4, _omitFieldNames ? '' : 'overrideDocumentation') - ..e(5, _omitFieldNames ? '' : 'syntaxKind', $pb.PbFieldType.OE, defaultOrMaker: SyntaxKind.UnspecifiedSyntaxKind, valueOf: SyntaxKind.valueOf, enumValues: SyntaxKind.values) - ..pc(6, _omitFieldNames ? '' : 'diagnostics', $pb.PbFieldType.PM, subBuilder: Diagnostic.create) - ..p<$core.int>(7, _omitFieldNames ? '' : 'enclosingRange', $pb.PbFieldType.K3) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Occurrence clone() => Occurrence()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Occurrence copyWith(void Function(Occurrence) updates) => super.copyWith((message) => updates(message as Occurrence)) as Occurrence; - + ..aE(5, _omitFieldNames ? '' : 'syntaxKind', + enumValues: SyntaxKind.values) + ..pPM(6, _omitFieldNames ? '' : 'diagnostics', + subBuilder: Diagnostic.$_createMessage) + ..p<$core.int>( + 7, _omitFieldNames ? '' : 'enclosingRange', $pb.PbFieldType.K3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Occurrence clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Occurrence copyWith(void Function(Occurrence) updates) => + super.copyWith((message) => updates(message as Occurrence)) as Occurrence; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Occurrence() / Occurrence.new instead') static Occurrence create() => Occurrence._(); - Occurrence createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Occurrence._(); + @$core.override + Occurrence createEmptyInstance() => Occurrence._(); @$core.pragma('dart2js:noInline') - static Occurrence getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Occurrence getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Occurrence.$_createMessage); static Occurrence? _defaultInstance; - /// Half-open [start, end) range of this occurrence. Must be exactly three or four - /// elements: + /// Half-open [start, end) range of this occurrence. Must be exactly three or four + /// elements: /// - /// - Four elements: `[startLine, startCharacter, endLine, endCharacter]` - /// - Three elements: `[startLine, startCharacter, endCharacter]`. The end line - /// is inferred to have the same value as the start line. + /// - Four elements: `[startLine, startCharacter, endLine, endCharacter]` + /// - Three elements: `[startLine, startCharacter, endCharacter]`. The end line + /// is inferred to have the same value as the start line. /// - /// It is allowed for the range to be empty (i.e. start==end). + /// It is allowed for the range to be empty (i.e. start==end). /// - /// Line numbers and characters are always 0-based. Make sure to increment the - /// line/character values before displaying them in an editor-like UI because - /// editors conventionally use 1-based numbers. + /// Line numbers and characters are always 0-based. Make sure to increment the + /// line/character values before displaying them in an editor-like UI because + /// editors conventionally use 1-based numbers. /// - /// The 'character' value is interpreted based on the PositionEncoding for - /// the Document. + /// The 'character' value is interpreted based on the PositionEncoding for + /// the Document. /// - /// Historical note: the original draft of this schema had a `Range` message - /// type with `start` and `end` fields of type `Position`, mirroring LSP. - /// Benchmarks revealed that this encoding was inefficient and that we could - /// reduce the total payload size of an index by 50% by using `repeated int32` - /// instead. The `repeated int32` encoding is admittedly more embarrassing to - /// work with in some programming languages but we hope the performance - /// improvements make up for it. + /// Historical note: the original draft of this schema had a `Range` message + /// type with `start` and `end` fields of type `Position`, mirroring LSP. + /// Benchmarks revealed that this encoding was inefficient and that we could + /// reduce the total payload size of an index by 50% by using `repeated int32` + /// instead. The `repeated int32` encoding is admittedly more embarrassing to + /// work with in some programming languages but we hope the performance + /// improvements make up for it. @$pb.TagNumber(1) - $core.List<$core.int> get range => $_getList(0); + $pb.PbList<$core.int> get range => $_getList(0); /// (optional) The symbol that appears at this position. See /// `SymbolInformation.symbol` for how to format symbols as strings. @$pb.TagNumber(2) $core.String get symbol => $_getSZ(1); @$pb.TagNumber(2) - set symbol($core.String v) { $_setString(1, v); } + set symbol($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasSymbol() => $_has(1); @$pb.TagNumber(2) - void clearSymbol() => clearField(2); + void clearSymbol() => $_clearField(2); /// (optional) Bitset containing `SymbolRole`s in this occurrence. /// See `SymbolRole`'s documentation for how to read and write this field. @$pb.TagNumber(3) $core.int get symbolRoles => $_getIZ(2); @$pb.TagNumber(3) - set symbolRoles($core.int v) { $_setSignedInt32(2, v); } + set symbolRoles($core.int value) => $_setSignedInt32(2, value); @$pb.TagNumber(3) $core.bool hasSymbolRoles() => $_has(2); @$pb.TagNumber(3) - void clearSymbolRoles() => clearField(3); + void clearSymbolRoles() => $_clearField(3); - /// (optional) CommonMark-formatted documentation for this specific range. If - /// empty, the `Symbol.documentation` field is used instead. One example - /// where this field might be useful is when the symbol represents a generic - /// function (with abstract type parameters such as `List`) and at this - /// occurrence we know the exact values (such as `List`). + /// (optional) CommonMark-formatted documentation for this specific range. If + /// empty, the `Symbol.documentation` field is used instead. One example + /// where this field might be useful is when the symbol represents a generic + /// function (with abstract type parameters such as `List`) and at this + /// occurrence we know the exact values (such as `List`). /// - /// This field can also be used for dynamically or gradually typed languages, - /// which commonly allow for type-changing assignment. + /// This field can also be used for dynamically or gradually typed languages, + /// which commonly allow for type-changing assignment. @$pb.TagNumber(4) - $core.List<$core.String> get overrideDocumentation => $_getList(3); + $pb.PbList<$core.String> get overrideDocumentation => $_getList(3); /// (optional) What syntax highlighting class should be used for this range? @$pb.TagNumber(5) SyntaxKind get syntaxKind => $_getN(4); @$pb.TagNumber(5) - set syntaxKind(SyntaxKind v) { setField(5, v); } + set syntaxKind(SyntaxKind value) => $_setField(5, value); @$pb.TagNumber(5) $core.bool hasSyntaxKind() => $_has(4); @$pb.TagNumber(5) - void clearSyntaxKind() => clearField(5); + void clearSyntaxKind() => $_clearField(5); /// (optional) Diagnostics that have been reported for this specific range. @$pb.TagNumber(6) - $core.List get diagnostics => $_getList(5); + $pb.PbList get diagnostics => $_getList(5); - /// (optional) Using the same encoding as the sibling `range` field, half-open - /// source range of the nearest non-trivial enclosing AST node. This range must - /// enclose the `range` field. Example applications that make use of the - /// enclosing_range field: + /// (optional) Using the same encoding as the sibling `range` field, half-open + /// source range of the nearest non-trivial enclosing AST node. This range must + /// enclose the `range` field. Example applications that make use of the + /// enclosing_range field: /// - /// - Call hierarchies: to determine what symbols are references from the body - /// of a function - /// - Symbol outline: to display breadcrumbs from the cursor position to the - /// root of the file - /// - Expand selection: to select the nearest enclosing AST node. - /// - Highlight range: to indicate the AST expression that is associated with a - /// hover popover + /// - Call hierarchies: to determine what symbols are references from the body + /// of a function + /// - Symbol outline: to display breadcrumbs from the cursor position to the + /// root of the file + /// - Expand selection: to select the nearest enclosing AST node. + /// - Highlight range: to indicate the AST expression that is associated with a + /// hover popover /// - /// For definition occurrences, the enclosing range should indicate the - /// start/end bounds of the entire definition AST node, including - /// documentation. - /// ``` - /// const n = 3 - /// ^ range - /// ^^^^^^^^^^^ enclosing_range + /// For definition occurrences, the enclosing range should indicate the + /// start/end bounds of the entire definition AST node, including + /// documentation. + /// ``` + /// const n = 3 + /// ^ range + /// ^^^^^^^^^^^ enclosing_range /// - /// /** Parses the string into something */ - /// ^ enclosing_range start --------------------------------------| - /// function parse(input string): string { | - /// ^^^^^ range | - /// return input.slice(n) | - /// } | - /// ^ enclosing_range end <---------------------------------------| - /// ``` + /// /** Parses the string into something */ + /// ^ enclosing_range start --------------------------------------| + /// function parse(input string): string { | + /// ^^^^^ range | + /// return input.slice(n) | + /// } | + /// ^ enclosing_range end <---------------------------------------| + /// ``` /// - /// Any attributes/decorators/attached macros should also be part of the - /// enclosing range. + /// Any attributes/decorators/attached macros should also be part of the + /// enclosing range. /// - /// ```python - /// @cache - /// ^ enclosing_range start---------------------| - /// def factorial(n): | - /// return n * factorial(n-1) if n else 1 | - /// < enclosing_range end-----------------------| + /// ```python + /// @cache + /// ^ enclosing_range start---------------------| + /// def factorial(n): | + /// return n * factorial(n-1) if n else 1 | + /// < enclosing_range end-----------------------| /// - /// ``` + /// ``` /// - /// For reference occurrences, the enclosing range should indicate the start/end - /// bounds of the parent expression. - /// ``` - /// const a = a.b - /// ^ range - /// ^^^ enclosing_range - /// const b = a.b(41).f(42).g(43) - /// ^ range - /// ^^^^^^^^^^^^^ enclosing_range - /// ``` + /// For reference occurrences, the enclosing range should indicate the start/end + /// bounds of the parent expression. + /// ``` + /// const a = a.b + /// ^ range + /// ^^^ enclosing_range + /// const b = a.b(41).f(42).g(43) + /// ^ range + /// ^^^^^^^^^^^^^ enclosing_range + /// ``` @$pb.TagNumber(7) - $core.List<$core.int> get enclosingRange => $_getList(6); + $pb.PbList<$core.int> get enclosingRange => $_getList(6); } /// Represents a diagnostic, such as a compiler error or warning, which should be @@ -1234,103 +1244,105 @@ class Diagnostic extends $pb.GeneratedMessage { $core.String? source, $core.Iterable? tags, }) { - final $result = create(); - if (severity != null) { - $result.severity = severity; - } - if (code != null) { - $result.code = code; - } - if (message != null) { - $result.message = message; - } - if (source != null) { - $result.source = source; - } - if (tags != null) { - $result.tags.addAll(tags); - } - return $result; + final result = Diagnostic._(); + if (severity != null) result.severity = severity; + if (code != null) result.code = code; + if (message != null) result.message = message; + if (source != null) result.source = source; + if (tags != null) result.tags.addAll(tags); + return result; } - Diagnostic._() : super(); - factory Diagnostic.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Diagnostic.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Diagnostic', package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), createEmptyInstance: create) - ..e(1, _omitFieldNames ? '' : 'severity', $pb.PbFieldType.OE, defaultOrMaker: Severity.UnspecifiedSeverity, valueOf: Severity.valueOf, enumValues: Severity.values) + Diagnostic._(); + + factory Diagnostic.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Diagnostic()..mergeFromBuffer(data, registry); + factory Diagnostic.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + Diagnostic()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Diagnostic', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: Diagnostic.$_createMessage) + ..aE(1, _omitFieldNames ? '' : 'severity', + enumValues: Severity.values) ..aOS(2, _omitFieldNames ? '' : 'code') ..aOS(3, _omitFieldNames ? '' : 'message') ..aOS(4, _omitFieldNames ? '' : 'source') - ..pc(5, _omitFieldNames ? '' : 'tags', $pb.PbFieldType.KE, valueOf: DiagnosticTag.valueOf, enumValues: DiagnosticTag.values, defaultEnumValue: DiagnosticTag.UnspecifiedDiagnosticTag) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Diagnostic clone() => Diagnostic()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Diagnostic copyWith(void Function(Diagnostic) updates) => super.copyWith((message) => updates(message as Diagnostic)) as Diagnostic; - + ..pc(5, _omitFieldNames ? '' : 'tags', $pb.PbFieldType.KE, + valueOf: DiagnosticTag.valueOf, + enumValues: DiagnosticTag.values, + defaultEnumValue: DiagnosticTag.UnspecifiedDiagnosticTag) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Diagnostic clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Diagnostic copyWith(void Function(Diagnostic) updates) => + super.copyWith((message) => updates(message as Diagnostic)) as Diagnostic; + + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') + @$core.Deprecated('Use Diagnostic() / Diagnostic.new instead') static Diagnostic create() => Diagnostic._(); - Diagnostic createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.GeneratedMessage $_createMessage() => Diagnostic._(); + @$core.override + Diagnostic createEmptyInstance() => Diagnostic._(); @$core.pragma('dart2js:noInline') - static Diagnostic getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Diagnostic getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(Diagnostic.$_createMessage); static Diagnostic? _defaultInstance; /// Should this diagnostic be reported as an error, warning, info, or hint? @$pb.TagNumber(1) Severity get severity => $_getN(0); @$pb.TagNumber(1) - set severity(Severity v) { setField(1, v); } + set severity(Severity value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasSeverity() => $_has(0); @$pb.TagNumber(1) - void clearSeverity() => clearField(1); + void clearSeverity() => $_clearField(1); /// (optional) Code of this diagnostic, which might appear in the user interface. @$pb.TagNumber(2) $core.String get code => $_getSZ(1); @$pb.TagNumber(2) - set code($core.String v) { $_setString(1, v); } + set code($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasCode() => $_has(1); @$pb.TagNumber(2) - void clearCode() => clearField(2); + void clearCode() => $_clearField(2); /// Message of this diagnostic. @$pb.TagNumber(3) $core.String get message => $_getSZ(2); @$pb.TagNumber(3) - set message($core.String v) { $_setString(2, v); } + set message($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasMessage() => $_has(2); @$pb.TagNumber(3) - void clearMessage() => clearField(3); + void clearMessage() => $_clearField(3); /// (optional) Human-readable string describing the source of this diagnostic, e.g. /// 'typescript' or 'super lint'. @$pb.TagNumber(4) $core.String get source => $_getSZ(3); @$pb.TagNumber(4) - set source($core.String v) { $_setString(3, v); } + set source($core.String value) => $_setString(3, value); @$pb.TagNumber(4) $core.bool hasSource() => $_has(3); @$pb.TagNumber(4) - void clearSource() => clearField(4); + void clearSource() => $_clearField(4); @$pb.TagNumber(5) - $core.List get tags => $_getList(4); + $pb.PbList get tags => $_getList(4); } - -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/gen/scip.pbenum.dart b/lib/src/gen/scip.pbenum.dart index 3084fb63..838e347a 100644 --- a/lib/src/gen/scip.pbenum.dart +++ b/lib/src/gen/scip.pbenum.dart @@ -1,66 +1,107 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: lib/src/gen/scip.proto -// -// @dart = 2.12 +// Generated from lib/src/gen/scip.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class ProtocolVersion extends $pb.ProtobufEnum { - static const ProtocolVersion UnspecifiedProtocolVersion = ProtocolVersion._(0, _omitEnumNames ? '' : 'UnspecifiedProtocolVersion'); + static const ProtocolVersion UnspecifiedProtocolVersion = + ProtocolVersion._(0, _omitEnumNames ? '' : 'UnspecifiedProtocolVersion'); - static const $core.List values = [ + static const $core.List values = [ UnspecifiedProtocolVersion, ]; - static final $core.Map<$core.int, ProtocolVersion> _byValue = $pb.ProtobufEnum.initByValue(values); - static ProtocolVersion? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 0); + static ProtocolVersion? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const ProtocolVersion._($core.int v, $core.String n) : super(v, n); + const ProtocolVersion._(super.value, super.name); } class TextEncoding extends $pb.ProtobufEnum { - static const TextEncoding UnspecifiedTextEncoding = TextEncoding._(0, _omitEnumNames ? '' : 'UnspecifiedTextEncoding'); - static const TextEncoding UTF8 = TextEncoding._(1, _omitEnumNames ? '' : 'UTF8'); - static const TextEncoding UTF16 = TextEncoding._(2, _omitEnumNames ? '' : 'UTF16'); + static const TextEncoding UnspecifiedTextEncoding = + TextEncoding._(0, _omitEnumNames ? '' : 'UnspecifiedTextEncoding'); + static const TextEncoding UTF8 = + TextEncoding._(1, _omitEnumNames ? '' : 'UTF8'); + static const TextEncoding UTF16 = + TextEncoding._(2, _omitEnumNames ? '' : 'UTF16'); - static const $core.List values = [ + static const $core.List values = [ UnspecifiedTextEncoding, UTF8, UTF16, ]; - static final $core.Map<$core.int, TextEncoding> _byValue = $pb.ProtobufEnum.initByValue(values); - static TextEncoding? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 2); + static TextEncoding? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const TextEncoding._($core.int v, $core.String n) : super(v, n); + const TextEncoding._(super.value, super.name); } /// Encoding used to interpret the 'character' value in source ranges. class PositionEncoding extends $pb.ProtobufEnum { - static const PositionEncoding UnspecifiedPositionEncoding = PositionEncoding._(0, _omitEnumNames ? '' : 'UnspecifiedPositionEncoding'); - static const PositionEncoding UTF8CodeUnitOffsetFromLineStart = PositionEncoding._(1, _omitEnumNames ? '' : 'UTF8CodeUnitOffsetFromLineStart'); - static const PositionEncoding UTF16CodeUnitOffsetFromLineStart = PositionEncoding._(2, _omitEnumNames ? '' : 'UTF16CodeUnitOffsetFromLineStart'); - static const PositionEncoding UTF32CodeUnitOffsetFromLineStart = PositionEncoding._(3, _omitEnumNames ? '' : 'UTF32CodeUnitOffsetFromLineStart'); + /// Default value. This value should not be used by new SCIP indexers + /// so that a consumer can process the SCIP index without ambiguity. + static const PositionEncoding UnspecifiedPositionEncoding = + PositionEncoding._( + 0, _omitEnumNames ? '' : 'UnspecifiedPositionEncoding'); + + /// The 'character' value is interpreted as an offset in terms + /// of UTF-8 code units (i.e. bytes). + /// + /// Example: For the string "🚀 Woo" in UTF-8, the bytes are + /// [240, 159, 154, 128, 32, 87, 111, 111], so the offset for 'W' + /// would be 5. + static const PositionEncoding UTF8CodeUnitOffsetFromLineStart = + PositionEncoding._( + 1, _omitEnumNames ? '' : 'UTF8CodeUnitOffsetFromLineStart'); + + /// The 'character' value is interpreted as an offset in terms + /// of UTF-16 code units (each is 2 bytes). + /// + /// Example: For the string "🚀 Woo", the UTF-16 code units are + /// ['\ud83d', '\ude80', ' ', 'W', 'o', 'o'], so the offset for 'W' + /// would be 3. + static const PositionEncoding UTF16CodeUnitOffsetFromLineStart = + PositionEncoding._( + 2, _omitEnumNames ? '' : 'UTF16CodeUnitOffsetFromLineStart'); - static const $core.List values = [ + /// The 'character' value is interpreted as an offset in terms + /// of UTF-32 code units (each is 4 bytes). + /// + /// Example: For the string "🚀 Woo", the UTF-32 code units are + /// ['🚀', ' ', 'W', 'o', 'o'], so the offset for 'W' would be 2. + static const PositionEncoding UTF32CodeUnitOffsetFromLineStart = + PositionEncoding._( + 3, _omitEnumNames ? '' : 'UTF32CodeUnitOffsetFromLineStart'); + + static const $core.List values = [ UnspecifiedPositionEncoding, UTF8CodeUnitOffsetFromLineStart, UTF16CodeUnitOffsetFromLineStart, UTF32CodeUnitOffsetFromLineStart, ]; - static final $core.Map<$core.int, PositionEncoding> _byValue = $pb.ProtobufEnum.initByValue(values); - static PositionEncoding? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 3); + static PositionEncoding? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const PositionEncoding._($core.int v, $core.String n) : super(v, n); + const PositionEncoding._(super.value, super.name); } /// SymbolRole declares what "role" a symbol has in an occurrence. A role is @@ -69,16 +110,43 @@ class PositionEncoding extends $pb.ProtobufEnum { /// enum value is defined. In pseudocode, this can be implemented with the /// logic: `const isImportRole = (role.value & SymbolRole.Import.value) > 0`. class SymbolRole extends $pb.ProtobufEnum { - static const SymbolRole UnspecifiedSymbolRole = SymbolRole._(0, _omitEnumNames ? '' : 'UnspecifiedSymbolRole'); - static const SymbolRole Definition = SymbolRole._(1, _omitEnumNames ? '' : 'Definition'); - static const SymbolRole Import = SymbolRole._(2, _omitEnumNames ? '' : 'Import'); - static const SymbolRole WriteAccess = SymbolRole._(4, _omitEnumNames ? '' : 'WriteAccess'); - static const SymbolRole ReadAccess = SymbolRole._(8, _omitEnumNames ? '' : 'ReadAccess'); - static const SymbolRole Generated = SymbolRole._(16, _omitEnumNames ? '' : 'Generated'); + /// This case is not meant to be used; it only exists to avoid an error + /// from the Protobuf code generator. + static const SymbolRole UnspecifiedSymbolRole = + SymbolRole._(0, _omitEnumNames ? '' : 'UnspecifiedSymbolRole'); + + /// Is the symbol defined here? If not, then this is a symbol reference. + static const SymbolRole Definition = + SymbolRole._(1, _omitEnumNames ? '' : 'Definition'); + + /// Is the symbol imported here? + static const SymbolRole Import = + SymbolRole._(2, _omitEnumNames ? '' : 'Import'); + + /// Is the symbol written here? + static const SymbolRole WriteAccess = + SymbolRole._(4, _omitEnumNames ? '' : 'WriteAccess'); + + /// Is the symbol read here? + static const SymbolRole ReadAccess = + SymbolRole._(8, _omitEnumNames ? '' : 'ReadAccess'); + + /// Is the symbol in generated code? + static const SymbolRole Generated = + SymbolRole._(16, _omitEnumNames ? '' : 'Generated'); + + /// Is the symbol in test code? static const SymbolRole Test = SymbolRole._(32, _omitEnumNames ? '' : 'Test'); - static const SymbolRole ForwardDefinition = SymbolRole._(64, _omitEnumNames ? '' : 'ForwardDefinition'); - static const $core.List values = [ + /// Is this a signature for a symbol that is defined elsewhere? + /// + /// Applies to forward declarations for languages like C, C++ + /// and Objective-C, as well as `val` declarations in interface + /// files in languages like SML and OCaml. + static const SymbolRole ForwardDefinition = + SymbolRole._(64, _omitEnumNames ? '' : 'ForwardDefinition'); + + static const $core.List values = [ UnspecifiedSymbolRole, Definition, Import, @@ -89,55 +157,167 @@ class SymbolRole extends $pb.ProtobufEnum { ForwardDefinition, ]; - static final $core.Map<$core.int, SymbolRole> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, SymbolRole> _byValue = + $pb.ProtobufEnum.initByValue(values); static SymbolRole? valueOf($core.int value) => _byValue[value]; - const SymbolRole._($core.int v, $core.String n) : super(v, n); + const SymbolRole._(super.value, super.name); } class SyntaxKind extends $pb.ProtobufEnum { - static const SyntaxKind UnspecifiedSyntaxKind = SyntaxKind._(0, _omitEnumNames ? '' : 'UnspecifiedSyntaxKind'); - static const SyntaxKind Comment = SyntaxKind._(1, _omitEnumNames ? '' : 'Comment'); - static const SyntaxKind PunctuationDelimiter = SyntaxKind._(2, _omitEnumNames ? '' : 'PunctuationDelimiter'); - static const SyntaxKind PunctuationBracket = SyntaxKind._(3, _omitEnumNames ? '' : 'PunctuationBracket'); - static const SyntaxKind Keyword = SyntaxKind._(4, _omitEnumNames ? '' : 'Keyword'); - static const SyntaxKind IdentifierOperator = SyntaxKind._(5, _omitEnumNames ? '' : 'IdentifierOperator'); - static const SyntaxKind Identifier = SyntaxKind._(6, _omitEnumNames ? '' : 'Identifier'); - static const SyntaxKind IdentifierBuiltin = SyntaxKind._(7, _omitEnumNames ? '' : 'IdentifierBuiltin'); - static const SyntaxKind IdentifierNull = SyntaxKind._(8, _omitEnumNames ? '' : 'IdentifierNull'); - static const SyntaxKind IdentifierConstant = SyntaxKind._(9, _omitEnumNames ? '' : 'IdentifierConstant'); - static const SyntaxKind IdentifierMutableGlobal = SyntaxKind._(10, _omitEnumNames ? '' : 'IdentifierMutableGlobal'); - static const SyntaxKind IdentifierParameter = SyntaxKind._(11, _omitEnumNames ? '' : 'IdentifierParameter'); - static const SyntaxKind IdentifierLocal = SyntaxKind._(12, _omitEnumNames ? '' : 'IdentifierLocal'); - static const SyntaxKind IdentifierShadowed = SyntaxKind._(13, _omitEnumNames ? '' : 'IdentifierShadowed'); - static const SyntaxKind IdentifierNamespace = SyntaxKind._(14, _omitEnumNames ? '' : 'IdentifierNamespace'); - static const SyntaxKind IdentifierFunction = SyntaxKind._(15, _omitEnumNames ? '' : 'IdentifierFunction'); - static const SyntaxKind IdentifierFunctionDefinition = SyntaxKind._(16, _omitEnumNames ? '' : 'IdentifierFunctionDefinition'); - static const SyntaxKind IdentifierMacro = SyntaxKind._(17, _omitEnumNames ? '' : 'IdentifierMacro'); - static const SyntaxKind IdentifierMacroDefinition = SyntaxKind._(18, _omitEnumNames ? '' : 'IdentifierMacroDefinition'); - static const SyntaxKind IdentifierType = SyntaxKind._(19, _omitEnumNames ? '' : 'IdentifierType'); - static const SyntaxKind IdentifierBuiltinType = SyntaxKind._(20, _omitEnumNames ? '' : 'IdentifierBuiltinType'); - static const SyntaxKind IdentifierAttribute = SyntaxKind._(21, _omitEnumNames ? '' : 'IdentifierAttribute'); - static const SyntaxKind RegexEscape = SyntaxKind._(22, _omitEnumNames ? '' : 'RegexEscape'); - static const SyntaxKind RegexRepeated = SyntaxKind._(23, _omitEnumNames ? '' : 'RegexRepeated'); - static const SyntaxKind RegexWildcard = SyntaxKind._(24, _omitEnumNames ? '' : 'RegexWildcard'); - static const SyntaxKind RegexDelimiter = SyntaxKind._(25, _omitEnumNames ? '' : 'RegexDelimiter'); - static const SyntaxKind RegexJoin = SyntaxKind._(26, _omitEnumNames ? '' : 'RegexJoin'); - static const SyntaxKind StringLiteral = SyntaxKind._(27, _omitEnumNames ? '' : 'StringLiteral'); - static const SyntaxKind StringLiteralEscape = SyntaxKind._(28, _omitEnumNames ? '' : 'StringLiteralEscape'); - static const SyntaxKind StringLiteralSpecial = SyntaxKind._(29, _omitEnumNames ? '' : 'StringLiteralSpecial'); - static const SyntaxKind StringLiteralKey = SyntaxKind._(30, _omitEnumNames ? '' : 'StringLiteralKey'); - static const SyntaxKind CharacterLiteral = SyntaxKind._(31, _omitEnumNames ? '' : 'CharacterLiteral'); - static const SyntaxKind NumericLiteral = SyntaxKind._(32, _omitEnumNames ? '' : 'NumericLiteral'); - static const SyntaxKind BooleanLiteral = SyntaxKind._(33, _omitEnumNames ? '' : 'BooleanLiteral'); + static const SyntaxKind UnspecifiedSyntaxKind = + SyntaxKind._(0, _omitEnumNames ? '' : 'UnspecifiedSyntaxKind'); + + /// Comment, including comment markers and text + static const SyntaxKind Comment = + SyntaxKind._(1, _omitEnumNames ? '' : 'Comment'); + + /// `;` `.` `,` + static const SyntaxKind PunctuationDelimiter = + SyntaxKind._(2, _omitEnumNames ? '' : 'PunctuationDelimiter'); + + /// (), {}, [] when used syntactically + static const SyntaxKind PunctuationBracket = + SyntaxKind._(3, _omitEnumNames ? '' : 'PunctuationBracket'); + + /// `if`, `else`, `return`, `class`, etc. + static const SyntaxKind Keyword = + SyntaxKind._(4, _omitEnumNames ? '' : 'Keyword'); + + /// `+`, `*`, etc. + static const SyntaxKind IdentifierOperator = + SyntaxKind._(5, _omitEnumNames ? '' : 'IdentifierOperator'); + + /// non-specific catch-all for any identifier not better described elsewhere + static const SyntaxKind Identifier = + SyntaxKind._(6, _omitEnumNames ? '' : 'Identifier'); + + /// Identifiers builtin to the language: `min`, `print` in Python. + static const SyntaxKind IdentifierBuiltin = + SyntaxKind._(7, _omitEnumNames ? '' : 'IdentifierBuiltin'); + + /// Identifiers representing `null`-like values: `None` in Python, `nil` in Go. + static const SyntaxKind IdentifierNull = + SyntaxKind._(8, _omitEnumNames ? '' : 'IdentifierNull'); + + /// `xyz` in `const xyz = "hello"` + static const SyntaxKind IdentifierConstant = + SyntaxKind._(9, _omitEnumNames ? '' : 'IdentifierConstant'); + + /// `var X = "hello"` in Go + static const SyntaxKind IdentifierMutableGlobal = + SyntaxKind._(10, _omitEnumNames ? '' : 'IdentifierMutableGlobal'); + + /// Parameter definition and references + static const SyntaxKind IdentifierParameter = + SyntaxKind._(11, _omitEnumNames ? '' : 'IdentifierParameter'); + + /// Identifiers for variable definitions and references within a local scope + static const SyntaxKind IdentifierLocal = + SyntaxKind._(12, _omitEnumNames ? '' : 'IdentifierLocal'); + + /// Identifiers that shadow other identifiers in an outer scope + static const SyntaxKind IdentifierShadowed = + SyntaxKind._(13, _omitEnumNames ? '' : 'IdentifierShadowed'); + + /// Identifier representing a unit of code abstraction and/or namespacing. + /// + /// NOTE: This corresponds to a package in Go and JVM languages, + /// and a module in languages like Python and JavaScript. + static const SyntaxKind IdentifierNamespace = + SyntaxKind._(14, _omitEnumNames ? '' : 'IdentifierNamespace'); + + /// Function references, including calls + static const SyntaxKind IdentifierFunction = + SyntaxKind._(15, _omitEnumNames ? '' : 'IdentifierFunction'); + + /// Function definition only + static const SyntaxKind IdentifierFunctionDefinition = + SyntaxKind._(16, _omitEnumNames ? '' : 'IdentifierFunctionDefinition'); + + /// Macro references, including invocations + static const SyntaxKind IdentifierMacro = + SyntaxKind._(17, _omitEnumNames ? '' : 'IdentifierMacro'); + + /// Macro definition only + static const SyntaxKind IdentifierMacroDefinition = + SyntaxKind._(18, _omitEnumNames ? '' : 'IdentifierMacroDefinition'); + + /// non-builtin types + static const SyntaxKind IdentifierType = + SyntaxKind._(19, _omitEnumNames ? '' : 'IdentifierType'); + + /// builtin types only, such as `str` for Python or `int` in Go + static const SyntaxKind IdentifierBuiltinType = + SyntaxKind._(20, _omitEnumNames ? '' : 'IdentifierBuiltinType'); + + /// Python decorators, c-like __attribute__ + static const SyntaxKind IdentifierAttribute = + SyntaxKind._(21, _omitEnumNames ? '' : 'IdentifierAttribute'); + + /// `\b` + static const SyntaxKind RegexEscape = + SyntaxKind._(22, _omitEnumNames ? '' : 'RegexEscape'); + + /// `*`, `+` + static const SyntaxKind RegexRepeated = + SyntaxKind._(23, _omitEnumNames ? '' : 'RegexRepeated'); + + /// `.` + static const SyntaxKind RegexWildcard = + SyntaxKind._(24, _omitEnumNames ? '' : 'RegexWildcard'); + + /// `(`, `)`, `[`, `]` + static const SyntaxKind RegexDelimiter = + SyntaxKind._(25, _omitEnumNames ? '' : 'RegexDelimiter'); + + /// `|`, `-` + static const SyntaxKind RegexJoin = + SyntaxKind._(26, _omitEnumNames ? '' : 'RegexJoin'); + + /// Literal strings: "Hello, world!" + static const SyntaxKind StringLiteral = + SyntaxKind._(27, _omitEnumNames ? '' : 'StringLiteral'); + + /// non-regex escapes: "\t", "\n" + static const SyntaxKind StringLiteralEscape = + SyntaxKind._(28, _omitEnumNames ? '' : 'StringLiteralEscape'); + + /// datetimes within strings, special words within a string, `{}` in format strings + static const SyntaxKind StringLiteralSpecial = + SyntaxKind._(29, _omitEnumNames ? '' : 'StringLiteralSpecial'); + + /// "key" in { "key": "value" }, useful for example in JSON + static const SyntaxKind StringLiteralKey = + SyntaxKind._(30, _omitEnumNames ? '' : 'StringLiteralKey'); + + /// 'c' or similar, in languages that differentiate strings and characters + static const SyntaxKind CharacterLiteral = + SyntaxKind._(31, _omitEnumNames ? '' : 'CharacterLiteral'); + + /// Literal numbers, both floats and integers + static const SyntaxKind NumericLiteral = + SyntaxKind._(32, _omitEnumNames ? '' : 'NumericLiteral'); + + /// `true`, `false` + static const SyntaxKind BooleanLiteral = + SyntaxKind._(33, _omitEnumNames ? '' : 'BooleanLiteral'); + + /// Used for XML-like tags static const SyntaxKind Tag = SyntaxKind._(34, _omitEnumNames ? '' : 'Tag'); - static const SyntaxKind TagAttribute = SyntaxKind._(35, _omitEnumNames ? '' : 'TagAttribute'); - static const SyntaxKind TagDelimiter = SyntaxKind._(36, _omitEnumNames ? '' : 'TagDelimiter'); + + /// Attribute name in XML-like tags + static const SyntaxKind TagAttribute = + SyntaxKind._(35, _omitEnumNames ? '' : 'TagAttribute'); + + /// Delimiters for XML-like tags + static const SyntaxKind TagDelimiter = + SyntaxKind._(36, _omitEnumNames ? '' : 'TagDelimiter'); static const SyntaxKind IdentifierKeyword = Keyword; static const SyntaxKind IdentifierModule = IdentifierNamespace; - static const $core.List values = [ + static const $core.List values = [ UnspecifiedSyntaxKind, Comment, PunctuationDelimiter, @@ -177,20 +357,25 @@ class SyntaxKind extends $pb.ProtobufEnum { TagDelimiter, ]; - static final $core.Map<$core.int, SyntaxKind> _byValue = $pb.ProtobufEnum.initByValue(values); - static SyntaxKind? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 36); + static SyntaxKind? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const SyntaxKind._($core.int v, $core.String n) : super(v, n); + const SyntaxKind._(super.value, super.name); } class Severity extends $pb.ProtobufEnum { - static const Severity UnspecifiedSeverity = Severity._(0, _omitEnumNames ? '' : 'UnspecifiedSeverity'); + static const Severity UnspecifiedSeverity = + Severity._(0, _omitEnumNames ? '' : 'UnspecifiedSeverity'); static const Severity Error = Severity._(1, _omitEnumNames ? '' : 'Error'); - static const Severity Warning = Severity._(2, _omitEnumNames ? '' : 'Warning'); - static const Severity Information = Severity._(3, _omitEnumNames ? '' : 'Information'); + static const Severity Warning = + Severity._(2, _omitEnumNames ? '' : 'Warning'); + static const Severity Information = + Severity._(3, _omitEnumNames ? '' : 'Information'); static const Severity Hint = Severity._(4, _omitEnumNames ? '' : 'Hint'); - static const $core.List values = [ + static const $core.List values = [ UnspecifiedSeverity, Error, Warning, @@ -198,27 +383,34 @@ class Severity extends $pb.ProtobufEnum { Hint, ]; - static final $core.Map<$core.int, Severity> _byValue = $pb.ProtobufEnum.initByValue(values); - static Severity? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 4); + static Severity? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const Severity._($core.int v, $core.String n) : super(v, n); + const Severity._(super.value, super.name); } class DiagnosticTag extends $pb.ProtobufEnum { - static const DiagnosticTag UnspecifiedDiagnosticTag = DiagnosticTag._(0, _omitEnumNames ? '' : 'UnspecifiedDiagnosticTag'); - static const DiagnosticTag Unnecessary = DiagnosticTag._(1, _omitEnumNames ? '' : 'Unnecessary'); - static const DiagnosticTag Deprecated = DiagnosticTag._(2, _omitEnumNames ? '' : 'Deprecated'); + static const DiagnosticTag UnspecifiedDiagnosticTag = + DiagnosticTag._(0, _omitEnumNames ? '' : 'UnspecifiedDiagnosticTag'); + static const DiagnosticTag Unnecessary = + DiagnosticTag._(1, _omitEnumNames ? '' : 'Unnecessary'); + static const DiagnosticTag Deprecated = + DiagnosticTag._(2, _omitEnumNames ? '' : 'Deprecated'); - static const $core.List values = [ + static const $core.List values = [ UnspecifiedDiagnosticTag, Unnecessary, Deprecated, ]; - static final $core.Map<$core.int, DiagnosticTag> _byValue = $pb.ProtobufEnum.initByValue(values); - static DiagnosticTag? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 2); + static DiagnosticTag? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const DiagnosticTag._($core.int v, $core.String n) : super(v, n); + const DiagnosticTag._(super.value, super.name); } /// Language standardises names of common programming languages that can be used @@ -228,14 +420,17 @@ class DiagnosticTag extends $pb.ProtobufEnum { /// "CPP" in this enum and other names such as "cpp" are incompatible. /// Feel free to send a pull-request to add missing programming languages. class Language extends $pb.ProtobufEnum { - static const Language UnspecifiedLanguage = Language._(0, _omitEnumNames ? '' : 'UnspecifiedLanguage'); + static const Language UnspecifiedLanguage = + Language._(0, _omitEnumNames ? '' : 'UnspecifiedLanguage'); static const Language ABAP = Language._(60, _omitEnumNames ? '' : 'ABAP'); static const Language Apex = Language._(96, _omitEnumNames ? '' : 'Apex'); static const Language APL = Language._(49, _omitEnumNames ? '' : 'APL'); static const Language Ada = Language._(39, _omitEnumNames ? '' : 'Ada'); static const Language Agda = Language._(45, _omitEnumNames ? '' : 'Agda'); - static const Language AsciiDoc = Language._(86, _omitEnumNames ? '' : 'AsciiDoc'); - static const Language Assembly = Language._(58, _omitEnumNames ? '' : 'Assembly'); + static const Language AsciiDoc = + Language._(86, _omitEnumNames ? '' : 'AsciiDoc'); + static const Language Assembly = + Language._(58, _omitEnumNames ? '' : 'Assembly'); static const Language Awk = Language._(66, _omitEnumNames ? '' : 'Awk'); static const Language Bat = Language._(68, _omitEnumNames ? '' : 'Bat'); static const Language BibTeX = Language._(81, _omitEnumNames ? '' : 'BibTeX'); @@ -244,63 +439,85 @@ class Language extends $pb.ProtobufEnum { static const Language CPP = Language._(35, _omitEnumNames ? '' : 'CPP'); static const Language CSS = Language._(26, _omitEnumNames ? '' : 'CSS'); static const Language CSharp = Language._(1, _omitEnumNames ? '' : 'CSharp'); - static const Language Clojure = Language._(8, _omitEnumNames ? '' : 'Clojure'); - static const Language Coffeescript = Language._(21, _omitEnumNames ? '' : 'Coffeescript'); - static const Language CommonLisp = Language._(9, _omitEnumNames ? '' : 'CommonLisp'); + static const Language Clojure = + Language._(8, _omitEnumNames ? '' : 'Clojure'); + static const Language Coffeescript = + Language._(21, _omitEnumNames ? '' : 'Coffeescript'); + static const Language CommonLisp = + Language._(9, _omitEnumNames ? '' : 'CommonLisp'); static const Language Coq = Language._(47, _omitEnumNames ? '' : 'Coq'); static const Language CUDA = Language._(97, _omitEnumNames ? '' : 'CUDA'); static const Language Dart = Language._(3, _omitEnumNames ? '' : 'Dart'); static const Language Delphi = Language._(57, _omitEnumNames ? '' : 'Delphi'); static const Language Diff = Language._(88, _omitEnumNames ? '' : 'Diff'); - static const Language Dockerfile = Language._(80, _omitEnumNames ? '' : 'Dockerfile'); + static const Language Dockerfile = + Language._(80, _omitEnumNames ? '' : 'Dockerfile'); static const Language Dyalog = Language._(50, _omitEnumNames ? '' : 'Dyalog'); static const Language Elixir = Language._(17, _omitEnumNames ? '' : 'Elixir'); static const Language Erlang = Language._(18, _omitEnumNames ? '' : 'Erlang'); static const Language FSharp = Language._(42, _omitEnumNames ? '' : 'FSharp'); static const Language Fish = Language._(65, _omitEnumNames ? '' : 'Fish'); static const Language Flow = Language._(24, _omitEnumNames ? '' : 'Flow'); - static const Language Fortran = Language._(56, _omitEnumNames ? '' : 'Fortran'); - static const Language Git_Commit = Language._(91, _omitEnumNames ? '' : 'Git_Commit'); - static const Language Git_Config = Language._(89, _omitEnumNames ? '' : 'Git_Config'); - static const Language Git_Rebase = Language._(92, _omitEnumNames ? '' : 'Git_Rebase'); + static const Language Fortran = + Language._(56, _omitEnumNames ? '' : 'Fortran'); + static const Language Git_Commit = + Language._(91, _omitEnumNames ? '' : 'Git_Commit'); + static const Language Git_Config = + Language._(89, _omitEnumNames ? '' : 'Git_Config'); + static const Language Git_Rebase = + Language._(92, _omitEnumNames ? '' : 'Git_Rebase'); static const Language Go = Language._(33, _omitEnumNames ? '' : 'Go'); - static const Language GraphQL = Language._(98, _omitEnumNames ? '' : 'GraphQL'); + static const Language GraphQL = + Language._(98, _omitEnumNames ? '' : 'GraphQL'); static const Language Groovy = Language._(7, _omitEnumNames ? '' : 'Groovy'); static const Language HTML = Language._(30, _omitEnumNames ? '' : 'HTML'); static const Language Hack = Language._(20, _omitEnumNames ? '' : 'Hack'); - static const Language Handlebars = Language._(90, _omitEnumNames ? '' : 'Handlebars'); - static const Language Haskell = Language._(44, _omitEnumNames ? '' : 'Haskell'); + static const Language Handlebars = + Language._(90, _omitEnumNames ? '' : 'Handlebars'); + static const Language Haskell = + Language._(44, _omitEnumNames ? '' : 'Haskell'); static const Language Idris = Language._(46, _omitEnumNames ? '' : 'Idris'); static const Language Ini = Language._(72, _omitEnumNames ? '' : 'Ini'); static const Language J = Language._(51, _omitEnumNames ? '' : 'J'); static const Language JSON = Language._(75, _omitEnumNames ? '' : 'JSON'); static const Language Java = Language._(6, _omitEnumNames ? '' : 'Java'); - static const Language JavaScript = Language._(22, _omitEnumNames ? '' : 'JavaScript'); - static const Language JavaScriptReact = Language._(93, _omitEnumNames ? '' : 'JavaScriptReact'); - static const Language Jsonnet = Language._(76, _omitEnumNames ? '' : 'Jsonnet'); + static const Language JavaScript = + Language._(22, _omitEnumNames ? '' : 'JavaScript'); + static const Language JavaScriptReact = + Language._(93, _omitEnumNames ? '' : 'JavaScriptReact'); + static const Language Jsonnet = + Language._(76, _omitEnumNames ? '' : 'Jsonnet'); static const Language Julia = Language._(55, _omitEnumNames ? '' : 'Julia'); - static const Language Justfile = Language._(109, _omitEnumNames ? '' : 'Justfile'); + static const Language Justfile = + Language._(109, _omitEnumNames ? '' : 'Justfile'); static const Language Kotlin = Language._(4, _omitEnumNames ? '' : 'Kotlin'); static const Language LaTeX = Language._(83, _omitEnumNames ? '' : 'LaTeX'); static const Language Lean = Language._(48, _omitEnumNames ? '' : 'Lean'); static const Language Less = Language._(27, _omitEnumNames ? '' : 'Less'); static const Language Lua = Language._(12, _omitEnumNames ? '' : 'Lua'); static const Language Luau = Language._(108, _omitEnumNames ? '' : 'Luau'); - static const Language Makefile = Language._(79, _omitEnumNames ? '' : 'Makefile'); - static const Language Markdown = Language._(84, _omitEnumNames ? '' : 'Markdown'); + static const Language Makefile = + Language._(79, _omitEnumNames ? '' : 'Makefile'); + static const Language Markdown = + Language._(84, _omitEnumNames ? '' : 'Markdown'); static const Language Matlab = Language._(52, _omitEnumNames ? '' : 'Matlab'); - static const Language Nickel = Language._(110, _omitEnumNames ? '' : 'Nickel'); + static const Language Nickel = + Language._(110, _omitEnumNames ? '' : 'Nickel'); static const Language Nix = Language._(77, _omitEnumNames ? '' : 'Nix'); static const Language OCaml = Language._(41, _omitEnumNames ? '' : 'OCaml'); - static const Language Objective_C = Language._(36, _omitEnumNames ? '' : 'Objective_C'); - static const Language Objective_CPP = Language._(37, _omitEnumNames ? '' : 'Objective_CPP'); + static const Language Objective_C = + Language._(36, _omitEnumNames ? '' : 'Objective_C'); + static const Language Objective_CPP = + Language._(37, _omitEnumNames ? '' : 'Objective_CPP'); static const Language Pascal = Language._(99, _omitEnumNames ? '' : 'Pascal'); static const Language PHP = Language._(19, _omitEnumNames ? '' : 'PHP'); static const Language PLSQL = Language._(70, _omitEnumNames ? '' : 'PLSQL'); static const Language Perl = Language._(13, _omitEnumNames ? '' : 'Perl'); - static const Language PowerShell = Language._(67, _omitEnumNames ? '' : 'PowerShell'); + static const Language PowerShell = + Language._(67, _omitEnumNames ? '' : 'PowerShell'); static const Language Prolog = Language._(71, _omitEnumNames ? '' : 'Prolog'); - static const Language Protobuf = Language._(100, _omitEnumNames ? '' : 'Protobuf'); + static const Language Protobuf = + Language._(100, _omitEnumNames ? '' : 'Protobuf'); static const Language Python = Language._(15, _omitEnumNames ? '' : 'Python'); static const Language R = Language._(54, _omitEnumNames ? '' : 'R'); static const Language Racket = Language._(11, _omitEnumNames ? '' : 'Racket'); @@ -317,29 +534,39 @@ class Language extends $pb.ProtobufEnum { static const Language Sass = Language._(28, _omitEnumNames ? '' : 'Sass'); static const Language Scala = Language._(5, _omitEnumNames ? '' : 'Scala'); static const Language Scheme = Language._(10, _omitEnumNames ? '' : 'Scheme'); - static const Language ShellScript = Language._(64, _omitEnumNames ? '' : 'ShellScript'); - static const Language Skylark = Language._(78, _omitEnumNames ? '' : 'Skylark'); + static const Language ShellScript = + Language._(64, _omitEnumNames ? '' : 'ShellScript'); + static const Language Skylark = + Language._(78, _omitEnumNames ? '' : 'Skylark'); static const Language Slang = Language._(107, _omitEnumNames ? '' : 'Slang'); - static const Language Solidity = Language._(95, _omitEnumNames ? '' : 'Solidity'); - static const Language Svelte = Language._(106, _omitEnumNames ? '' : 'Svelte'); + static const Language Solidity = + Language._(95, _omitEnumNames ? '' : 'Solidity'); + static const Language Svelte = + Language._(106, _omitEnumNames ? '' : 'Svelte'); static const Language Swift = Language._(2, _omitEnumNames ? '' : 'Swift'); static const Language Tcl = Language._(101, _omitEnumNames ? '' : 'Tcl'); static const Language TOML = Language._(73, _omitEnumNames ? '' : 'TOML'); static const Language TeX = Language._(82, _omitEnumNames ? '' : 'TeX'); - static const Language Thrift = Language._(103, _omitEnumNames ? '' : 'Thrift'); - static const Language TypeScript = Language._(23, _omitEnumNames ? '' : 'TypeScript'); - static const Language TypeScriptReact = Language._(94, _omitEnumNames ? '' : 'TypeScriptReact'); - static const Language Verilog = Language._(104, _omitEnumNames ? '' : 'Verilog'); + static const Language Thrift = + Language._(103, _omitEnumNames ? '' : 'Thrift'); + static const Language TypeScript = + Language._(23, _omitEnumNames ? '' : 'TypeScript'); + static const Language TypeScriptReact = + Language._(94, _omitEnumNames ? '' : 'TypeScriptReact'); + static const Language Verilog = + Language._(104, _omitEnumNames ? '' : 'Verilog'); static const Language VHDL = Language._(105, _omitEnumNames ? '' : 'VHDL'); - static const Language VisualBasic = Language._(63, _omitEnumNames ? '' : 'VisualBasic'); + static const Language VisualBasic = + Language._(63, _omitEnumNames ? '' : 'VisualBasic'); static const Language Vue = Language._(25, _omitEnumNames ? '' : 'Vue'); - static const Language Wolfram = Language._(53, _omitEnumNames ? '' : 'Wolfram'); + static const Language Wolfram = + Language._(53, _omitEnumNames ? '' : 'Wolfram'); static const Language XML = Language._(31, _omitEnumNames ? '' : 'XML'); static const Language XSL = Language._(32, _omitEnumNames ? '' : 'XSL'); static const Language YAML = Language._(74, _omitEnumNames ? '' : 'YAML'); static const Language Zig = Language._(38, _omitEnumNames ? '' : 'Zig'); - static const $core.List values = [ + static const $core.List values = [ UnspecifiedLanguage, ABAP, Apex, @@ -452,27 +679,45 @@ class Language extends $pb.ProtobufEnum { Zig, ]; - static final $core.Map<$core.int, Language> _byValue = $pb.ProtobufEnum.initByValue(values); - static Language? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 110); + static Language? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const Language._($core.int v, $core.String n) : super(v, n); + const Language._(super.value, super.name); } class Descriptor_Suffix extends $pb.ProtobufEnum { - static const Descriptor_Suffix UnspecifiedSuffix = Descriptor_Suffix._(0, _omitEnumNames ? '' : 'UnspecifiedSuffix'); - static const Descriptor_Suffix Namespace = Descriptor_Suffix._(1, _omitEnumNames ? '' : 'Namespace'); - static const Descriptor_Suffix Type = Descriptor_Suffix._(2, _omitEnumNames ? '' : 'Type'); - static const Descriptor_Suffix Term = Descriptor_Suffix._(3, _omitEnumNames ? '' : 'Term'); - static const Descriptor_Suffix Method = Descriptor_Suffix._(4, _omitEnumNames ? '' : 'Method'); - static const Descriptor_Suffix TypeParameter = Descriptor_Suffix._(5, _omitEnumNames ? '' : 'TypeParameter'); - static const Descriptor_Suffix Parameter = Descriptor_Suffix._(6, _omitEnumNames ? '' : 'Parameter'); - static const Descriptor_Suffix Meta = Descriptor_Suffix._(7, _omitEnumNames ? '' : 'Meta'); - static const Descriptor_Suffix Local = Descriptor_Suffix._(8, _omitEnumNames ? '' : 'Local'); - static const Descriptor_Suffix Macro = Descriptor_Suffix._(9, _omitEnumNames ? '' : 'Macro'); + static const Descriptor_Suffix UnspecifiedSuffix = + Descriptor_Suffix._(0, _omitEnumNames ? '' : 'UnspecifiedSuffix'); + + /// Unit of code abstraction and/or namespacing. + /// + /// NOTE: This corresponds to a package in Go and JVM languages. + static const Descriptor_Suffix Namespace = + Descriptor_Suffix._(1, _omitEnumNames ? '' : 'Namespace'); + static const Descriptor_Suffix Type = + Descriptor_Suffix._(2, _omitEnumNames ? '' : 'Type'); + static const Descriptor_Suffix Term = + Descriptor_Suffix._(3, _omitEnumNames ? '' : 'Term'); + static const Descriptor_Suffix Method = + Descriptor_Suffix._(4, _omitEnumNames ? '' : 'Method'); + static const Descriptor_Suffix TypeParameter = + Descriptor_Suffix._(5, _omitEnumNames ? '' : 'TypeParameter'); + static const Descriptor_Suffix Parameter = + Descriptor_Suffix._(6, _omitEnumNames ? '' : 'Parameter'); + + /// Can be used for any purpose. + static const Descriptor_Suffix Meta = + Descriptor_Suffix._(7, _omitEnumNames ? '' : 'Meta'); + static const Descriptor_Suffix Local = + Descriptor_Suffix._(8, _omitEnumNames ? '' : 'Local'); + static const Descriptor_Suffix Macro = + Descriptor_Suffix._(9, _omitEnumNames ? '' : 'Macro'); static const Descriptor_Suffix Package = Namespace; - static const $core.List values = [ + static const $core.List values = [ UnspecifiedSuffix, Namespace, Type, @@ -485,114 +730,305 @@ class Descriptor_Suffix extends $pb.ProtobufEnum { Macro, ]; - static final $core.Map<$core.int, Descriptor_Suffix> _byValue = $pb.ProtobufEnum.initByValue(values); - static Descriptor_Suffix? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 9); + static Descriptor_Suffix? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const Descriptor_Suffix._($core.int v, $core.String n) : super(v, n); + const Descriptor_Suffix._(super.value, super.name); } -/// (optional) Kind represents the fine-grained category of a symbol, suitable for presenting -/// information about the symbol's meaning in the language. +/// (optional) Kind represents the fine-grained category of a symbol, suitable for presenting +/// information about the symbol's meaning in the language. /// -/// For example: -/// - A Java method would have the kind `Method` while a Go function would -/// have the kind `Function`, even if the symbols for these use the same -/// syntax for the descriptor `SymbolDescriptor.Suffix.Method`. -/// - A Go struct has the symbol kind `Struct` while a Java class has -/// the symbol kind `Class` even if they both have the same descriptor: -/// `SymbolDescriptor.Suffix.Type`. +/// For example: +/// - A Java method would have the kind `Method` while a Go function would +/// have the kind `Function`, even if the symbols for these use the same +/// syntax for the descriptor `SymbolDescriptor.Suffix.Method`. +/// - A Go struct has the symbol kind `Struct` while a Java class has +/// the symbol kind `Class` even if they both have the same descriptor: +/// `SymbolDescriptor.Suffix.Type`. /// -/// Since Kind is more fine-grained than Suffix: -/// - If two symbols have the same Kind, they should share the same Suffix. -/// - If two symbols have different Suffixes, they should have different Kinds. +/// Since Kind is more fine-grained than Suffix: +/// - If two symbols have the same Kind, they should share the same Suffix. +/// - If two symbols have different Suffixes, they should have different Kinds. class SymbolInformation_Kind extends $pb.ProtobufEnum { - static const SymbolInformation_Kind UnspecifiedKind = SymbolInformation_Kind._(0, _omitEnumNames ? '' : 'UnspecifiedKind'); - static const SymbolInformation_Kind AbstractMethod = SymbolInformation_Kind._(66, _omitEnumNames ? '' : 'AbstractMethod'); - static const SymbolInformation_Kind Accessor = SymbolInformation_Kind._(72, _omitEnumNames ? '' : 'Accessor'); - static const SymbolInformation_Kind Array = SymbolInformation_Kind._(1, _omitEnumNames ? '' : 'Array'); - static const SymbolInformation_Kind Assertion = SymbolInformation_Kind._(2, _omitEnumNames ? '' : 'Assertion'); - static const SymbolInformation_Kind AssociatedType = SymbolInformation_Kind._(3, _omitEnumNames ? '' : 'AssociatedType'); - static const SymbolInformation_Kind Attribute = SymbolInformation_Kind._(4, _omitEnumNames ? '' : 'Attribute'); - static const SymbolInformation_Kind Axiom = SymbolInformation_Kind._(5, _omitEnumNames ? '' : 'Axiom'); - static const SymbolInformation_Kind Boolean = SymbolInformation_Kind._(6, _omitEnumNames ? '' : 'Boolean'); - static const SymbolInformation_Kind Class = SymbolInformation_Kind._(7, _omitEnumNames ? '' : 'Class'); - static const SymbolInformation_Kind Constant = SymbolInformation_Kind._(8, _omitEnumNames ? '' : 'Constant'); - static const SymbolInformation_Kind Constructor = SymbolInformation_Kind._(9, _omitEnumNames ? '' : 'Constructor'); - static const SymbolInformation_Kind Contract = SymbolInformation_Kind._(62, _omitEnumNames ? '' : 'Contract'); - static const SymbolInformation_Kind DataFamily = SymbolInformation_Kind._(10, _omitEnumNames ? '' : 'DataFamily'); - static const SymbolInformation_Kind Delegate = SymbolInformation_Kind._(73, _omitEnumNames ? '' : 'Delegate'); - static const SymbolInformation_Kind Enum = SymbolInformation_Kind._(11, _omitEnumNames ? '' : 'Enum'); - static const SymbolInformation_Kind EnumMember = SymbolInformation_Kind._(12, _omitEnumNames ? '' : 'EnumMember'); - static const SymbolInformation_Kind Error = SymbolInformation_Kind._(63, _omitEnumNames ? '' : 'Error'); - static const SymbolInformation_Kind Event = SymbolInformation_Kind._(13, _omitEnumNames ? '' : 'Event'); - static const SymbolInformation_Kind Extension = SymbolInformation_Kind._(84, _omitEnumNames ? '' : 'Extension'); - static const SymbolInformation_Kind Fact = SymbolInformation_Kind._(14, _omitEnumNames ? '' : 'Fact'); - static const SymbolInformation_Kind Field = SymbolInformation_Kind._(15, _omitEnumNames ? '' : 'Field'); - static const SymbolInformation_Kind File = SymbolInformation_Kind._(16, _omitEnumNames ? '' : 'File'); - static const SymbolInformation_Kind Function = SymbolInformation_Kind._(17, _omitEnumNames ? '' : 'Function'); - static const SymbolInformation_Kind Getter = SymbolInformation_Kind._(18, _omitEnumNames ? '' : 'Getter'); - static const SymbolInformation_Kind Grammar = SymbolInformation_Kind._(19, _omitEnumNames ? '' : 'Grammar'); - static const SymbolInformation_Kind Instance = SymbolInformation_Kind._(20, _omitEnumNames ? '' : 'Instance'); - static const SymbolInformation_Kind Interface = SymbolInformation_Kind._(21, _omitEnumNames ? '' : 'Interface'); - static const SymbolInformation_Kind Key = SymbolInformation_Kind._(22, _omitEnumNames ? '' : 'Key'); - static const SymbolInformation_Kind Lang = SymbolInformation_Kind._(23, _omitEnumNames ? '' : 'Lang'); - static const SymbolInformation_Kind Lemma = SymbolInformation_Kind._(24, _omitEnumNames ? '' : 'Lemma'); - static const SymbolInformation_Kind Library = SymbolInformation_Kind._(64, _omitEnumNames ? '' : 'Library'); - static const SymbolInformation_Kind Macro = SymbolInformation_Kind._(25, _omitEnumNames ? '' : 'Macro'); - static const SymbolInformation_Kind Method = SymbolInformation_Kind._(26, _omitEnumNames ? '' : 'Method'); - static const SymbolInformation_Kind MethodAlias = SymbolInformation_Kind._(74, _omitEnumNames ? '' : 'MethodAlias'); - static const SymbolInformation_Kind MethodReceiver = SymbolInformation_Kind._(27, _omitEnumNames ? '' : 'MethodReceiver'); - static const SymbolInformation_Kind MethodSpecification = SymbolInformation_Kind._(67, _omitEnumNames ? '' : 'MethodSpecification'); - static const SymbolInformation_Kind Message = SymbolInformation_Kind._(28, _omitEnumNames ? '' : 'Message'); - static const SymbolInformation_Kind Mixin = SymbolInformation_Kind._(85, _omitEnumNames ? '' : 'Mixin'); - static const SymbolInformation_Kind Modifier = SymbolInformation_Kind._(65, _omitEnumNames ? '' : 'Modifier'); - static const SymbolInformation_Kind Module = SymbolInformation_Kind._(29, _omitEnumNames ? '' : 'Module'); - static const SymbolInformation_Kind Namespace = SymbolInformation_Kind._(30, _omitEnumNames ? '' : 'Namespace'); - static const SymbolInformation_Kind Null = SymbolInformation_Kind._(31, _omitEnumNames ? '' : 'Null'); - static const SymbolInformation_Kind Number = SymbolInformation_Kind._(32, _omitEnumNames ? '' : 'Number'); - static const SymbolInformation_Kind Object_ = SymbolInformation_Kind._(33, _omitEnumNames ? '' : 'Object'); - static const SymbolInformation_Kind Operator = SymbolInformation_Kind._(34, _omitEnumNames ? '' : 'Operator'); - static const SymbolInformation_Kind Package = SymbolInformation_Kind._(35, _omitEnumNames ? '' : 'Package'); - static const SymbolInformation_Kind PackageObject = SymbolInformation_Kind._(36, _omitEnumNames ? '' : 'PackageObject'); - static const SymbolInformation_Kind Parameter = SymbolInformation_Kind._(37, _omitEnumNames ? '' : 'Parameter'); - static const SymbolInformation_Kind ParameterLabel = SymbolInformation_Kind._(38, _omitEnumNames ? '' : 'ParameterLabel'); - static const SymbolInformation_Kind Pattern = SymbolInformation_Kind._(39, _omitEnumNames ? '' : 'Pattern'); - static const SymbolInformation_Kind Predicate = SymbolInformation_Kind._(40, _omitEnumNames ? '' : 'Predicate'); - static const SymbolInformation_Kind Property = SymbolInformation_Kind._(41, _omitEnumNames ? '' : 'Property'); - static const SymbolInformation_Kind Protocol = SymbolInformation_Kind._(42, _omitEnumNames ? '' : 'Protocol'); - static const SymbolInformation_Kind ProtocolMethod = SymbolInformation_Kind._(68, _omitEnumNames ? '' : 'ProtocolMethod'); - static const SymbolInformation_Kind PureVirtualMethod = SymbolInformation_Kind._(69, _omitEnumNames ? '' : 'PureVirtualMethod'); - static const SymbolInformation_Kind Quasiquoter = SymbolInformation_Kind._(43, _omitEnumNames ? '' : 'Quasiquoter'); - static const SymbolInformation_Kind SelfParameter = SymbolInformation_Kind._(44, _omitEnumNames ? '' : 'SelfParameter'); - static const SymbolInformation_Kind Setter = SymbolInformation_Kind._(45, _omitEnumNames ? '' : 'Setter'); - static const SymbolInformation_Kind Signature = SymbolInformation_Kind._(46, _omitEnumNames ? '' : 'Signature'); - static const SymbolInformation_Kind SingletonClass = SymbolInformation_Kind._(75, _omitEnumNames ? '' : 'SingletonClass'); - static const SymbolInformation_Kind SingletonMethod = SymbolInformation_Kind._(76, _omitEnumNames ? '' : 'SingletonMethod'); - static const SymbolInformation_Kind StaticDataMember = SymbolInformation_Kind._(77, _omitEnumNames ? '' : 'StaticDataMember'); - static const SymbolInformation_Kind StaticEvent = SymbolInformation_Kind._(78, _omitEnumNames ? '' : 'StaticEvent'); - static const SymbolInformation_Kind StaticField = SymbolInformation_Kind._(79, _omitEnumNames ? '' : 'StaticField'); - static const SymbolInformation_Kind StaticMethod = SymbolInformation_Kind._(80, _omitEnumNames ? '' : 'StaticMethod'); - static const SymbolInformation_Kind StaticProperty = SymbolInformation_Kind._(81, _omitEnumNames ? '' : 'StaticProperty'); - static const SymbolInformation_Kind StaticVariable = SymbolInformation_Kind._(82, _omitEnumNames ? '' : 'StaticVariable'); - static const SymbolInformation_Kind String = SymbolInformation_Kind._(48, _omitEnumNames ? '' : 'String'); - static const SymbolInformation_Kind Struct = SymbolInformation_Kind._(49, _omitEnumNames ? '' : 'Struct'); - static const SymbolInformation_Kind Subscript = SymbolInformation_Kind._(47, _omitEnumNames ? '' : 'Subscript'); - static const SymbolInformation_Kind Tactic = SymbolInformation_Kind._(50, _omitEnumNames ? '' : 'Tactic'); - static const SymbolInformation_Kind Theorem = SymbolInformation_Kind._(51, _omitEnumNames ? '' : 'Theorem'); - static const SymbolInformation_Kind ThisParameter = SymbolInformation_Kind._(52, _omitEnumNames ? '' : 'ThisParameter'); - static const SymbolInformation_Kind Trait = SymbolInformation_Kind._(53, _omitEnumNames ? '' : 'Trait'); - static const SymbolInformation_Kind TraitMethod = SymbolInformation_Kind._(70, _omitEnumNames ? '' : 'TraitMethod'); - static const SymbolInformation_Kind Type = SymbolInformation_Kind._(54, _omitEnumNames ? '' : 'Type'); - static const SymbolInformation_Kind TypeAlias = SymbolInformation_Kind._(55, _omitEnumNames ? '' : 'TypeAlias'); - static const SymbolInformation_Kind TypeClass = SymbolInformation_Kind._(56, _omitEnumNames ? '' : 'TypeClass'); - static const SymbolInformation_Kind TypeClassMethod = SymbolInformation_Kind._(71, _omitEnumNames ? '' : 'TypeClassMethod'); - static const SymbolInformation_Kind TypeFamily = SymbolInformation_Kind._(57, _omitEnumNames ? '' : 'TypeFamily'); - static const SymbolInformation_Kind TypeParameter = SymbolInformation_Kind._(58, _omitEnumNames ? '' : 'TypeParameter'); - static const SymbolInformation_Kind Union = SymbolInformation_Kind._(59, _omitEnumNames ? '' : 'Union'); - static const SymbolInformation_Kind Value = SymbolInformation_Kind._(60, _omitEnumNames ? '' : 'Value'); - static const SymbolInformation_Kind Variable = SymbolInformation_Kind._(61, _omitEnumNames ? '' : 'Variable'); - - static const $core.List values = [ + static const SymbolInformation_Kind UnspecifiedKind = + SymbolInformation_Kind._(0, _omitEnumNames ? '' : 'UnspecifiedKind'); + + /// A method which may or may not have a body. For Java, Kotlin etc. + static const SymbolInformation_Kind AbstractMethod = + SymbolInformation_Kind._(66, _omitEnumNames ? '' : 'AbstractMethod'); + + /// For Ruby's attr_accessor + static const SymbolInformation_Kind Accessor = + SymbolInformation_Kind._(72, _omitEnumNames ? '' : 'Accessor'); + static const SymbolInformation_Kind Array = + SymbolInformation_Kind._(1, _omitEnumNames ? '' : 'Array'); + + /// For Alloy + static const SymbolInformation_Kind Assertion = + SymbolInformation_Kind._(2, _omitEnumNames ? '' : 'Assertion'); + static const SymbolInformation_Kind AssociatedType = + SymbolInformation_Kind._(3, _omitEnumNames ? '' : 'AssociatedType'); + + /// For C++ + static const SymbolInformation_Kind Attribute = + SymbolInformation_Kind._(4, _omitEnumNames ? '' : 'Attribute'); + + /// For Lean + static const SymbolInformation_Kind Axiom = + SymbolInformation_Kind._(5, _omitEnumNames ? '' : 'Axiom'); + static const SymbolInformation_Kind Boolean = + SymbolInformation_Kind._(6, _omitEnumNames ? '' : 'Boolean'); + static const SymbolInformation_Kind Class = + SymbolInformation_Kind._(7, _omitEnumNames ? '' : 'Class'); + static const SymbolInformation_Kind Constant = + SymbolInformation_Kind._(8, _omitEnumNames ? '' : 'Constant'); + static const SymbolInformation_Kind Constructor = + SymbolInformation_Kind._(9, _omitEnumNames ? '' : 'Constructor'); + + /// For Solidity + static const SymbolInformation_Kind Contract = + SymbolInformation_Kind._(62, _omitEnumNames ? '' : 'Contract'); + + /// For Haskell + static const SymbolInformation_Kind DataFamily = + SymbolInformation_Kind._(10, _omitEnumNames ? '' : 'DataFamily'); + + /// For C# and F# + static const SymbolInformation_Kind Delegate = + SymbolInformation_Kind._(73, _omitEnumNames ? '' : 'Delegate'); + static const SymbolInformation_Kind Enum = + SymbolInformation_Kind._(11, _omitEnumNames ? '' : 'Enum'); + static const SymbolInformation_Kind EnumMember = + SymbolInformation_Kind._(12, _omitEnumNames ? '' : 'EnumMember'); + static const SymbolInformation_Kind Error = + SymbolInformation_Kind._(63, _omitEnumNames ? '' : 'Error'); + static const SymbolInformation_Kind Event = + SymbolInformation_Kind._(13, _omitEnumNames ? '' : 'Event'); + + /// For Dart + static const SymbolInformation_Kind Extension = + SymbolInformation_Kind._(84, _omitEnumNames ? '' : 'Extension'); + + /// For Alloy + static const SymbolInformation_Kind Fact = + SymbolInformation_Kind._(14, _omitEnumNames ? '' : 'Fact'); + static const SymbolInformation_Kind Field = + SymbolInformation_Kind._(15, _omitEnumNames ? '' : 'Field'); + static const SymbolInformation_Kind File = + SymbolInformation_Kind._(16, _omitEnumNames ? '' : 'File'); + static const SymbolInformation_Kind Function = + SymbolInformation_Kind._(17, _omitEnumNames ? '' : 'Function'); + + /// For 'get' in Swift, 'attr_reader' in Ruby + static const SymbolInformation_Kind Getter = + SymbolInformation_Kind._(18, _omitEnumNames ? '' : 'Getter'); + + /// For Raku + static const SymbolInformation_Kind Grammar = + SymbolInformation_Kind._(19, _omitEnumNames ? '' : 'Grammar'); + + /// For Purescript and Lean + static const SymbolInformation_Kind Instance = + SymbolInformation_Kind._(20, _omitEnumNames ? '' : 'Instance'); + static const SymbolInformation_Kind Interface = + SymbolInformation_Kind._(21, _omitEnumNames ? '' : 'Interface'); + static const SymbolInformation_Kind Key = + SymbolInformation_Kind._(22, _omitEnumNames ? '' : 'Key'); + + /// For Racket + static const SymbolInformation_Kind Lang = + SymbolInformation_Kind._(23, _omitEnumNames ? '' : 'Lang'); + + /// For Lean + static const SymbolInformation_Kind Lemma = + SymbolInformation_Kind._(24, _omitEnumNames ? '' : 'Lemma'); + + /// For solidity + static const SymbolInformation_Kind Library = + SymbolInformation_Kind._(64, _omitEnumNames ? '' : 'Library'); + static const SymbolInformation_Kind Macro = + SymbolInformation_Kind._(25, _omitEnumNames ? '' : 'Macro'); + static const SymbolInformation_Kind Method = + SymbolInformation_Kind._(26, _omitEnumNames ? '' : 'Method'); + + /// For Ruby + static const SymbolInformation_Kind MethodAlias = + SymbolInformation_Kind._(74, _omitEnumNames ? '' : 'MethodAlias'); + + /// Analogous to 'ThisParameter' and 'SelfParameter', but for languages + /// like Go where the receiver doesn't have a conventional name. + static const SymbolInformation_Kind MethodReceiver = + SymbolInformation_Kind._(27, _omitEnumNames ? '' : 'MethodReceiver'); + + /// Analogous to 'AbstractMethod', for Go. + static const SymbolInformation_Kind MethodSpecification = + SymbolInformation_Kind._(67, _omitEnumNames ? '' : 'MethodSpecification'); + + /// For Protobuf + static const SymbolInformation_Kind Message = + SymbolInformation_Kind._(28, _omitEnumNames ? '' : 'Message'); + + /// For Dart + static const SymbolInformation_Kind Mixin = + SymbolInformation_Kind._(85, _omitEnumNames ? '' : 'Mixin'); + + /// For Solidity + static const SymbolInformation_Kind Modifier = + SymbolInformation_Kind._(65, _omitEnumNames ? '' : 'Modifier'); + static const SymbolInformation_Kind Module = + SymbolInformation_Kind._(29, _omitEnumNames ? '' : 'Module'); + static const SymbolInformation_Kind Namespace = + SymbolInformation_Kind._(30, _omitEnumNames ? '' : 'Namespace'); + static const SymbolInformation_Kind Null = + SymbolInformation_Kind._(31, _omitEnumNames ? '' : 'Null'); + static const SymbolInformation_Kind Number = + SymbolInformation_Kind._(32, _omitEnumNames ? '' : 'Number'); + static const SymbolInformation_Kind Object_ = + SymbolInformation_Kind._(33, _omitEnumNames ? '' : 'Object'); + static const SymbolInformation_Kind Operator = + SymbolInformation_Kind._(34, _omitEnumNames ? '' : 'Operator'); + static const SymbolInformation_Kind Package = + SymbolInformation_Kind._(35, _omitEnumNames ? '' : 'Package'); + static const SymbolInformation_Kind PackageObject = + SymbolInformation_Kind._(36, _omitEnumNames ? '' : 'PackageObject'); + static const SymbolInformation_Kind Parameter = + SymbolInformation_Kind._(37, _omitEnumNames ? '' : 'Parameter'); + static const SymbolInformation_Kind ParameterLabel = + SymbolInformation_Kind._(38, _omitEnumNames ? '' : 'ParameterLabel'); + + /// For Haskell's PatternSynonyms + static const SymbolInformation_Kind Pattern = + SymbolInformation_Kind._(39, _omitEnumNames ? '' : 'Pattern'); + + /// For Alloy + static const SymbolInformation_Kind Predicate = + SymbolInformation_Kind._(40, _omitEnumNames ? '' : 'Predicate'); + static const SymbolInformation_Kind Property = + SymbolInformation_Kind._(41, _omitEnumNames ? '' : 'Property'); + + /// Analogous to 'Trait' and 'TypeClass', for Swift and Objective-C + static const SymbolInformation_Kind Protocol = + SymbolInformation_Kind._(42, _omitEnumNames ? '' : 'Protocol'); + + /// Analogous to 'AbstractMethod', for Swift and Objective-C. + static const SymbolInformation_Kind ProtocolMethod = + SymbolInformation_Kind._(68, _omitEnumNames ? '' : 'ProtocolMethod'); + + /// Analogous to 'AbstractMethod', for C++. + static const SymbolInformation_Kind PureVirtualMethod = + SymbolInformation_Kind._(69, _omitEnumNames ? '' : 'PureVirtualMethod'); + + /// For Haskell + static const SymbolInformation_Kind Quasiquoter = + SymbolInformation_Kind._(43, _omitEnumNames ? '' : 'Quasiquoter'); + + /// 'self' in Python, Rust, Swift etc. + static const SymbolInformation_Kind SelfParameter = + SymbolInformation_Kind._(44, _omitEnumNames ? '' : 'SelfParameter'); + + /// For 'set' in Swift, 'attr_writer' in Ruby + static const SymbolInformation_Kind Setter = + SymbolInformation_Kind._(45, _omitEnumNames ? '' : 'Setter'); + + /// For Alloy, analogous to 'Struct'. + static const SymbolInformation_Kind Signature = + SymbolInformation_Kind._(46, _omitEnumNames ? '' : 'Signature'); + + /// For Ruby + static const SymbolInformation_Kind SingletonClass = + SymbolInformation_Kind._(75, _omitEnumNames ? '' : 'SingletonClass'); + + /// Analogous to 'StaticMethod', for Ruby. + static const SymbolInformation_Kind SingletonMethod = + SymbolInformation_Kind._(76, _omitEnumNames ? '' : 'SingletonMethod'); + + /// Analogous to 'StaticField', for C++ + static const SymbolInformation_Kind StaticDataMember = + SymbolInformation_Kind._(77, _omitEnumNames ? '' : 'StaticDataMember'); + + /// For C# + static const SymbolInformation_Kind StaticEvent = + SymbolInformation_Kind._(78, _omitEnumNames ? '' : 'StaticEvent'); + + /// For C# + static const SymbolInformation_Kind StaticField = + SymbolInformation_Kind._(79, _omitEnumNames ? '' : 'StaticField'); + + /// For Java, C#, C++ etc. + static const SymbolInformation_Kind StaticMethod = + SymbolInformation_Kind._(80, _omitEnumNames ? '' : 'StaticMethod'); + + /// For C#, TypeScript etc. + static const SymbolInformation_Kind StaticProperty = + SymbolInformation_Kind._(81, _omitEnumNames ? '' : 'StaticProperty'); + + /// For C, C++ + static const SymbolInformation_Kind StaticVariable = + SymbolInformation_Kind._(82, _omitEnumNames ? '' : 'StaticVariable'); + static const SymbolInformation_Kind String = + SymbolInformation_Kind._(48, _omitEnumNames ? '' : 'String'); + static const SymbolInformation_Kind Struct = + SymbolInformation_Kind._(49, _omitEnumNames ? '' : 'Struct'); + + /// For Swift + static const SymbolInformation_Kind Subscript = + SymbolInformation_Kind._(47, _omitEnumNames ? '' : 'Subscript'); + + /// For Lean + static const SymbolInformation_Kind Tactic = + SymbolInformation_Kind._(50, _omitEnumNames ? '' : 'Tactic'); + + /// For Lean + static const SymbolInformation_Kind Theorem = + SymbolInformation_Kind._(51, _omitEnumNames ? '' : 'Theorem'); + + /// Method receiver for languages + /// 'this' in JavaScript, C++, Java etc. + static const SymbolInformation_Kind ThisParameter = + SymbolInformation_Kind._(52, _omitEnumNames ? '' : 'ThisParameter'); + + /// Analogous to 'Protocol' and 'TypeClass', for Rust, Scala etc. + static const SymbolInformation_Kind Trait = + SymbolInformation_Kind._(53, _omitEnumNames ? '' : 'Trait'); + + /// Analogous to 'AbstractMethod', for Rust, Scala etc. + static const SymbolInformation_Kind TraitMethod = + SymbolInformation_Kind._(70, _omitEnumNames ? '' : 'TraitMethod'); + + /// Data type definition for languages like OCaml which use `type` + /// rather than separate keywords like `struct` and `enum`. + static const SymbolInformation_Kind Type = + SymbolInformation_Kind._(54, _omitEnumNames ? '' : 'Type'); + static const SymbolInformation_Kind TypeAlias = + SymbolInformation_Kind._(55, _omitEnumNames ? '' : 'TypeAlias'); + + /// Analogous to 'Trait' and 'Protocol', for Haskell, Purescript etc. + static const SymbolInformation_Kind TypeClass = + SymbolInformation_Kind._(56, _omitEnumNames ? '' : 'TypeClass'); + + /// Analogous to 'AbstractMethod', for Haskell, Purescript etc. + static const SymbolInformation_Kind TypeClassMethod = + SymbolInformation_Kind._(71, _omitEnumNames ? '' : 'TypeClassMethod'); + + /// For Haskell + static const SymbolInformation_Kind TypeFamily = + SymbolInformation_Kind._(57, _omitEnumNames ? '' : 'TypeFamily'); + static const SymbolInformation_Kind TypeParameter = + SymbolInformation_Kind._(58, _omitEnumNames ? '' : 'TypeParameter'); + + /// For C, C++, Capn Proto + static const SymbolInformation_Kind Union = + SymbolInformation_Kind._(59, _omitEnumNames ? '' : 'Union'); + static const SymbolInformation_Kind Value = + SymbolInformation_Kind._(60, _omitEnumNames ? '' : 'Value'); + static const SymbolInformation_Kind Variable = + SymbolInformation_Kind._(61, _omitEnumNames ? '' : 'Variable'); + + static const $core.List values = + [ UnspecifiedKind, AbstractMethod, Accessor, @@ -680,11 +1116,13 @@ class SymbolInformation_Kind extends $pb.ProtobufEnum { Variable, ]; - static final $core.Map<$core.int, SymbolInformation_Kind> _byValue = $pb.ProtobufEnum.initByValue(values); - static SymbolInformation_Kind? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 85); + static SymbolInformation_Kind? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const SymbolInformation_Kind._($core.int v, $core.String n) : super(v, n); + const SymbolInformation_Kind._(super.value, super.name); } - -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/gen/scip.pbjson.dart b/lib/src/gen/scip.pbjson.dart index cafea3ab..22343878 100644 --- a/lib/src/gen/scip.pbjson.dart +++ b/lib/src/gen/scip.pbjson.dart @@ -1,13 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: lib/src/gen/scip.proto -// -// @dart = 2.12 +// Generated from lib/src/gen/scip.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; @@ -332,9 +334,30 @@ final $typed_data.Uint8List languageDescriptor = $convert.base64Decode( const Index$json = { '1': 'Index', '2': [ - {'1': 'metadata', '3': 1, '4': 1, '5': 11, '6': '.scip.Metadata', '10': 'metadata'}, - {'1': 'documents', '3': 2, '4': 3, '5': 11, '6': '.scip.Document', '10': 'documents'}, - {'1': 'external_symbols', '3': 3, '4': 3, '5': 11, '6': '.scip.SymbolInformation', '10': 'externalSymbols'}, + { + '1': 'metadata', + '3': 1, + '4': 1, + '5': 11, + '6': '.scip.Metadata', + '10': 'metadata' + }, + { + '1': 'documents', + '3': 2, + '4': 3, + '5': 11, + '6': '.scip.Document', + '10': 'documents' + }, + { + '1': 'external_symbols', + '3': 3, + '4': 3, + '5': 11, + '6': '.scip.SymbolInformation', + '10': 'externalSymbols' + }, ], }; @@ -348,10 +371,31 @@ final $typed_data.Uint8List indexDescriptor = $convert.base64Decode( const Metadata$json = { '1': 'Metadata', '2': [ - {'1': 'version', '3': 1, '4': 1, '5': 14, '6': '.scip.ProtocolVersion', '10': 'version'}, - {'1': 'tool_info', '3': 2, '4': 1, '5': 11, '6': '.scip.ToolInfo', '10': 'toolInfo'}, + { + '1': 'version', + '3': 1, + '4': 1, + '5': 14, + '6': '.scip.ProtocolVersion', + '10': 'version' + }, + { + '1': 'tool_info', + '3': 2, + '4': 1, + '5': 11, + '6': '.scip.ToolInfo', + '10': 'toolInfo' + }, {'1': 'project_root', '3': 3, '4': 1, '5': 9, '10': 'projectRoot'}, - {'1': 'text_document_encoding', '3': 4, '4': 1, '5': 14, '6': '.scip.TextEncoding', '10': 'textDocumentEncoding'}, + { + '1': 'text_document_encoding', + '3': 4, + '4': 1, + '5': 14, + '6': '.scip.TextEncoding', + '10': 'textDocumentEncoding' + }, ], }; @@ -383,10 +427,31 @@ const Document$json = { '2': [ {'1': 'language', '3': 4, '4': 1, '5': 9, '10': 'language'}, {'1': 'relative_path', '3': 1, '4': 1, '5': 9, '10': 'relativePath'}, - {'1': 'occurrences', '3': 2, '4': 3, '5': 11, '6': '.scip.Occurrence', '10': 'occurrences'}, - {'1': 'symbols', '3': 3, '4': 3, '5': 11, '6': '.scip.SymbolInformation', '10': 'symbols'}, + { + '1': 'occurrences', + '3': 2, + '4': 3, + '5': 11, + '6': '.scip.Occurrence', + '10': 'occurrences' + }, + { + '1': 'symbols', + '3': 3, + '4': 3, + '5': 11, + '6': '.scip.SymbolInformation', + '10': 'symbols' + }, {'1': 'text', '3': 5, '4': 1, '5': 9, '10': 'text'}, - {'1': 'position_encoding', '3': 6, '4': 1, '5': 14, '6': '.scip.PositionEncoding', '10': 'positionEncoding'}, + { + '1': 'position_encoding', + '3': 6, + '4': 1, + '5': 14, + '6': '.scip.PositionEncoding', + '10': 'positionEncoding' + }, ], }; @@ -403,8 +468,22 @@ const Symbol$json = { '1': 'Symbol', '2': [ {'1': 'scheme', '3': 1, '4': 1, '5': 9, '10': 'scheme'}, - {'1': 'package', '3': 2, '4': 1, '5': 11, '6': '.scip.Package', '10': 'package'}, - {'1': 'descriptors', '3': 3, '4': 3, '5': 11, '6': '.scip.Descriptor', '10': 'descriptors'}, + { + '1': 'package', + '3': 2, + '4': 1, + '5': 11, + '6': '.scip.Package', + '10': 'package' + }, + { + '1': 'descriptors', + '3': 3, + '4': 3, + '5': 11, + '6': '.scip.Descriptor', + '10': 'descriptors' + }, ], }; @@ -435,7 +514,14 @@ const Descriptor$json = { '2': [ {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, {'1': 'disambiguator', '3': 2, '4': 1, '5': 9, '10': 'disambiguator'}, - {'1': 'suffix', '3': 3, '4': 1, '5': 14, '6': '.scip.Descriptor.Suffix', '10': 'suffix'}, + { + '1': 'suffix', + '3': 3, + '4': 1, + '5': 14, + '6': '.scip.Descriptor.Suffix', + '10': 'suffix' + }, ], '4': [Descriptor_Suffix$json], }; @@ -478,10 +564,31 @@ const SymbolInformation$json = { '2': [ {'1': 'symbol', '3': 1, '4': 1, '5': 9, '10': 'symbol'}, {'1': 'documentation', '3': 3, '4': 3, '5': 9, '10': 'documentation'}, - {'1': 'relationships', '3': 4, '4': 3, '5': 11, '6': '.scip.Relationship', '10': 'relationships'}, - {'1': 'kind', '3': 5, '4': 1, '5': 14, '6': '.scip.SymbolInformation.Kind', '10': 'kind'}, + { + '1': 'relationships', + '3': 4, + '4': 3, + '5': 11, + '6': '.scip.Relationship', + '10': 'relationships' + }, + { + '1': 'kind', + '3': 5, + '4': 1, + '5': 14, + '6': '.scip.SymbolInformation.Kind', + '10': 'kind' + }, {'1': 'display_name', '3': 6, '4': 1, '5': 9, '10': 'displayName'}, - {'1': 'signature_documentation', '3': 7, '4': 1, '5': 11, '6': '.scip.Document', '10': 'signatureDocumentation'}, + { + '1': 'signature_documentation', + '3': 7, + '4': 1, + '5': 11, + '6': '.scip.Document', + '10': 'signatureDocumentation' + }, {'1': 'enclosing_symbol', '3': 8, '4': 1, '5': 9, '10': 'enclosingSymbol'}, ], '4': [SymbolInformation_Kind$json], @@ -617,8 +724,20 @@ const Relationship$json = { '2': [ {'1': 'symbol', '3': 1, '4': 1, '5': 9, '10': 'symbol'}, {'1': 'is_reference', '3': 2, '4': 1, '5': 8, '10': 'isReference'}, - {'1': 'is_implementation', '3': 3, '4': 1, '5': 8, '10': 'isImplementation'}, - {'1': 'is_type_definition', '3': 4, '4': 1, '5': 8, '10': 'isTypeDefinition'}, + { + '1': 'is_implementation', + '3': 3, + '4': 1, + '5': 8, + '10': 'isImplementation' + }, + { + '1': 'is_type_definition', + '3': 4, + '4': 1, + '5': 8, + '10': 'isTypeDefinition' + }, {'1': 'is_definition', '3': 5, '4': 1, '5': 8, '10': 'isDefinition'}, ], }; @@ -637,9 +756,29 @@ const Occurrence$json = { {'1': 'range', '3': 1, '4': 3, '5': 5, '10': 'range'}, {'1': 'symbol', '3': 2, '4': 1, '5': 9, '10': 'symbol'}, {'1': 'symbol_roles', '3': 3, '4': 1, '5': 5, '10': 'symbolRoles'}, - {'1': 'override_documentation', '3': 4, '4': 3, '5': 9, '10': 'overrideDocumentation'}, - {'1': 'syntax_kind', '3': 5, '4': 1, '5': 14, '6': '.scip.SyntaxKind', '10': 'syntaxKind'}, - {'1': 'diagnostics', '3': 6, '4': 3, '5': 11, '6': '.scip.Diagnostic', '10': 'diagnostics'}, + { + '1': 'override_documentation', + '3': 4, + '4': 3, + '5': 9, + '10': 'overrideDocumentation' + }, + { + '1': 'syntax_kind', + '3': 5, + '4': 1, + '5': 14, + '6': '.scip.SyntaxKind', + '10': 'syntaxKind' + }, + { + '1': 'diagnostics', + '3': 6, + '4': 3, + '5': 11, + '6': '.scip.Diagnostic', + '10': 'diagnostics' + }, {'1': 'enclosing_range', '3': 7, '4': 3, '5': 5, '10': 'enclosingRange'}, ], }; @@ -657,11 +796,25 @@ final $typed_data.Uint8List occurrenceDescriptor = $convert.base64Decode( const Diagnostic$json = { '1': 'Diagnostic', '2': [ - {'1': 'severity', '3': 1, '4': 1, '5': 14, '6': '.scip.Severity', '10': 'severity'}, + { + '1': 'severity', + '3': 1, + '4': 1, + '5': 14, + '6': '.scip.Severity', + '10': 'severity' + }, {'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, {'1': 'message', '3': 3, '4': 1, '5': 9, '10': 'message'}, {'1': 'source', '3': 4, '4': 1, '5': 9, '10': 'source'}, - {'1': 'tags', '3': 5, '4': 3, '5': 14, '6': '.scip.DiagnosticTag', '10': 'tags'}, + { + '1': 'tags', + '3': 5, + '4': 3, + '5': 14, + '6': '.scip.DiagnosticTag', + '10': 'tags' + }, ], }; @@ -671,4 +824,3 @@ final $typed_data.Uint8List diagnosticDescriptor = $convert.base64Decode( 'kSEgoEY29kZRgCIAEoCVIEY29kZRIYCgdtZXNzYWdlGAMgASgJUgdtZXNzYWdlEhYKBnNvdXJj' 'ZRgEIAEoCVIGc291cmNlEicKBHRhZ3MYBSADKA4yEy5zY2lwLkRpYWdub3N0aWNUYWdSBHRhZ3' 'M='); - diff --git a/pubspec.lock b/pubspec.lock index 2f7af28d..0381c354 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -165,10 +165,10 @@ packages: dependency: "direct main" description: name: protobuf - sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + sha256: "13b6717366aa7ec3792dd62c19c7d33a785708224365f2db23c5ca01f1c1a0f2" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "6.1.0" pub_semver: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 51528c1f..5b977630 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: scip_dart -version: 1.7.0 +version: 1.8.0 description: generates scip bindings for dart files repository: https://github.com/Workiva/scip-dart @@ -14,7 +14,7 @@ dependencies: args: ^2.4.0 package_config: ^3.0.0 path: ^1.8.3 - protobuf: ^3.1.0 + protobuf: ^6.0.0 pubspec_parse: ^1.2.1 pubspec_lock_parse: ^2.2.0 collection: ^1.18.0