diff --git a/lib/src/gen/scip.pb.dart b/lib/src/gen/scip.pb.dart index d4da93b6..4189049f 100644 --- a/lib/src/gen/scip.pb.dart +++ b/lib/src/gen/scip.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: lib/src/gen/scip.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -13,34 +17,41 @@ import 'scip.pbenum.dart'; export 'scip.pbenum.dart'; +/// Index represents a complete SCIP index for a workspace this is rooted at a +/// single directory. An Index message payload can have a large memory footprint +/// and it's therefore recommended to emit and consume an Index payload one field +/// value at a time. To permit streaming consumption of an Index payload, the +/// `metadata` field must appear at the start of the stream and must only appear +/// once in the stream. Other field values may appear in any order. class Index extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Index', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata', subBuilder: Metadata.create) - ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'documents', $pb.PbFieldType.PM, subBuilder: Document.create) - ..pc(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'externalSymbols', $pb.PbFieldType.PM, subBuilder: SymbolInformation.create) - ..hasRequiredFields = false - ; - - Index._() : super(); factory Index({ Metadata? metadata, $core.Iterable? documents, $core.Iterable? externalSymbols, }) { - final _result = create(); + final $result = create(); if (metadata != null) { - _result.metadata = metadata; + $result.metadata = metadata; } if (documents != null) { - _result.documents.addAll(documents); + $result.documents.addAll(documents); } if (externalSymbols != null) { - _result.externalSymbols.addAll(externalSymbols); + $result.externalSymbols.addAll(externalSymbols); } - return _result; + 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. ' @@ -50,8 +61,10 @@ class Index extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Index copyWith(void Function(Index) updates) => super.copyWith((message) => updates(message as Index)) as Index; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Index create() => Index._(); Index createEmptyInstance() => create(); @@ -60,6 +73,7 @@ class Index extends $pb.GeneratedMessage { static Index getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Index? _defaultInstance; + /// Metadata about this index. @$pb.TagNumber(1) Metadata get metadata => $_getN(0); @$pb.TagNumber(1) @@ -71,46 +85,53 @@ class Index extends $pb.GeneratedMessage { @$pb.TagNumber(1) Metadata ensureMetadata() => $_ensure(0); + /// Documents that belong to this index. @$pb.TagNumber(2) $core.List 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 + /// if you assume the external package will get indexed separately. If the + /// 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); } class Metadata extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Metadata', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', $pb.PbFieldType.OE, defaultOrMaker: ProtocolVersion.UnspecifiedProtocolVersion, valueOf: ProtocolVersion.valueOf, enumValues: ProtocolVersion.values) - ..aOM(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'toolInfo', subBuilder: ToolInfo.create) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'projectRoot') - ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'textDocumentEncoding', $pb.PbFieldType.OE, defaultOrMaker: TextEncoding.UnspecifiedTextEncoding, valueOf: TextEncoding.valueOf, enumValues: TextEncoding.values) - ..hasRequiredFields = false - ; - - Metadata._() : super(); factory Metadata({ ProtocolVersion? version, ToolInfo? toolInfo, $core.String? projectRoot, TextEncoding? textDocumentEncoding, }) { - final _result = create(); + final $result = create(); if (version != null) { - _result.version = version; + $result.version = version; } if (toolInfo != null) { - _result.toolInfo = toolInfo; + $result.toolInfo = toolInfo; } if (projectRoot != null) { - _result.projectRoot = projectRoot; + $result.projectRoot = projectRoot; } if (textDocumentEncoding != null) { - _result.textDocumentEncoding = textDocumentEncoding; + $result.textDocumentEncoding = textDocumentEncoding; } - return _result; + 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) + ..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. ' @@ -120,8 +141,10 @@ class Metadata extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Metadata copyWith(void Function(Metadata) updates) => super.copyWith((message) => updates(message as Metadata)) as Metadata; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Metadata create() => Metadata._(); Metadata createEmptyInstance() => create(); @@ -130,6 +153,7 @@ class Metadata extends $pb.GeneratedMessage { static Metadata getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 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) @@ -139,6 +163,7 @@ class Metadata extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearVersion() => clearField(1); + /// Information about the tool that produced this index. @$pb.TagNumber(2) ToolInfo get toolInfo => $_getN(1); @$pb.TagNumber(2) @@ -150,6 +175,9 @@ class Metadata extends $pb.GeneratedMessage { @$pb.TagNumber(2) ToolInfo ensureToolInfo() => $_ensure(1); + /// URI-encoded absolute path to the root directory of this index. All + /// documents in this index must appear in a subdirectory of this root + /// directory. @$pb.TagNumber(3) $core.String get projectRoot => $_getSZ(2); @$pb.TagNumber(3) @@ -159,6 +187,9 @@ class Metadata extends $pb.GeneratedMessage { @$pb.TagNumber(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` + /// field, which is a Protobuf string and hence must be UTF-8 encoded. @$pb.TagNumber(4) TextEncoding get textDocumentEncoding => $_getN(3); @$pb.TagNumber(4) @@ -170,33 +201,34 @@ class Metadata extends $pb.GeneratedMessage { } class ToolInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ToolInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') - ..pPS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'arguments') - ..hasRequiredFields = false - ; - - ToolInfo._() : super(); factory ToolInfo({ $core.String? name, $core.String? version, $core.Iterable<$core.String>? arguments, }) { - final _result = create(); + final $result = create(); if (name != null) { - _result.name = name; + $result.name = name; } if (version != null) { - _result.version = version; + $result.version = version; } if (arguments != null) { - _result.arguments.addAll(arguments); + $result.arguments.addAll(arguments); } - return _result; + 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) + ..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. ' @@ -206,8 +238,10 @@ class ToolInfo extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + ToolInfo copyWith(void Function(ToolInfo) updates) => super.copyWith((message) => updates(message as ToolInfo)) as ToolInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ToolInfo create() => ToolInfo._(); ToolInfo createEmptyInstance() => create(); @@ -216,6 +250,7 @@ class ToolInfo extends $pb.GeneratedMessage { static ToolInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ToolInfo? _defaultInstance; + /// Name of the indexer that produced this index. @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) @@ -225,6 +260,7 @@ class ToolInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -234,43 +270,56 @@ class ToolInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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); } +/// Document defines the metadata about a source file on disk. class Document extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Document', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'relativePath') - ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'occurrences', $pb.PbFieldType.PM, subBuilder: Occurrence.create) - ..pc(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'symbols', $pb.PbFieldType.PM, subBuilder: SymbolInformation.create) - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'language') - ..hasRequiredFields = false - ; - - Document._() : super(); factory Document({ $core.String? relativePath, $core.Iterable? occurrences, $core.Iterable? symbols, $core.String? language, + $core.String? text, + PositionEncoding? positionEncoding, }) { - final _result = create(); + final $result = create(); if (relativePath != null) { - _result.relativePath = relativePath; + $result.relativePath = relativePath; } if (occurrences != null) { - _result.occurrences.addAll(occurrences); + $result.occurrences.addAll(occurrences); } if (symbols != null) { - _result.symbols.addAll(symbols); + $result.symbols.addAll(symbols); } if (language != null) { - _result.language = language; + $result.language = language; + } + if (text != null) { + $result.text = text; + } + if (positionEncoding != null) { + $result.positionEncoding = positionEncoding; } - return _result; + 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) + ..aOS(1, _omitFieldNames ? '' : 'relativePath') + ..pc(2, _omitFieldNames ? '' : 'occurrences', $pb.PbFieldType.PM, subBuilder: Occurrence.create) + ..pc(3, _omitFieldNames ? '' : 'symbols', $pb.PbFieldType.PM, subBuilder: SymbolInformation.create) + ..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. ' @@ -280,8 +329,10 @@ class Document extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Document copyWith(void Function(Document) updates) => super.copyWith((message) => updates(message as Document)) as Document; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Document create() => Document._(); Document createEmptyInstance() => create(); @@ -290,6 +341,15 @@ class Document extends $pb.GeneratedMessage { static Document getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Document? _defaultInstance; + /// (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 '..'. @$pb.TagNumber(1) $core.String get relativePath => $_getSZ(0); @$pb.TagNumber(1) @@ -299,12 +359,22 @@ class Document extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearRelativePath() => clearField(1); + /// Occurrences that appear in this file. @$pb.TagNumber(2) $core.List get occurrences => $_getList(1); + /// 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). @$pb.TagNumber(3) $core.List 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. + /// This field is typed as a string to permit any programming language, including + /// ones that are not specified by the `Language` enum. @$pb.TagNumber(4) $core.String get language => $_getSZ(3); @$pb.TagNumber(4) @@ -313,36 +383,113 @@ class Document extends $pb.GeneratedMessage { $core.bool hasLanguage() => $_has(3); @$pb.TagNumber(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 + /// contents from the file system by resolving the absolute path from joining + /// `Index.metadata.project_root` and `Document.relative_path`. This field was + /// introduced to support `SymbolInformation.signature_documentation`, but it + /// can be used for other purposes as well, for example testing or when working + /// with virtual/in-memory documents. + @$pb.TagNumber(5) + $core.String get text => $_getSZ(4); + @$pb.TagNumber(5) + set text($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasText() => $_has(4); + @$pb.TagNumber(5) + void clearText() => clearField(5); + + /// 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. + @$pb.TagNumber(6) + PositionEncoding get positionEncoding => $_getN(5); + @$pb.TagNumber(6) + set positionEncoding(PositionEncoding v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasPositionEncoding() => $_has(5); + @$pb.TagNumber(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 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 +/// ::= ' ' ' ' ()+ | 'local ' +/// ::= ' ' ' ' +/// ::= any UTF-8, escape spaces with double space. +/// ::= same as above, use the placeholder '.' to indicate an empty value +/// ::= same as above +/// ::= same as above +/// ::= | | | | | | | +/// ::= '/' +/// ::= '#' +/// ::= '.' +/// ::= ':' +/// ::= '!' +/// ::= '(' ').' +/// ::= '[' ']' +/// ::= '(' ')' +/// ::= +/// ::= +/// ::= | +/// ::= ()+ +/// ::= '_' | '+' | '-' | '$' | ASCII letter or digit +/// ::= '`' ()+ '`' +/// ::= any UTF-8 character, 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. +/// +/// 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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Symbol', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'scheme') - ..aOM(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'package', subBuilder: Package.create) - ..pc(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'descriptors', $pb.PbFieldType.PM, subBuilder: Descriptor.create) - ..hasRequiredFields = false - ; - - Symbol._() : super(); factory Symbol({ $core.String? scheme, Package? package, $core.Iterable? descriptors, }) { - final _result = create(); + final $result = create(); if (scheme != null) { - _result.scheme = scheme; + $result.scheme = scheme; } if (package != null) { - _result.package = package; + $result.package = package; } if (descriptors != null) { - _result.descriptors.addAll(descriptors); + $result.descriptors.addAll(descriptors); } - return _result; + 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. ' @@ -352,8 +499,10 @@ class Symbol extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Symbol copyWith(void Function(Symbol) updates) => super.copyWith((message) => updates(message as Symbol)) as Symbol; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Symbol create() => Symbol._(); Symbol createEmptyInstance() => create(); @@ -386,34 +535,38 @@ class Symbol extends $pb.GeneratedMessage { $core.List get descriptors => $_getList(2); } +/// Unit of packaging and distribution. +/// +/// NOTE: This corresponds to a module in Go and JVM languages. class Package extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Package', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'manager') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') - ..hasRequiredFields = false - ; - - Package._() : super(); factory Package({ $core.String? manager, $core.String? name, $core.String? version, }) { - final _result = create(); + final $result = create(); if (manager != null) { - _result.manager = manager; + $result.manager = manager; } if (name != null) { - _result.name = name; + $result.name = name; } if (version != null) { - _result.version = version; + $result.version = version; } - return _result; + 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) + ..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. ' @@ -423,8 +576,10 @@ class Package extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Package copyWith(void Function(Package) updates) => super.copyWith((message) => updates(message as Package)) as Package; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Package create() => Package._(); Package createEmptyInstance() => create(); @@ -462,33 +617,34 @@ class Package extends $pb.GeneratedMessage { } class Descriptor extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Descriptor', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'disambiguator') - ..e(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'suffix', $pb.PbFieldType.OE, defaultOrMaker: Descriptor_Suffix.UnspecifiedSuffix, valueOf: Descriptor_Suffix.valueOf, enumValues: Descriptor_Suffix.values) - ..hasRequiredFields = false - ; - - Descriptor._() : super(); factory Descriptor({ $core.String? name, $core.String? disambiguator, Descriptor_Suffix? suffix, }) { - final _result = create(); + final $result = create(); if (name != null) { - _result.name = name; + $result.name = name; } if (disambiguator != null) { - _result.disambiguator = disambiguator; + $result.disambiguator = disambiguator; } if (suffix != null) { - _result.suffix = suffix; + $result.suffix = suffix; } - return _result; + 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) + ..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. ' @@ -498,8 +654,10 @@ class Descriptor extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Descriptor copyWith(void Function(Descriptor) updates) => super.copyWith((message) => updates(message as Descriptor)) as Descriptor; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Descriptor create() => Descriptor._(); Descriptor createEmptyInstance() => create(); @@ -536,34 +694,57 @@ class Descriptor extends $pb.GeneratedMessage { void clearSuffix() => clearField(3); } +/// SymbolInformation defines metadata about a symbol, such as the symbol's +/// docstring or what package it's defined it. class SymbolInformation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SymbolInformation', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'symbol') - ..pPS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'documentation') - ..pc(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'relationships', $pb.PbFieldType.PM, subBuilder: Relationship.create) - ..hasRequiredFields = false - ; - - SymbolInformation._() : super(); factory SymbolInformation({ $core.String? symbol, $core.Iterable<$core.String>? documentation, $core.Iterable? relationships, + SymbolInformation_Kind? kind, + $core.String? displayName, + Document? signatureDocumentation, + $core.String? enclosingSymbol, }) { - final _result = create(); + final $result = create(); if (symbol != null) { - _result.symbol = symbol; + $result.symbol = symbol; } if (documentation != null) { - _result.documentation.addAll(documentation); + $result.documentation.addAll(documentation); } if (relationships != null) { - _result.relationships.addAll(relationships); + $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; + 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) + ..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) + ..aOS(6, _omitFieldNames ? '' : 'displayName') + ..aOM(7, _omitFieldNames ? '' : 'signatureDocumentation', subBuilder: Document.create) + ..aOS(8, _omitFieldNames ? '' : 'enclosingSymbol') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -573,8 +754,10 @@ class SymbolInformation extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + SymbolInformation copyWith(void Function(SymbolInformation) updates) => super.copyWith((message) => updates(message as SymbolInformation)) as SymbolInformation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static SymbolInformation create() => SymbolInformation._(); SymbolInformation createEmptyInstance() => create(); @@ -583,6 +766,8 @@ class SymbolInformation extends $pb.GeneratedMessage { static SymbolInformation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static SymbolInformation? _defaultInstance; + /// Identifier of this symbol, which can be referenced from `Occurence.symbol`. + /// The string must be formatted according to the grammar in `Symbol`. @$pb.TagNumber(1) $core.String get symbol => $_getSZ(0); @$pb.TagNumber(1) @@ -592,24 +777,94 @@ class SymbolInformation extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearSymbol() => clearField(1); + /// (optional, but strongly recommended) The markdown-formatted documentation + /// for this symbol. Use `SymbolInformation.signature_documentation` to + /// document the method/class/type signature of this symbol. + /// Due to historical reasons, indexers may include signature documentation in + /// 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); + /// (optional) Relationships to other symbols (e.g., implements, type definition). @$pb.TagNumber(4) $core.List get relationships => $_getList(2); + + /// The kind of this symbol. Use this field instead of + /// `SymbolDescriptor.Suffix` to determine whether something is, for example, a + /// class or a method. + @$pb.TagNumber(5) + SymbolInformation_Kind get kind => $_getN(3); + @$pb.TagNumber(5) + set kind(SymbolInformation_Kind v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasKind() => $_has(3); + @$pb.TagNumber(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: + /// + /// - 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); } + @$pb.TagNumber(6) + $core.bool hasDisplayName() => $_has(4); + @$pb.TagNumber(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 + /// two numbers this would have `Document.language = "java"` and `Document.text + /// = "void add(int a, int b)". The `language` and `text` fields are required + /// while other fields such as `Documentation.occurrences` can be optionally + /// included to support hyperlinking referenced symbols in the signature. + @$pb.TagNumber(7) + Document get signatureDocumentation => $_getN(5); + @$pb.TagNumber(7) + set signatureDocumentation(Document v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasSignatureDocumentation() => $_has(5); + @$pb.TagNumber(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. + /// + /// 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); } + @$pb.TagNumber(8) + $core.bool hasEnclosingSymbol() => $_has(6); + @$pb.TagNumber(8) + void clearEnclosingSymbol() => clearField(8); } class Relationship extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Relationship', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'symbol') - ..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isReference') - ..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isImplementation') - ..aOB(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isTypeDefinition') - ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isDefinition') - ..hasRequiredFields = false - ; - - Relationship._() : super(); factory Relationship({ $core.String? symbol, $core.bool? isReference, @@ -617,26 +872,37 @@ class Relationship extends $pb.GeneratedMessage { $core.bool? isTypeDefinition, $core.bool? isDefinition, }) { - final _result = create(); + final $result = create(); if (symbol != null) { - _result.symbol = symbol; + $result.symbol = symbol; } if (isReference != null) { - _result.isReference = isReference; + $result.isReference = isReference; } if (isImplementation != null) { - _result.isImplementation = isImplementation; + $result.isImplementation = isImplementation; } if (isTypeDefinition != null) { - _result.isTypeDefinition = isTypeDefinition; + $result.isTypeDefinition = isTypeDefinition; } if (isDefinition != null) { - _result.isDefinition = isDefinition; + $result.isDefinition = isDefinition; } - return _result; + 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) + ..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. ' @@ -646,8 +912,10 @@ class Relationship extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Relationship copyWith(void Function(Relationship) updates) => super.copyWith((message) => updates(message as Relationship)) as Relationship; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Relationship create() => Relationship._(); Relationship createEmptyInstance() => create(); @@ -665,6 +933,30 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// following TypeScript code that defines two symbols `Animal#sound()` and + /// `Dog#sound()`: + /// ```ts + /// interface Animal { + /// ^^^^^^ definition Animal# + /// sound(): string + /// ^^^^^ definition Animal#sound() + /// } + /// class Dog implements Animal { + /// ^^^ definition Dog#, relationships = [{symbol: "Animal#", is_implementation: true}] + /// public sound(): string { return "woof" } + /// ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), relationships = [{symbol: "Animal#sound()", is_implementation:true, is_reference: true}] + /// } + /// const animal: Animal = new Dog() + /// ^^^^^^ reference Animal# + /// console.log(animal.sound()) + /// ^^^^^ reference Animal#sound() + /// ``` + /// Doing "Find references" on the symbol `Animal#sound()` should return + /// references to the `Dog#sound()` method as well. Vice-versa, doing "Find + /// references" on the `Dog#sound()` method should include references to the + /// `Animal#sound()` method as well. @$pb.TagNumber(2) $core.bool get isReference => $_getBF(1); @$pb.TagNumber(2) @@ -674,6 +966,14 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// it's not always the case. + /// In the TypeScript example above, observe that `Dog#` has an + /// `is_implementation` relationship with `"Animal#"` but not `is_reference`. + /// This is because "Find references" on the "Animal#" symbol should not return + /// "Dog#". We only want "Dog#" to return as a result for "Find + /// implementations" on the "Animal#" symbol. @$pb.TagNumber(3) $core.bool get isImplementation => $_getBF(2); @$pb.TagNumber(3) @@ -683,6 +983,7 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -692,6 +993,22 @@ class Relationship extends $pb.GeneratedMessage { @$pb.TagNumber(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. + /// + /// 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. + /// + /// 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) @@ -702,18 +1019,12 @@ class Relationship extends $pb.GeneratedMessage { void clearIsDefinition() => clearField(5); } +/// 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. class Occurrence extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Occurrence', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..p<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'range', $pb.PbFieldType.K3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'symbol') - ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'symbolRoles', $pb.PbFieldType.O3) - ..pPS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'overrideDocumentation') - ..e(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'syntaxKind', $pb.PbFieldType.OE, defaultOrMaker: SyntaxKind.UnspecifiedSyntaxKind, valueOf: SyntaxKind.valueOf, enumValues: SyntaxKind.values) - ..pc(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'diagnostics', $pb.PbFieldType.PM, subBuilder: Diagnostic.create) - ..hasRequiredFields = false - ; - - Occurrence._() : super(); factory Occurrence({ $core.Iterable<$core.int>? range, $core.String? symbol, @@ -721,30 +1032,47 @@ class Occurrence extends $pb.GeneratedMessage { $core.Iterable<$core.String>? overrideDocumentation, SyntaxKind? syntaxKind, $core.Iterable? diagnostics, + $core.Iterable<$core.int>? enclosingRange, }) { - final _result = create(); + final $result = create(); if (range != null) { - _result.range.addAll(range); + $result.range.addAll(range); } if (symbol != null) { - _result.symbol = symbol; + $result.symbol = symbol; } if (symbolRoles != null) { - _result.symbolRoles = symbolRoles; + $result.symbolRoles = symbolRoles; } if (overrideDocumentation != null) { - _result.overrideDocumentation.addAll(overrideDocumentation); + $result.overrideDocumentation.addAll(overrideDocumentation); } if (syntaxKind != null) { - _result.syntaxKind = syntaxKind; + $result.syntaxKind = syntaxKind; } if (diagnostics != null) { - _result.diagnostics.addAll(diagnostics); + $result.diagnostics.addAll(diagnostics); } - return _result; + 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) + ..p<$core.int>(1, _omitFieldNames ? '' : 'range', $pb.PbFieldType.K3) + ..aOS(2, _omitFieldNames ? '' : 'symbol') + ..a<$core.int>(3, _omitFieldNames ? '' : 'symbolRoles', $pb.PbFieldType.O3) + ..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. ' @@ -754,8 +1082,10 @@ class Occurrence extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Occurrence copyWith(void Function(Occurrence) updates) => super.copyWith((message) => updates(message as Occurrence)) as Occurrence; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Occurrence create() => Occurrence._(); Occurrence createEmptyInstance() => create(); @@ -764,9 +1094,32 @@ class Occurrence extends $pb.GeneratedMessage { static Occurrence getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Occurrence? _defaultInstance; + /// Source position 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. + /// + /// 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. + /// + /// 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); + /// (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) @@ -776,6 +1129,8 @@ class Occurrence extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -785,9 +1140,18 @@ class Occurrence extends $pb.GeneratedMessage { @$pb.TagNumber(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`). + /// + /// 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); + /// (optional) What syntax highlighting class should be used for this range? @$pb.TagNumber(5) SyntaxKind get syntaxKind => $_getN(4); @$pb.TagNumber(5) @@ -797,21 +1161,69 @@ class Occurrence extends $pb.GeneratedMessage { @$pb.TagNumber(5) void clearSyntaxKind() => clearField(5); + /// (optional) Diagnostics that have been reported for this specific range. @$pb.TagNumber(6) $core.List get diagnostics => $_getList(5); + + /// (optional) Using the same encoding as the sibling `range` field, source + /// position 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 + /// + /// 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 <---------------------------------------| + /// ``` + /// + /// 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-----------------------| + /// + /// ``` + /// + /// 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); } +/// Represents a diagnostic, such as a compiler error or warning, which should be +/// reported for a document. class Diagnostic extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Diagnostic', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'scip'), createEmptyInstance: create) - ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'severity', $pb.PbFieldType.OE, defaultOrMaker: Severity.UnspecifiedSeverity, valueOf: Severity.valueOf, enumValues: Severity.values) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'source') - ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'tags', $pb.PbFieldType.KE, valueOf: DiagnosticTag.valueOf, enumValues: DiagnosticTag.values, defaultEnumValue: DiagnosticTag.UnspecifiedDiagnosticTag) - ..hasRequiredFields = false - ; - - Diagnostic._() : super(); factory Diagnostic({ Severity? severity, $core.String? code, @@ -819,26 +1231,37 @@ class Diagnostic extends $pb.GeneratedMessage { $core.String? source, $core.Iterable? tags, }) { - final _result = create(); + final $result = create(); if (severity != null) { - _result.severity = severity; + $result.severity = severity; } if (code != null) { - _result.code = code; + $result.code = code; } if (message != null) { - _result.message = message; + $result.message = message; } if (source != null) { - _result.source = source; + $result.source = source; } if (tags != null) { - _result.tags.addAll(tags); + $result.tags.addAll(tags); } - return _result; + 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) + ..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. ' @@ -848,8 +1271,10 @@ class Diagnostic extends $pb.GeneratedMessage { '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; // ignore: deprecated_member_use + Diagnostic copyWith(void Function(Diagnostic) updates) => super.copyWith((message) => updates(message as Diagnostic)) as Diagnostic; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Diagnostic create() => Diagnostic._(); Diagnostic createEmptyInstance() => create(); @@ -858,6 +1283,7 @@ class Diagnostic extends $pb.GeneratedMessage { static Diagnostic getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 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) @@ -867,6 +1293,7 @@ class Diagnostic extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -876,6 +1303,7 @@ class Diagnostic extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearCode() => clearField(2); + /// Message of this diagnostic. @$pb.TagNumber(3) $core.String get message => $_getSZ(2); @$pb.TagNumber(3) @@ -885,6 +1313,8 @@ class Diagnostic extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -898,3 +1328,6 @@ class Diagnostic extends $pb.GeneratedMessage { $core.List get tags => $_getList(4); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 10f90352..be9cd1fe 100644 --- a/lib/src/gen/scip.pbenum.dart +++ b/lib/src/gen/scip.pbenum.dart @@ -1,16 +1,20 @@ -/// +// // Generated code. Do not modify. // source: lib/src/gen/scip.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + import 'package:protobuf/protobuf.dart' as $pb; class ProtocolVersion extends $pb.ProtobufEnum { - static const ProtocolVersion UnspecifiedProtocolVersion = ProtocolVersion._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedProtocolVersion'); + static const ProtocolVersion UnspecifiedProtocolVersion = ProtocolVersion._(0, _omitEnumNames ? '' : 'UnspecifiedProtocolVersion'); static const $core.List values = [ UnspecifiedProtocolVersion, @@ -23,9 +27,9 @@ class ProtocolVersion extends $pb.ProtobufEnum { } class TextEncoding extends $pb.ProtobufEnum { - static const TextEncoding UnspecifiedTextEncoding = TextEncoding._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedTextEncoding'); - static const TextEncoding UTF8 = TextEncoding._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UTF8'); - static const TextEncoding UTF16 = TextEncoding._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : '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 = [ UnspecifiedTextEncoding, @@ -39,14 +43,40 @@ class TextEncoding extends $pb.ProtobufEnum { const TextEncoding._($core.int v, $core.String n) : super(v, n); } +/// 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'); + + 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]; + + const PositionEncoding._($core.int v, $core.String n) : super(v, n); +} + +/// SymbolRole declares what "role" a symbol has in an occurrence. A role is +/// encoded as a bitset where each bit represents a different role. For example, +/// to determine if the `Import` role is set, test whether the second bit of the +/// 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, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedSymbolRole'); - static const SymbolRole Definition = SymbolRole._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Definition'); - static const SymbolRole Import = SymbolRole._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Import'); - static const SymbolRole WriteAccess = SymbolRole._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WriteAccess'); - static const SymbolRole ReadAccess = SymbolRole._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadAccess'); - static const SymbolRole Generated = SymbolRole._(16, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Generated'); - static const SymbolRole Test = SymbolRole._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Test'); + 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'); + static const SymbolRole Test = SymbolRole._(32, _omitEnumNames ? '' : 'Test'); + static const SymbolRole ForwardDefinition = SymbolRole._(64, _omitEnumNames ? '' : 'ForwardDefinition'); static const $core.List values = [ UnspecifiedSymbolRole, @@ -56,6 +86,7 @@ class SymbolRole extends $pb.ProtobufEnum { ReadAccess, Generated, Test, + ForwardDefinition, ]; static final $core.Map<$core.int, SymbolRole> _byValue = $pb.ProtobufEnum.initByValue(values); @@ -65,43 +96,43 @@ class SymbolRole extends $pb.ProtobufEnum { } class SyntaxKind extends $pb.ProtobufEnum { - static const SyntaxKind UnspecifiedSyntaxKind = SyntaxKind._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedSyntaxKind'); - static const SyntaxKind Comment = SyntaxKind._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Comment'); - static const SyntaxKind PunctuationDelimiter = SyntaxKind._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PunctuationDelimiter'); - static const SyntaxKind PunctuationBracket = SyntaxKind._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PunctuationBracket'); - static const SyntaxKind Keyword = SyntaxKind._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Keyword'); - static const SyntaxKind IdentifierOperator = SyntaxKind._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierOperator'); - static const SyntaxKind Identifier = SyntaxKind._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Identifier'); - static const SyntaxKind IdentifierBuiltin = SyntaxKind._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierBuiltin'); - static const SyntaxKind IdentifierNull = SyntaxKind._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierNull'); - static const SyntaxKind IdentifierConstant = SyntaxKind._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierConstant'); - static const SyntaxKind IdentifierMutableGlobal = SyntaxKind._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierMutableGlobal'); - static const SyntaxKind IdentifierParameter = SyntaxKind._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierParameter'); - static const SyntaxKind IdentifierLocal = SyntaxKind._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierLocal'); - static const SyntaxKind IdentifierShadowed = SyntaxKind._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierShadowed'); - static const SyntaxKind IdentifierNamespace = SyntaxKind._(14, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierNamespace'); - static const SyntaxKind IdentifierFunction = SyntaxKind._(15, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierFunction'); - static const SyntaxKind IdentifierFunctionDefinition = SyntaxKind._(16, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierFunctionDefinition'); - static const SyntaxKind IdentifierMacro = SyntaxKind._(17, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierMacro'); - static const SyntaxKind IdentifierMacroDefinition = SyntaxKind._(18, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierMacroDefinition'); - static const SyntaxKind IdentifierType = SyntaxKind._(19, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierType'); - static const SyntaxKind IdentifierBuiltinType = SyntaxKind._(20, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierBuiltinType'); - static const SyntaxKind IdentifierAttribute = SyntaxKind._(21, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IdentifierAttribute'); - static const SyntaxKind RegexEscape = SyntaxKind._(22, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RegexEscape'); - static const SyntaxKind RegexRepeated = SyntaxKind._(23, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RegexRepeated'); - static const SyntaxKind RegexWildcard = SyntaxKind._(24, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RegexWildcard'); - static const SyntaxKind RegexDelimiter = SyntaxKind._(25, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RegexDelimiter'); - static const SyntaxKind RegexJoin = SyntaxKind._(26, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RegexJoin'); - static const SyntaxKind StringLiteral = SyntaxKind._(27, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'StringLiteral'); - static const SyntaxKind StringLiteralEscape = SyntaxKind._(28, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'StringLiteralEscape'); - static const SyntaxKind StringLiteralSpecial = SyntaxKind._(29, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'StringLiteralSpecial'); - static const SyntaxKind StringLiteralKey = SyntaxKind._(30, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'StringLiteralKey'); - static const SyntaxKind CharacterLiteral = SyntaxKind._(31, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CharacterLiteral'); - static const SyntaxKind NumericLiteral = SyntaxKind._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'NumericLiteral'); - static const SyntaxKind BooleanLiteral = SyntaxKind._(33, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BooleanLiteral'); - static const SyntaxKind Tag = SyntaxKind._(34, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Tag'); - static const SyntaxKind TagAttribute = SyntaxKind._(35, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TagAttribute'); - static const SyntaxKind TagDelimiter = SyntaxKind._(36, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TagDelimiter'); + 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 Tag = SyntaxKind._(34, _omitEnumNames ? '' : 'Tag'); + static const SyntaxKind TagAttribute = SyntaxKind._(35, _omitEnumNames ? '' : 'TagAttribute'); + static const SyntaxKind TagDelimiter = SyntaxKind._(36, _omitEnumNames ? '' : 'TagDelimiter'); static const SyntaxKind IdentifierKeyword = Keyword; static const SyntaxKind IdentifierModule = IdentifierNamespace; @@ -153,11 +184,11 @@ class SyntaxKind extends $pb.ProtobufEnum { } class Severity extends $pb.ProtobufEnum { - static const Severity UnspecifiedSeverity = Severity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedSeverity'); - static const Severity Error = Severity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Error'); - static const Severity Warning = Severity._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Warning'); - static const Severity Information = Severity._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Information'); - static const Severity Hint = Severity._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Hint'); + 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 Hint = Severity._(4, _omitEnumNames ? '' : 'Hint'); static const $core.List values = [ UnspecifiedSeverity, @@ -174,9 +205,9 @@ class Severity extends $pb.ProtobufEnum { } class DiagnosticTag extends $pb.ProtobufEnum { - static const DiagnosticTag UnspecifiedDiagnosticTag = DiagnosticTag._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedDiagnosticTag'); - static const DiagnosticTag Unnecessary = DiagnosticTag._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Unnecessary'); - static const DiagnosticTag Deprecated = DiagnosticTag._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : '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 = [ UnspecifiedDiagnosticTag, @@ -190,105 +221,128 @@ class DiagnosticTag extends $pb.ProtobufEnum { const DiagnosticTag._($core.int v, $core.String n) : super(v, n); } +/// Language standardises names of common programming languages that can be used +/// for the `Document.language` field. The primary purpose of this enum is to +/// prevent a situation where we have a single programming language ends up with +/// multiple string representations. For example, the C++ language uses the name +/// "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, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedLanguage'); - static const Language ABAP = Language._(60, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ABAP'); - static const Language APL = Language._(49, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'APL'); - static const Language Ada = Language._(39, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Ada'); - static const Language Agda = Language._(45, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Agda'); - static const Language AsciiDoc = Language._(86, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AsciiDoc'); - static const Language Assembly = Language._(58, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Assembly'); - static const Language Awk = Language._(66, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Awk'); - static const Language Bat = Language._(68, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Bat'); - static const Language BibTeX = Language._(81, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BibTeX'); - static const Language C = Language._(34, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'C'); - static const Language COBOL = Language._(59, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'COBOL'); - static const Language CPP = Language._(35, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CPP'); - static const Language CSS = Language._(26, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CSS'); - static const Language CSharp = Language._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CSharp'); - static const Language Clojure = Language._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Clojure'); - static const Language Coffeescript = Language._(21, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Coffeescript'); - static const Language CommonLisp = Language._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CommonLisp'); - static const Language Coq = Language._(47, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Coq'); - static const Language Dart = Language._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Dart'); - static const Language Delphi = Language._(57, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Delphi'); - static const Language Diff = Language._(88, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Diff'); - static const Language Dockerfile = Language._(80, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Dockerfile'); - static const Language Dyalog = Language._(50, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Dyalog'); - static const Language Elixir = Language._(17, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Elixir'); - static const Language Erlang = Language._(18, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Erlang'); - static const Language FSharp = Language._(42, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FSharp'); - static const Language Fish = Language._(65, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Fish'); - static const Language Flow = Language._(24, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Flow'); - static const Language Fortran = Language._(56, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Fortran'); - static const Language Git_Commit = Language._(91, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Git_Commit'); - static const Language Git_Config = Language._(89, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Git_Config'); - static const Language Git_Rebase = Language._(92, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Git_Rebase'); - static const Language Go = Language._(33, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Go'); - static const Language Groovy = Language._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Groovy'); - static const Language HTML = Language._(30, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'HTML'); - static const Language Hack = Language._(20, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Hack'); - static const Language Handlebars = Language._(90, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Handlebars'); - static const Language Haskell = Language._(44, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Haskell'); - static const Language Idris = Language._(46, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Idris'); - static const Language Ini = Language._(72, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Ini'); - static const Language J = Language._(51, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'J'); - static const Language JSON = Language._(75, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'JSON'); - static const Language Java = Language._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Java'); - static const Language JavaScript = Language._(22, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'JavaScript'); - static const Language JavaScriptReact = Language._(93, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'JavaScriptReact'); - static const Language Jsonnet = Language._(76, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Jsonnet'); - static const Language Julia = Language._(55, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Julia'); - static const Language Kotlin = Language._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Kotlin'); - static const Language LaTeX = Language._(83, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'LaTeX'); - static const Language Lean = Language._(48, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Lean'); - static const Language Less = Language._(27, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Less'); - static const Language Lua = Language._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Lua'); - static const Language Makefile = Language._(79, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Makefile'); - static const Language Markdown = Language._(84, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Markdown'); - static const Language Matlab = Language._(52, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Matlab'); - static const Language Nix = Language._(77, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Nix'); - static const Language OCaml = Language._(41, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'OCaml'); - static const Language Objective_C = Language._(36, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Objective_C'); - static const Language Objective_CPP = Language._(37, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Objective_CPP'); - static const Language PHP = Language._(19, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PHP'); - static const Language PLSQL = Language._(70, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PLSQL'); - static const Language Perl = Language._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Perl'); - static const Language PowerShell = Language._(67, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PowerShell'); - static const Language Prolog = Language._(71, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Prolog'); - static const Language Python = Language._(15, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Python'); - static const Language R = Language._(54, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'R'); - static const Language Racket = Language._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Racket'); - static const Language Raku = Language._(14, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Raku'); - static const Language Razor = Language._(62, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Razor'); - static const Language ReST = Language._(85, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReST'); - static const Language Ruby = Language._(16, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Ruby'); - static const Language Rust = Language._(40, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Rust'); - static const Language SAS = Language._(61, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SAS'); - static const Language SCSS = Language._(29, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SCSS'); - static const Language SML = Language._(43, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SML'); - static const Language SQL = Language._(69, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SQL'); - static const Language Sass = Language._(28, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Sass'); - static const Language Scala = Language._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Scala'); - static const Language Scheme = Language._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Scheme'); - static const Language ShellScript = Language._(64, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ShellScript'); - static const Language Skylark = Language._(78, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Skylark'); - static const Language Swift = Language._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Swift'); - static const Language TOML = Language._(73, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOML'); - static const Language TeX = Language._(82, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TeX'); - static const Language TypeScript = Language._(23, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeScript'); - static const Language TypeScriptReact = Language._(94, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeScriptReact'); - static const Language VisualBasic = Language._(63, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VisualBasic'); - static const Language Vue = Language._(25, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Vue'); - static const Language Wolfram = Language._(53, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Wolfram'); - static const Language XML = Language._(31, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'XML'); - static const Language XSL = Language._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'XSL'); - static const Language YAML = Language._(74, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'YAML'); - static const Language Zig = Language._(38, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Zig'); + 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 Awk = Language._(66, _omitEnumNames ? '' : 'Awk'); + static const Language Bat = Language._(68, _omitEnumNames ? '' : 'Bat'); + static const Language BibTeX = Language._(81, _omitEnumNames ? '' : 'BibTeX'); + static const Language C = Language._(34, _omitEnumNames ? '' : 'C'); + static const Language COBOL = Language._(59, _omitEnumNames ? '' : 'COBOL'); + 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 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 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 Go = Language._(33, _omitEnumNames ? '' : 'Go'); + 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 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 Julia = Language._(55, _omitEnumNames ? '' : 'Julia'); + 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 Matlab = Language._(52, _omitEnumNames ? '' : 'Matlab'); + 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 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 Prolog = Language._(71, _omitEnumNames ? '' : 'Prolog'); + 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'); + static const Language Raku = Language._(14, _omitEnumNames ? '' : 'Raku'); + static const Language Razor = Language._(62, _omitEnumNames ? '' : 'Razor'); + static const Language Repro = Language._(102, _omitEnumNames ? '' : 'Repro'); + static const Language ReST = Language._(85, _omitEnumNames ? '' : 'ReST'); + static const Language Ruby = Language._(16, _omitEnumNames ? '' : 'Ruby'); + static const Language Rust = Language._(40, _omitEnumNames ? '' : 'Rust'); + static const Language SAS = Language._(61, _omitEnumNames ? '' : 'SAS'); + static const Language SCSS = Language._(29, _omitEnumNames ? '' : 'SCSS'); + static const Language SML = Language._(43, _omitEnumNames ? '' : 'SML'); + static const Language SQL = Language._(69, _omitEnumNames ? '' : 'SQL'); + 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 Slang = Language._(107, _omitEnumNames ? '' : 'Slang'); + 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 VHDL = Language._(105, _omitEnumNames ? '' : 'VHDL'); + 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 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 = [ UnspecifiedLanguage, ABAP, + Apex, APL, Ada, Agda, @@ -306,6 +360,7 @@ class Language extends $pb.ProtobufEnum { Coffeescript, CommonLisp, Coq, + CUDA, Dart, Delphi, Diff, @@ -321,6 +376,7 @@ class Language extends $pb.ProtobufEnum { Git_Config, Git_Rebase, Go, + GraphQL, Groovy, HTML, Hack, @@ -335,28 +391,34 @@ class Language extends $pb.ProtobufEnum { JavaScriptReact, Jsonnet, Julia, + Justfile, Kotlin, LaTeX, Lean, Less, Lua, + Luau, Makefile, Markdown, Matlab, + Nickel, Nix, OCaml, Objective_C, Objective_CPP, + Pascal, PHP, PLSQL, Perl, PowerShell, Prolog, + Protobuf, Python, R, Racket, Raku, Razor, + Repro, ReST, Ruby, Rust, @@ -369,11 +431,18 @@ class Language extends $pb.ProtobufEnum { Scheme, ShellScript, Skylark, + Slang, + Solidity, + Svelte, Swift, + Tcl, TOML, TeX, + Thrift, TypeScript, TypeScriptReact, + Verilog, + VHDL, VisualBasic, Vue, Wolfram, @@ -390,16 +459,16 @@ class Language extends $pb.ProtobufEnum { } class Descriptor_Suffix extends $pb.ProtobufEnum { - static const Descriptor_Suffix UnspecifiedSuffix = Descriptor_Suffix._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnspecifiedSuffix'); - static const Descriptor_Suffix Namespace = Descriptor_Suffix._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Namespace'); - static const Descriptor_Suffix Type = Descriptor_Suffix._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Type'); - static const Descriptor_Suffix Term = Descriptor_Suffix._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Term'); - static const Descriptor_Suffix Method = Descriptor_Suffix._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Method'); - static const Descriptor_Suffix TypeParameter = Descriptor_Suffix._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeParameter'); - static const Descriptor_Suffix Parameter = Descriptor_Suffix._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Parameter'); - static const Descriptor_Suffix Macro = Descriptor_Suffix._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Macro'); - static const Descriptor_Suffix Meta = Descriptor_Suffix._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Meta'); - static const Descriptor_Suffix Local = Descriptor_Suffix._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Local'); + 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 Package = Namespace; @@ -411,9 +480,9 @@ class Descriptor_Suffix extends $pb.ProtobufEnum { Method, TypeParameter, Parameter, - Macro, Meta, Local, + Macro, ]; static final $core.Map<$core.int, Descriptor_Suffix> _byValue = $pb.ProtobufEnum.initByValue(values); @@ -422,3 +491,196 @@ class Descriptor_Suffix extends $pb.ProtobufEnum { const Descriptor_Suffix._($core.int v, $core.String n) : super(v, n); } +/// (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`. +/// +/// 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 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 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 = [ + UnspecifiedKind, + AbstractMethod, + Accessor, + Array, + Assertion, + AssociatedType, + Attribute, + Axiom, + Boolean, + Class, + Constant, + Constructor, + Contract, + DataFamily, + Delegate, + Enum, + EnumMember, + Error, + Event, + Fact, + Field, + File, + Function, + Getter, + Grammar, + Instance, + Interface, + Key, + Lang, + Lemma, + Library, + Macro, + Method, + MethodAlias, + MethodReceiver, + MethodSpecification, + Message, + Modifier, + Module, + Namespace, + Null, + Number, + Object_, + Operator, + Package, + PackageObject, + Parameter, + ParameterLabel, + Pattern, + Predicate, + Property, + Protocol, + ProtocolMethod, + PureVirtualMethod, + Quasiquoter, + SelfParameter, + Setter, + Signature, + SingletonClass, + SingletonMethod, + StaticDataMember, + StaticEvent, + StaticField, + StaticMethod, + StaticProperty, + StaticVariable, + String, + Struct, + Subscript, + Tactic, + Theorem, + ThisParameter, + Trait, + TraitMethod, + Type, + TypeAlias, + TypeClass, + TypeClassMethod, + TypeFamily, + TypeParameter, + Union, + Value, + Variable, + ]; + + static final $core.Map<$core.int, SymbolInformation_Kind> _byValue = $pb.ProtobufEnum.initByValue(values); + static SymbolInformation_Kind? valueOf($core.int value) => _byValue[value]; + + const SymbolInformation_Kind._($core.int v, $core.String n) : super(v, n); +} + + +const _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 451d396e..e1758591 100644 --- a/lib/src/gen/scip.pbjson.dart +++ b/lib/src/gen/scip.pbjson.dart @@ -1,399 +1,672 @@ -/// +// // Generated code. Do not modify. // source: lib/src/gen/scip.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; + @$core.Deprecated('Use protocolVersionDescriptor instead') -const ProtocolVersion$json = const { +const ProtocolVersion$json = { '1': 'ProtocolVersion', - '2': const [ - const {'1': 'UnspecifiedProtocolVersion', '2': 0}, + '2': [ + {'1': 'UnspecifiedProtocolVersion', '2': 0}, ], }; /// Descriptor for `ProtocolVersion`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List protocolVersionDescriptor = $convert.base64Decode('Cg9Qcm90b2NvbFZlcnNpb24SHgoaVW5zcGVjaWZpZWRQcm90b2NvbFZlcnNpb24QAA=='); +final $typed_data.Uint8List protocolVersionDescriptor = $convert.base64Decode( + 'Cg9Qcm90b2NvbFZlcnNpb24SHgoaVW5zcGVjaWZpZWRQcm90b2NvbFZlcnNpb24QAA=='); + @$core.Deprecated('Use textEncodingDescriptor instead') -const TextEncoding$json = const { +const TextEncoding$json = { '1': 'TextEncoding', - '2': const [ - const {'1': 'UnspecifiedTextEncoding', '2': 0}, - const {'1': 'UTF8', '2': 1}, - const {'1': 'UTF16', '2': 2}, + '2': [ + {'1': 'UnspecifiedTextEncoding', '2': 0}, + {'1': 'UTF8', '2': 1}, + {'1': 'UTF16', '2': 2}, ], }; /// Descriptor for `TextEncoding`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List textEncodingDescriptor = $convert.base64Decode('CgxUZXh0RW5jb2RpbmcSGwoXVW5zcGVjaWZpZWRUZXh0RW5jb2RpbmcQABIICgRVVEY4EAESCQoFVVRGMTYQAg=='); +final $typed_data.Uint8List textEncodingDescriptor = $convert.base64Decode( + 'CgxUZXh0RW5jb2RpbmcSGwoXVW5zcGVjaWZpZWRUZXh0RW5jb2RpbmcQABIICgRVVEY4EAESCQ' + 'oFVVRGMTYQAg=='); + +@$core.Deprecated('Use positionEncodingDescriptor instead') +const PositionEncoding$json = { + '1': 'PositionEncoding', + '2': [ + {'1': 'UnspecifiedPositionEncoding', '2': 0}, + {'1': 'UTF8CodeUnitOffsetFromLineStart', '2': 1}, + {'1': 'UTF16CodeUnitOffsetFromLineStart', '2': 2}, + {'1': 'UTF32CodeUnitOffsetFromLineStart', '2': 3}, + ], +}; + +/// Descriptor for `PositionEncoding`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List positionEncodingDescriptor = $convert.base64Decode( + 'ChBQb3NpdGlvbkVuY29kaW5nEh8KG1Vuc3BlY2lmaWVkUG9zaXRpb25FbmNvZGluZxAAEiMKH1' + 'VURjhDb2RlVW5pdE9mZnNldEZyb21MaW5lU3RhcnQQARIkCiBVVEYxNkNvZGVVbml0T2Zmc2V0' + 'RnJvbUxpbmVTdGFydBACEiQKIFVURjMyQ29kZVVuaXRPZmZzZXRGcm9tTGluZVN0YXJ0EAM='); + @$core.Deprecated('Use symbolRoleDescriptor instead') -const SymbolRole$json = const { +const SymbolRole$json = { '1': 'SymbolRole', - '2': const [ - const {'1': 'UnspecifiedSymbolRole', '2': 0}, - const {'1': 'Definition', '2': 1}, - const {'1': 'Import', '2': 2}, - const {'1': 'WriteAccess', '2': 4}, - const {'1': 'ReadAccess', '2': 8}, - const {'1': 'Generated', '2': 16}, - const {'1': 'Test', '2': 32}, + '2': [ + {'1': 'UnspecifiedSymbolRole', '2': 0}, + {'1': 'Definition', '2': 1}, + {'1': 'Import', '2': 2}, + {'1': 'WriteAccess', '2': 4}, + {'1': 'ReadAccess', '2': 8}, + {'1': 'Generated', '2': 16}, + {'1': 'Test', '2': 32}, + {'1': 'ForwardDefinition', '2': 64}, ], }; /// Descriptor for `SymbolRole`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List symbolRoleDescriptor = $convert.base64Decode('CgpTeW1ib2xSb2xlEhkKFVVuc3BlY2lmaWVkU3ltYm9sUm9sZRAAEg4KCkRlZmluaXRpb24QARIKCgZJbXBvcnQQAhIPCgtXcml0ZUFjY2VzcxAEEg4KClJlYWRBY2Nlc3MQCBINCglHZW5lcmF0ZWQQEBIICgRUZXN0ECA='); +final $typed_data.Uint8List symbolRoleDescriptor = $convert.base64Decode( + 'CgpTeW1ib2xSb2xlEhkKFVVuc3BlY2lmaWVkU3ltYm9sUm9sZRAAEg4KCkRlZmluaXRpb24QAR' + 'IKCgZJbXBvcnQQAhIPCgtXcml0ZUFjY2VzcxAEEg4KClJlYWRBY2Nlc3MQCBINCglHZW5lcmF0' + 'ZWQQEBIICgRUZXN0ECASFQoRRm9yd2FyZERlZmluaXRpb24QQA=='); + @$core.Deprecated('Use syntaxKindDescriptor instead') -const SyntaxKind$json = const { +const SyntaxKind$json = { '1': 'SyntaxKind', - '2': const [ - const {'1': 'UnspecifiedSyntaxKind', '2': 0}, - const {'1': 'Comment', '2': 1}, - const {'1': 'PunctuationDelimiter', '2': 2}, - const {'1': 'PunctuationBracket', '2': 3}, - const {'1': 'Keyword', '2': 4}, - const { + '2': [ + {'1': 'UnspecifiedSyntaxKind', '2': 0}, + {'1': 'Comment', '2': 1}, + {'1': 'PunctuationDelimiter', '2': 2}, + {'1': 'PunctuationBracket', '2': 3}, + {'1': 'Keyword', '2': 4}, + { '1': 'IdentifierKeyword', '2': 4, - '3': const {'1': true}, + '3': {'1': true}, }, - const {'1': 'IdentifierOperator', '2': 5}, - const {'1': 'Identifier', '2': 6}, - const {'1': 'IdentifierBuiltin', '2': 7}, - const {'1': 'IdentifierNull', '2': 8}, - const {'1': 'IdentifierConstant', '2': 9}, - const {'1': 'IdentifierMutableGlobal', '2': 10}, - const {'1': 'IdentifierParameter', '2': 11}, - const {'1': 'IdentifierLocal', '2': 12}, - const {'1': 'IdentifierShadowed', '2': 13}, - const {'1': 'IdentifierNamespace', '2': 14}, - const { + {'1': 'IdentifierOperator', '2': 5}, + {'1': 'Identifier', '2': 6}, + {'1': 'IdentifierBuiltin', '2': 7}, + {'1': 'IdentifierNull', '2': 8}, + {'1': 'IdentifierConstant', '2': 9}, + {'1': 'IdentifierMutableGlobal', '2': 10}, + {'1': 'IdentifierParameter', '2': 11}, + {'1': 'IdentifierLocal', '2': 12}, + {'1': 'IdentifierShadowed', '2': 13}, + {'1': 'IdentifierNamespace', '2': 14}, + { '1': 'IdentifierModule', '2': 14, - '3': const {'1': true}, + '3': {'1': true}, }, - const {'1': 'IdentifierFunction', '2': 15}, - const {'1': 'IdentifierFunctionDefinition', '2': 16}, - const {'1': 'IdentifierMacro', '2': 17}, - const {'1': 'IdentifierMacroDefinition', '2': 18}, - const {'1': 'IdentifierType', '2': 19}, - const {'1': 'IdentifierBuiltinType', '2': 20}, - const {'1': 'IdentifierAttribute', '2': 21}, - const {'1': 'RegexEscape', '2': 22}, - const {'1': 'RegexRepeated', '2': 23}, - const {'1': 'RegexWildcard', '2': 24}, - const {'1': 'RegexDelimiter', '2': 25}, - const {'1': 'RegexJoin', '2': 26}, - const {'1': 'StringLiteral', '2': 27}, - const {'1': 'StringLiteralEscape', '2': 28}, - const {'1': 'StringLiteralSpecial', '2': 29}, - const {'1': 'StringLiteralKey', '2': 30}, - const {'1': 'CharacterLiteral', '2': 31}, - const {'1': 'NumericLiteral', '2': 32}, - const {'1': 'BooleanLiteral', '2': 33}, - const {'1': 'Tag', '2': 34}, - const {'1': 'TagAttribute', '2': 35}, - const {'1': 'TagDelimiter', '2': 36}, + {'1': 'IdentifierFunction', '2': 15}, + {'1': 'IdentifierFunctionDefinition', '2': 16}, + {'1': 'IdentifierMacro', '2': 17}, + {'1': 'IdentifierMacroDefinition', '2': 18}, + {'1': 'IdentifierType', '2': 19}, + {'1': 'IdentifierBuiltinType', '2': 20}, + {'1': 'IdentifierAttribute', '2': 21}, + {'1': 'RegexEscape', '2': 22}, + {'1': 'RegexRepeated', '2': 23}, + {'1': 'RegexWildcard', '2': 24}, + {'1': 'RegexDelimiter', '2': 25}, + {'1': 'RegexJoin', '2': 26}, + {'1': 'StringLiteral', '2': 27}, + {'1': 'StringLiteralEscape', '2': 28}, + {'1': 'StringLiteralSpecial', '2': 29}, + {'1': 'StringLiteralKey', '2': 30}, + {'1': 'CharacterLiteral', '2': 31}, + {'1': 'NumericLiteral', '2': 32}, + {'1': 'BooleanLiteral', '2': 33}, + {'1': 'Tag', '2': 34}, + {'1': 'TagAttribute', '2': 35}, + {'1': 'TagDelimiter', '2': 36}, ], - '3': const {'2': true}, + '3': {'2': true}, }; /// Descriptor for `SyntaxKind`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List syntaxKindDescriptor = $convert.base64Decode('CgpTeW50YXhLaW5kEhkKFVVuc3BlY2lmaWVkU3ludGF4S2luZBAAEgsKB0NvbW1lbnQQARIYChRQdW5jdHVhdGlvbkRlbGltaXRlchACEhYKElB1bmN0dWF0aW9uQnJhY2tldBADEgsKB0tleXdvcmQQBBIZChFJZGVudGlmaWVyS2V5d29yZBAEGgIIARIWChJJZGVudGlmaWVyT3BlcmF0b3IQBRIOCgpJZGVudGlmaWVyEAYSFQoRSWRlbnRpZmllckJ1aWx0aW4QBxISCg5JZGVudGlmaWVyTnVsbBAIEhYKEklkZW50aWZpZXJDb25zdGFudBAJEhsKF0lkZW50aWZpZXJNdXRhYmxlR2xvYmFsEAoSFwoTSWRlbnRpZmllclBhcmFtZXRlchALEhMKD0lkZW50aWZpZXJMb2NhbBAMEhYKEklkZW50aWZpZXJTaGFkb3dlZBANEhcKE0lkZW50aWZpZXJOYW1lc3BhY2UQDhIYChBJZGVudGlmaWVyTW9kdWxlEA4aAggBEhYKEklkZW50aWZpZXJGdW5jdGlvbhAPEiAKHElkZW50aWZpZXJGdW5jdGlvbkRlZmluaXRpb24QEBITCg9JZGVudGlmaWVyTWFjcm8QERIdChlJZGVudGlmaWVyTWFjcm9EZWZpbml0aW9uEBISEgoOSWRlbnRpZmllclR5cGUQExIZChVJZGVudGlmaWVyQnVpbHRpblR5cGUQFBIXChNJZGVudGlmaWVyQXR0cmlidXRlEBUSDwoLUmVnZXhFc2NhcGUQFhIRCg1SZWdleFJlcGVhdGVkEBcSEQoNUmVnZXhXaWxkY2FyZBAYEhIKDlJlZ2V4RGVsaW1pdGVyEBkSDQoJUmVnZXhKb2luEBoSEQoNU3RyaW5nTGl0ZXJhbBAbEhcKE1N0cmluZ0xpdGVyYWxFc2NhcGUQHBIYChRTdHJpbmdMaXRlcmFsU3BlY2lhbBAdEhQKEFN0cmluZ0xpdGVyYWxLZXkQHhIUChBDaGFyYWN0ZXJMaXRlcmFsEB8SEgoOTnVtZXJpY0xpdGVyYWwQIBISCg5Cb29sZWFuTGl0ZXJhbBAhEgcKA1RhZxAiEhAKDFRhZ0F0dHJpYnV0ZRAjEhAKDFRhZ0RlbGltaXRlchAkGgIQAQ=='); +final $typed_data.Uint8List syntaxKindDescriptor = $convert.base64Decode( + 'CgpTeW50YXhLaW5kEhkKFVVuc3BlY2lmaWVkU3ludGF4S2luZBAAEgsKB0NvbW1lbnQQARIYCh' + 'RQdW5jdHVhdGlvbkRlbGltaXRlchACEhYKElB1bmN0dWF0aW9uQnJhY2tldBADEgsKB0tleXdv' + 'cmQQBBIZChFJZGVudGlmaWVyS2V5d29yZBAEGgIIARIWChJJZGVudGlmaWVyT3BlcmF0b3IQBR' + 'IOCgpJZGVudGlmaWVyEAYSFQoRSWRlbnRpZmllckJ1aWx0aW4QBxISCg5JZGVudGlmaWVyTnVs' + 'bBAIEhYKEklkZW50aWZpZXJDb25zdGFudBAJEhsKF0lkZW50aWZpZXJNdXRhYmxlR2xvYmFsEA' + 'oSFwoTSWRlbnRpZmllclBhcmFtZXRlchALEhMKD0lkZW50aWZpZXJMb2NhbBAMEhYKEklkZW50' + 'aWZpZXJTaGFkb3dlZBANEhcKE0lkZW50aWZpZXJOYW1lc3BhY2UQDhIYChBJZGVudGlmaWVyTW' + '9kdWxlEA4aAggBEhYKEklkZW50aWZpZXJGdW5jdGlvbhAPEiAKHElkZW50aWZpZXJGdW5jdGlv' + 'bkRlZmluaXRpb24QEBITCg9JZGVudGlmaWVyTWFjcm8QERIdChlJZGVudGlmaWVyTWFjcm9EZW' + 'Zpbml0aW9uEBISEgoOSWRlbnRpZmllclR5cGUQExIZChVJZGVudGlmaWVyQnVpbHRpblR5cGUQ' + 'FBIXChNJZGVudGlmaWVyQXR0cmlidXRlEBUSDwoLUmVnZXhFc2NhcGUQFhIRCg1SZWdleFJlcG' + 'VhdGVkEBcSEQoNUmVnZXhXaWxkY2FyZBAYEhIKDlJlZ2V4RGVsaW1pdGVyEBkSDQoJUmVnZXhK' + 'b2luEBoSEQoNU3RyaW5nTGl0ZXJhbBAbEhcKE1N0cmluZ0xpdGVyYWxFc2NhcGUQHBIYChRTdH' + 'JpbmdMaXRlcmFsU3BlY2lhbBAdEhQKEFN0cmluZ0xpdGVyYWxLZXkQHhIUChBDaGFyYWN0ZXJM' + 'aXRlcmFsEB8SEgoOTnVtZXJpY0xpdGVyYWwQIBISCg5Cb29sZWFuTGl0ZXJhbBAhEgcKA1RhZx' + 'AiEhAKDFRhZ0F0dHJpYnV0ZRAjEhAKDFRhZ0RlbGltaXRlchAkGgIQAQ=='); + @$core.Deprecated('Use severityDescriptor instead') -const Severity$json = const { +const Severity$json = { '1': 'Severity', - '2': const [ - const {'1': 'UnspecifiedSeverity', '2': 0}, - const {'1': 'Error', '2': 1}, - const {'1': 'Warning', '2': 2}, - const {'1': 'Information', '2': 3}, - const {'1': 'Hint', '2': 4}, + '2': [ + {'1': 'UnspecifiedSeverity', '2': 0}, + {'1': 'Error', '2': 1}, + {'1': 'Warning', '2': 2}, + {'1': 'Information', '2': 3}, + {'1': 'Hint', '2': 4}, ], }; /// Descriptor for `Severity`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List severityDescriptor = $convert.base64Decode('CghTZXZlcml0eRIXChNVbnNwZWNpZmllZFNldmVyaXR5EAASCQoFRXJyb3IQARILCgdXYXJuaW5nEAISDwoLSW5mb3JtYXRpb24QAxIICgRIaW50EAQ='); +final $typed_data.Uint8List severityDescriptor = $convert.base64Decode( + 'CghTZXZlcml0eRIXChNVbnNwZWNpZmllZFNldmVyaXR5EAASCQoFRXJyb3IQARILCgdXYXJuaW' + '5nEAISDwoLSW5mb3JtYXRpb24QAxIICgRIaW50EAQ='); + @$core.Deprecated('Use diagnosticTagDescriptor instead') -const DiagnosticTag$json = const { +const DiagnosticTag$json = { '1': 'DiagnosticTag', - '2': const [ - const {'1': 'UnspecifiedDiagnosticTag', '2': 0}, - const {'1': 'Unnecessary', '2': 1}, - const {'1': 'Deprecated', '2': 2}, + '2': [ + {'1': 'UnspecifiedDiagnosticTag', '2': 0}, + {'1': 'Unnecessary', '2': 1}, + {'1': 'Deprecated', '2': 2}, ], }; /// Descriptor for `DiagnosticTag`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List diagnosticTagDescriptor = $convert.base64Decode('Cg1EaWFnbm9zdGljVGFnEhwKGFVuc3BlY2lmaWVkRGlhZ25vc3RpY1RhZxAAEg8KC1VubmVjZXNzYXJ5EAESDgoKRGVwcmVjYXRlZBAC'); +final $typed_data.Uint8List diagnosticTagDescriptor = $convert.base64Decode( + 'Cg1EaWFnbm9zdGljVGFnEhwKGFVuc3BlY2lmaWVkRGlhZ25vc3RpY1RhZxAAEg8KC1VubmVjZX' + 'NzYXJ5EAESDgoKRGVwcmVjYXRlZBAC'); + @$core.Deprecated('Use languageDescriptor instead') -const Language$json = const { +const Language$json = { '1': 'Language', - '2': const [ - const {'1': 'UnspecifiedLanguage', '2': 0}, - const {'1': 'ABAP', '2': 60}, - const {'1': 'APL', '2': 49}, - const {'1': 'Ada', '2': 39}, - const {'1': 'Agda', '2': 45}, - const {'1': 'AsciiDoc', '2': 86}, - const {'1': 'Assembly', '2': 58}, - const {'1': 'Awk', '2': 66}, - const {'1': 'Bat', '2': 68}, - const {'1': 'BibTeX', '2': 81}, - const {'1': 'C', '2': 34}, - const {'1': 'COBOL', '2': 59}, - const {'1': 'CPP', '2': 35}, - const {'1': 'CSS', '2': 26}, - const {'1': 'CSharp', '2': 1}, - const {'1': 'Clojure', '2': 8}, - const {'1': 'Coffeescript', '2': 21}, - const {'1': 'CommonLisp', '2': 9}, - const {'1': 'Coq', '2': 47}, - const {'1': 'Dart', '2': 3}, - const {'1': 'Delphi', '2': 57}, - const {'1': 'Diff', '2': 88}, - const {'1': 'Dockerfile', '2': 80}, - const {'1': 'Dyalog', '2': 50}, - const {'1': 'Elixir', '2': 17}, - const {'1': 'Erlang', '2': 18}, - const {'1': 'FSharp', '2': 42}, - const {'1': 'Fish', '2': 65}, - const {'1': 'Flow', '2': 24}, - const {'1': 'Fortran', '2': 56}, - const {'1': 'Git_Commit', '2': 91}, - const {'1': 'Git_Config', '2': 89}, - const {'1': 'Git_Rebase', '2': 92}, - const {'1': 'Go', '2': 33}, - const {'1': 'Groovy', '2': 7}, - const {'1': 'HTML', '2': 30}, - const {'1': 'Hack', '2': 20}, - const {'1': 'Handlebars', '2': 90}, - const {'1': 'Haskell', '2': 44}, - const {'1': 'Idris', '2': 46}, - const {'1': 'Ini', '2': 72}, - const {'1': 'J', '2': 51}, - const {'1': 'JSON', '2': 75}, - const {'1': 'Java', '2': 6}, - const {'1': 'JavaScript', '2': 22}, - const {'1': 'JavaScriptReact', '2': 93}, - const {'1': 'Jsonnet', '2': 76}, - const {'1': 'Julia', '2': 55}, - const {'1': 'Kotlin', '2': 4}, - const {'1': 'LaTeX', '2': 83}, - const {'1': 'Lean', '2': 48}, - const {'1': 'Less', '2': 27}, - const {'1': 'Lua', '2': 12}, - const {'1': 'Makefile', '2': 79}, - const {'1': 'Markdown', '2': 84}, - const {'1': 'Matlab', '2': 52}, - const {'1': 'Nix', '2': 77}, - const {'1': 'OCaml', '2': 41}, - const {'1': 'Objective_C', '2': 36}, - const {'1': 'Objective_CPP', '2': 37}, - const {'1': 'PHP', '2': 19}, - const {'1': 'PLSQL', '2': 70}, - const {'1': 'Perl', '2': 13}, - const {'1': 'PowerShell', '2': 67}, - const {'1': 'Prolog', '2': 71}, - const {'1': 'Python', '2': 15}, - const {'1': 'R', '2': 54}, - const {'1': 'Racket', '2': 11}, - const {'1': 'Raku', '2': 14}, - const {'1': 'Razor', '2': 62}, - const {'1': 'ReST', '2': 85}, - const {'1': 'Ruby', '2': 16}, - const {'1': 'Rust', '2': 40}, - const {'1': 'SAS', '2': 61}, - const {'1': 'SCSS', '2': 29}, - const {'1': 'SML', '2': 43}, - const {'1': 'SQL', '2': 69}, - const {'1': 'Sass', '2': 28}, - const {'1': 'Scala', '2': 5}, - const {'1': 'Scheme', '2': 10}, - const {'1': 'ShellScript', '2': 64}, - const {'1': 'Skylark', '2': 78}, - const {'1': 'Swift', '2': 2}, - const {'1': 'TOML', '2': 73}, - const {'1': 'TeX', '2': 82}, - const {'1': 'TypeScript', '2': 23}, - const {'1': 'TypeScriptReact', '2': 94}, - const {'1': 'VisualBasic', '2': 63}, - const {'1': 'Vue', '2': 25}, - const {'1': 'Wolfram', '2': 53}, - const {'1': 'XML', '2': 31}, - const {'1': 'XSL', '2': 32}, - const {'1': 'YAML', '2': 74}, - const {'1': 'Zig', '2': 38}, + '2': [ + {'1': 'UnspecifiedLanguage', '2': 0}, + {'1': 'ABAP', '2': 60}, + {'1': 'Apex', '2': 96}, + {'1': 'APL', '2': 49}, + {'1': 'Ada', '2': 39}, + {'1': 'Agda', '2': 45}, + {'1': 'AsciiDoc', '2': 86}, + {'1': 'Assembly', '2': 58}, + {'1': 'Awk', '2': 66}, + {'1': 'Bat', '2': 68}, + {'1': 'BibTeX', '2': 81}, + {'1': 'C', '2': 34}, + {'1': 'COBOL', '2': 59}, + {'1': 'CPP', '2': 35}, + {'1': 'CSS', '2': 26}, + {'1': 'CSharp', '2': 1}, + {'1': 'Clojure', '2': 8}, + {'1': 'Coffeescript', '2': 21}, + {'1': 'CommonLisp', '2': 9}, + {'1': 'Coq', '2': 47}, + {'1': 'CUDA', '2': 97}, + {'1': 'Dart', '2': 3}, + {'1': 'Delphi', '2': 57}, + {'1': 'Diff', '2': 88}, + {'1': 'Dockerfile', '2': 80}, + {'1': 'Dyalog', '2': 50}, + {'1': 'Elixir', '2': 17}, + {'1': 'Erlang', '2': 18}, + {'1': 'FSharp', '2': 42}, + {'1': 'Fish', '2': 65}, + {'1': 'Flow', '2': 24}, + {'1': 'Fortran', '2': 56}, + {'1': 'Git_Commit', '2': 91}, + {'1': 'Git_Config', '2': 89}, + {'1': 'Git_Rebase', '2': 92}, + {'1': 'Go', '2': 33}, + {'1': 'GraphQL', '2': 98}, + {'1': 'Groovy', '2': 7}, + {'1': 'HTML', '2': 30}, + {'1': 'Hack', '2': 20}, + {'1': 'Handlebars', '2': 90}, + {'1': 'Haskell', '2': 44}, + {'1': 'Idris', '2': 46}, + {'1': 'Ini', '2': 72}, + {'1': 'J', '2': 51}, + {'1': 'JSON', '2': 75}, + {'1': 'Java', '2': 6}, + {'1': 'JavaScript', '2': 22}, + {'1': 'JavaScriptReact', '2': 93}, + {'1': 'Jsonnet', '2': 76}, + {'1': 'Julia', '2': 55}, + {'1': 'Justfile', '2': 109}, + {'1': 'Kotlin', '2': 4}, + {'1': 'LaTeX', '2': 83}, + {'1': 'Lean', '2': 48}, + {'1': 'Less', '2': 27}, + {'1': 'Lua', '2': 12}, + {'1': 'Luau', '2': 108}, + {'1': 'Makefile', '2': 79}, + {'1': 'Markdown', '2': 84}, + {'1': 'Matlab', '2': 52}, + {'1': 'Nickel', '2': 110}, + {'1': 'Nix', '2': 77}, + {'1': 'OCaml', '2': 41}, + {'1': 'Objective_C', '2': 36}, + {'1': 'Objective_CPP', '2': 37}, + {'1': 'Pascal', '2': 99}, + {'1': 'PHP', '2': 19}, + {'1': 'PLSQL', '2': 70}, + {'1': 'Perl', '2': 13}, + {'1': 'PowerShell', '2': 67}, + {'1': 'Prolog', '2': 71}, + {'1': 'Protobuf', '2': 100}, + {'1': 'Python', '2': 15}, + {'1': 'R', '2': 54}, + {'1': 'Racket', '2': 11}, + {'1': 'Raku', '2': 14}, + {'1': 'Razor', '2': 62}, + {'1': 'Repro', '2': 102}, + {'1': 'ReST', '2': 85}, + {'1': 'Ruby', '2': 16}, + {'1': 'Rust', '2': 40}, + {'1': 'SAS', '2': 61}, + {'1': 'SCSS', '2': 29}, + {'1': 'SML', '2': 43}, + {'1': 'SQL', '2': 69}, + {'1': 'Sass', '2': 28}, + {'1': 'Scala', '2': 5}, + {'1': 'Scheme', '2': 10}, + {'1': 'ShellScript', '2': 64}, + {'1': 'Skylark', '2': 78}, + {'1': 'Slang', '2': 107}, + {'1': 'Solidity', '2': 95}, + {'1': 'Svelte', '2': 106}, + {'1': 'Swift', '2': 2}, + {'1': 'Tcl', '2': 101}, + {'1': 'TOML', '2': 73}, + {'1': 'TeX', '2': 82}, + {'1': 'Thrift', '2': 103}, + {'1': 'TypeScript', '2': 23}, + {'1': 'TypeScriptReact', '2': 94}, + {'1': 'Verilog', '2': 104}, + {'1': 'VHDL', '2': 105}, + {'1': 'VisualBasic', '2': 63}, + {'1': 'Vue', '2': 25}, + {'1': 'Wolfram', '2': 53}, + {'1': 'XML', '2': 31}, + {'1': 'XSL', '2': 32}, + {'1': 'YAML', '2': 74}, + {'1': 'Zig', '2': 38}, ], }; /// Descriptor for `Language`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List languageDescriptor = $convert.base64Decode('CghMYW5ndWFnZRIXChNVbnNwZWNpZmllZExhbmd1YWdlEAASCAoEQUJBUBA8EgcKA0FQTBAxEgcKA0FkYRAnEggKBEFnZGEQLRIMCghBc2NpaURvYxBWEgwKCEFzc2VtYmx5EDoSBwoDQXdrEEISBwoDQmF0EEQSCgoGQmliVGVYEFESBQoBQxAiEgkKBUNPQk9MEDsSBwoDQ1BQECMSBwoDQ1NTEBoSCgoGQ1NoYXJwEAESCwoHQ2xvanVyZRAIEhAKDENvZmZlZXNjcmlwdBAVEg4KCkNvbW1vbkxpc3AQCRIHCgNDb3EQLxIICgREYXJ0EAMSCgoGRGVscGhpEDkSCAoERGlmZhBYEg4KCkRvY2tlcmZpbGUQUBIKCgZEeWFsb2cQMhIKCgZFbGl4aXIQERIKCgZFcmxhbmcQEhIKCgZGU2hhcnAQKhIICgRGaXNoEEESCAoERmxvdxAYEgsKB0ZvcnRyYW4QOBIOCgpHaXRfQ29tbWl0EFsSDgoKR2l0X0NvbmZpZxBZEg4KCkdpdF9SZWJhc2UQXBIGCgJHbxAhEgoKBkdyb292eRAHEggKBEhUTUwQHhIICgRIYWNrEBQSDgoKSGFuZGxlYmFycxBaEgsKB0hhc2tlbGwQLBIJCgVJZHJpcxAuEgcKA0luaRBIEgUKAUoQMxIICgRKU09OEEsSCAoESmF2YRAGEg4KCkphdmFTY3JpcHQQFhITCg9KYXZhU2NyaXB0UmVhY3QQXRILCgdKc29ubmV0EEwSCQoFSnVsaWEQNxIKCgZLb3RsaW4QBBIJCgVMYVRlWBBTEggKBExlYW4QMBIICgRMZXNzEBsSBwoDTHVhEAwSDAoITWFrZWZpbGUQTxIMCghNYXJrZG93bhBUEgoKBk1hdGxhYhA0EgcKA05peBBNEgkKBU9DYW1sECkSDwoLT2JqZWN0aXZlX0MQJBIRCg1PYmplY3RpdmVfQ1BQECUSBwoDUEhQEBMSCQoFUExTUUwQRhIICgRQZXJsEA0SDgoKUG93ZXJTaGVsbBBDEgoKBlByb2xvZxBHEgoKBlB5dGhvbhAPEgUKAVIQNhIKCgZSYWNrZXQQCxIICgRSYWt1EA4SCQoFUmF6b3IQPhIICgRSZVNUEFUSCAoEUnVieRAQEggKBFJ1c3QQKBIHCgNTQVMQPRIICgRTQ1NTEB0SBwoDU01MECsSBwoDU1FMEEUSCAoEU2FzcxAcEgkKBVNjYWxhEAUSCgoGU2NoZW1lEAoSDwoLU2hlbGxTY3JpcHQQQBILCgdTa3lsYXJrEE4SCQoFU3dpZnQQAhIICgRUT01MEEkSBwoDVGVYEFISDgoKVHlwZVNjcmlwdBAXEhMKD1R5cGVTY3JpcHRSZWFjdBBeEg8KC1Zpc3VhbEJhc2ljED8SBwoDVnVlEBkSCwoHV29sZnJhbRA1EgcKA1hNTBAfEgcKA1hTTBAgEggKBFlBTUwQShIHCgNaaWcQJg=='); +final $typed_data.Uint8List languageDescriptor = $convert.base64Decode( + 'CghMYW5ndWFnZRIXChNVbnNwZWNpZmllZExhbmd1YWdlEAASCAoEQUJBUBA8EggKBEFwZXgQYB' + 'IHCgNBUEwQMRIHCgNBZGEQJxIICgRBZ2RhEC0SDAoIQXNjaWlEb2MQVhIMCghBc3NlbWJseRA6' + 'EgcKA0F3axBCEgcKA0JhdBBEEgoKBkJpYlRlWBBREgUKAUMQIhIJCgVDT0JPTBA7EgcKA0NQUB' + 'AjEgcKA0NTUxAaEgoKBkNTaGFycBABEgsKB0Nsb2p1cmUQCBIQCgxDb2ZmZWVzY3JpcHQQFRIO' + 'CgpDb21tb25MaXNwEAkSBwoDQ29xEC8SCAoEQ1VEQRBhEggKBERhcnQQAxIKCgZEZWxwaGkQOR' + 'IICgREaWZmEFgSDgoKRG9ja2VyZmlsZRBQEgoKBkR5YWxvZxAyEgoKBkVsaXhpchAREgoKBkVy' + 'bGFuZxASEgoKBkZTaGFycBAqEggKBEZpc2gQQRIICgRGbG93EBgSCwoHRm9ydHJhbhA4Eg4KCk' + 'dpdF9Db21taXQQWxIOCgpHaXRfQ29uZmlnEFkSDgoKR2l0X1JlYmFzZRBcEgYKAkdvECESCwoH' + 'R3JhcGhRTBBiEgoKBkdyb292eRAHEggKBEhUTUwQHhIICgRIYWNrEBQSDgoKSGFuZGxlYmFycx' + 'BaEgsKB0hhc2tlbGwQLBIJCgVJZHJpcxAuEgcKA0luaRBIEgUKAUoQMxIICgRKU09OEEsSCAoE' + 'SmF2YRAGEg4KCkphdmFTY3JpcHQQFhITCg9KYXZhU2NyaXB0UmVhY3QQXRILCgdKc29ubmV0EE' + 'wSCQoFSnVsaWEQNxIMCghKdXN0ZmlsZRBtEgoKBktvdGxpbhAEEgkKBUxhVGVYEFMSCAoETGVh' + 'bhAwEggKBExlc3MQGxIHCgNMdWEQDBIICgRMdWF1EGwSDAoITWFrZWZpbGUQTxIMCghNYXJrZG' + '93bhBUEgoKBk1hdGxhYhA0EgoKBk5pY2tlbBBuEgcKA05peBBNEgkKBU9DYW1sECkSDwoLT2Jq' + 'ZWN0aXZlX0MQJBIRCg1PYmplY3RpdmVfQ1BQECUSCgoGUGFzY2FsEGMSBwoDUEhQEBMSCQoFUE' + 'xTUUwQRhIICgRQZXJsEA0SDgoKUG93ZXJTaGVsbBBDEgoKBlByb2xvZxBHEgwKCFByb3RvYnVm' + 'EGQSCgoGUHl0aG9uEA8SBQoBUhA2EgoKBlJhY2tldBALEggKBFJha3UQDhIJCgVSYXpvchA+Eg' + 'kKBVJlcHJvEGYSCAoEUmVTVBBVEggKBFJ1YnkQEBIICgRSdXN0ECgSBwoDU0FTED0SCAoEU0NT' + 'UxAdEgcKA1NNTBArEgcKA1NRTBBFEggKBFNhc3MQHBIJCgVTY2FsYRAFEgoKBlNjaGVtZRAKEg' + '8KC1NoZWxsU2NyaXB0EEASCwoHU2t5bGFyaxBOEgkKBVNsYW5nEGsSDAoIU29saWRpdHkQXxIK' + 'CgZTdmVsdGUQahIJCgVTd2lmdBACEgcKA1RjbBBlEggKBFRPTUwQSRIHCgNUZVgQUhIKCgZUaH' + 'JpZnQQZxIOCgpUeXBlU2NyaXB0EBcSEwoPVHlwZVNjcmlwdFJlYWN0EF4SCwoHVmVyaWxvZxBo' + 'EggKBFZIREwQaRIPCgtWaXN1YWxCYXNpYxA/EgcKA1Z1ZRAZEgsKB1dvbGZyYW0QNRIHCgNYTU' + 'wQHxIHCgNYU0wQIBIICgRZQU1MEEoSBwoDWmlnECY='); + @$core.Deprecated('Use indexDescriptor instead') -const Index$json = const { +const Index$json = { '1': 'Index', - '2': const [ - const {'1': 'metadata', '3': 1, '4': 1, '5': 11, '6': '.scip.Metadata', '10': 'metadata'}, - const {'1': 'documents', '3': 2, '4': 3, '5': 11, '6': '.scip.Document', '10': 'documents'}, - const {'1': 'external_symbols', '3': 3, '4': 3, '5': 11, '6': '.scip.SymbolInformation', '10': 'externalSymbols'}, + '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'}, ], }; /// Descriptor for `Index`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List indexDescriptor = $convert.base64Decode('CgVJbmRleBIqCghtZXRhZGF0YRgBIAEoCzIOLnNjaXAuTWV0YWRhdGFSCG1ldGFkYXRhEiwKCWRvY3VtZW50cxgCIAMoCzIOLnNjaXAuRG9jdW1lbnRSCWRvY3VtZW50cxJCChBleHRlcm5hbF9zeW1ib2xzGAMgAygLMhcuc2NpcC5TeW1ib2xJbmZvcm1hdGlvblIPZXh0ZXJuYWxTeW1ib2xz'); +final $typed_data.Uint8List indexDescriptor = $convert.base64Decode( + 'CgVJbmRleBIqCghtZXRhZGF0YRgBIAEoCzIOLnNjaXAuTWV0YWRhdGFSCG1ldGFkYXRhEiwKCW' + 'RvY3VtZW50cxgCIAMoCzIOLnNjaXAuRG9jdW1lbnRSCWRvY3VtZW50cxJCChBleHRlcm5hbF9z' + 'eW1ib2xzGAMgAygLMhcuc2NpcC5TeW1ib2xJbmZvcm1hdGlvblIPZXh0ZXJuYWxTeW1ib2xz'); + @$core.Deprecated('Use metadataDescriptor instead') -const Metadata$json = const { +const Metadata$json = { '1': 'Metadata', - '2': const [ - const {'1': 'version', '3': 1, '4': 1, '5': 14, '6': '.scip.ProtocolVersion', '10': 'version'}, - const {'1': 'tool_info', '3': 2, '4': 1, '5': 11, '6': '.scip.ToolInfo', '10': 'toolInfo'}, - const {'1': 'project_root', '3': 3, '4': 1, '5': 9, '10': 'projectRoot'}, - const {'1': 'text_document_encoding', '3': 4, '4': 1, '5': 14, '6': '.scip.TextEncoding', '10': 'textDocumentEncoding'}, + '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': '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'}, ], }; /// Descriptor for `Metadata`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List metadataDescriptor = $convert.base64Decode('CghNZXRhZGF0YRIvCgd2ZXJzaW9uGAEgASgOMhUuc2NpcC5Qcm90b2NvbFZlcnNpb25SB3ZlcnNpb24SKwoJdG9vbF9pbmZvGAIgASgLMg4uc2NpcC5Ub29sSW5mb1IIdG9vbEluZm8SIQoMcHJvamVjdF9yb290GAMgASgJUgtwcm9qZWN0Um9vdBJIChZ0ZXh0X2RvY3VtZW50X2VuY29kaW5nGAQgASgOMhIuc2NpcC5UZXh0RW5jb2RpbmdSFHRleHREb2N1bWVudEVuY29kaW5n'); +final $typed_data.Uint8List metadataDescriptor = $convert.base64Decode( + 'CghNZXRhZGF0YRIvCgd2ZXJzaW9uGAEgASgOMhUuc2NpcC5Qcm90b2NvbFZlcnNpb25SB3Zlcn' + 'Npb24SKwoJdG9vbF9pbmZvGAIgASgLMg4uc2NpcC5Ub29sSW5mb1IIdG9vbEluZm8SIQoMcHJv' + 'amVjdF9yb290GAMgASgJUgtwcm9qZWN0Um9vdBJIChZ0ZXh0X2RvY3VtZW50X2VuY29kaW5nGA' + 'QgASgOMhIuc2NpcC5UZXh0RW5jb2RpbmdSFHRleHREb2N1bWVudEVuY29kaW5n'); + @$core.Deprecated('Use toolInfoDescriptor instead') -const ToolInfo$json = const { +const ToolInfo$json = { '1': 'ToolInfo', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, - const {'1': 'arguments', '3': 3, '4': 3, '5': 9, '10': 'arguments'}, + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + {'1': 'arguments', '3': 3, '4': 3, '5': 9, '10': 'arguments'}, ], }; /// Descriptor for `ToolInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List toolInfoDescriptor = $convert.base64Decode('CghUb29sSW5mbxISCgRuYW1lGAEgASgJUgRuYW1lEhgKB3ZlcnNpb24YAiABKAlSB3ZlcnNpb24SHAoJYXJndW1lbnRzGAMgAygJUglhcmd1bWVudHM='); +final $typed_data.Uint8List toolInfoDescriptor = $convert.base64Decode( + 'CghUb29sSW5mbxISCgRuYW1lGAEgASgJUgRuYW1lEhgKB3ZlcnNpb24YAiABKAlSB3ZlcnNpb2' + '4SHAoJYXJndW1lbnRzGAMgAygJUglhcmd1bWVudHM='); + @$core.Deprecated('Use documentDescriptor instead') -const Document$json = const { +const Document$json = { '1': 'Document', - '2': const [ - const {'1': 'language', '3': 4, '4': 1, '5': 9, '10': 'language'}, - const {'1': 'relative_path', '3': 1, '4': 1, '5': 9, '10': 'relativePath'}, - const {'1': 'occurrences', '3': 2, '4': 3, '5': 11, '6': '.scip.Occurrence', '10': 'occurrences'}, - const {'1': 'symbols', '3': 3, '4': 3, '5': 11, '6': '.scip.SymbolInformation', '10': 'symbols'}, + '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': 'text', '3': 5, '4': 1, '5': 9, '10': 'text'}, + {'1': 'position_encoding', '3': 6, '4': 1, '5': 14, '6': '.scip.PositionEncoding', '10': 'positionEncoding'}, ], }; /// Descriptor for `Document`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List documentDescriptor = $convert.base64Decode('CghEb2N1bWVudBIaCghsYW5ndWFnZRgEIAEoCVIIbGFuZ3VhZ2USIwoNcmVsYXRpdmVfcGF0aBgBIAEoCVIMcmVsYXRpdmVQYXRoEjIKC29jY3VycmVuY2VzGAIgAygLMhAuc2NpcC5PY2N1cnJlbmNlUgtvY2N1cnJlbmNlcxIxCgdzeW1ib2xzGAMgAygLMhcuc2NpcC5TeW1ib2xJbmZvcm1hdGlvblIHc3ltYm9scw=='); +final $typed_data.Uint8List documentDescriptor = $convert.base64Decode( + 'CghEb2N1bWVudBIaCghsYW5ndWFnZRgEIAEoCVIIbGFuZ3VhZ2USIwoNcmVsYXRpdmVfcGF0aB' + 'gBIAEoCVIMcmVsYXRpdmVQYXRoEjIKC29jY3VycmVuY2VzGAIgAygLMhAuc2NpcC5PY2N1cnJl' + 'bmNlUgtvY2N1cnJlbmNlcxIxCgdzeW1ib2xzGAMgAygLMhcuc2NpcC5TeW1ib2xJbmZvcm1hdG' + 'lvblIHc3ltYm9scxISCgR0ZXh0GAUgASgJUgR0ZXh0EkMKEXBvc2l0aW9uX2VuY29kaW5nGAYg' + 'ASgOMhYuc2NpcC5Qb3NpdGlvbkVuY29kaW5nUhBwb3NpdGlvbkVuY29kaW5n'); + @$core.Deprecated('Use symbolDescriptor instead') -const Symbol$json = const { +const Symbol$json = { '1': 'Symbol', - '2': const [ - const {'1': 'scheme', '3': 1, '4': 1, '5': 9, '10': 'scheme'}, - const {'1': 'package', '3': 2, '4': 1, '5': 11, '6': '.scip.Package', '10': 'package'}, - const {'1': 'descriptors', '3': 3, '4': 3, '5': 11, '6': '.scip.Descriptor', '10': 'descriptors'}, + '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'}, ], }; /// Descriptor for `Symbol`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List symbolDescriptor = $convert.base64Decode('CgZTeW1ib2wSFgoGc2NoZW1lGAEgASgJUgZzY2hlbWUSJwoHcGFja2FnZRgCIAEoCzINLnNjaXAuUGFja2FnZVIHcGFja2FnZRIyCgtkZXNjcmlwdG9ycxgDIAMoCzIQLnNjaXAuRGVzY3JpcHRvclILZGVzY3JpcHRvcnM='); +final $typed_data.Uint8List symbolDescriptor = $convert.base64Decode( + 'CgZTeW1ib2wSFgoGc2NoZW1lGAEgASgJUgZzY2hlbWUSJwoHcGFja2FnZRgCIAEoCzINLnNjaX' + 'AuUGFja2FnZVIHcGFja2FnZRIyCgtkZXNjcmlwdG9ycxgDIAMoCzIQLnNjaXAuRGVzY3JpcHRv' + 'clILZGVzY3JpcHRvcnM='); + @$core.Deprecated('Use packageDescriptor instead') -const Package$json = const { +const Package$json = { '1': 'Package', - '2': const [ - const {'1': 'manager', '3': 1, '4': 1, '5': 9, '10': 'manager'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'version', '3': 3, '4': 1, '5': 9, '10': 'version'}, + '2': [ + {'1': 'manager', '3': 1, '4': 1, '5': 9, '10': 'manager'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'version', '3': 3, '4': 1, '5': 9, '10': 'version'}, ], }; /// Descriptor for `Package`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List packageDescriptor = $convert.base64Decode('CgdQYWNrYWdlEhgKB21hbmFnZXIYASABKAlSB21hbmFnZXISEgoEbmFtZRgCIAEoCVIEbmFtZRIYCgd2ZXJzaW9uGAMgASgJUgd2ZXJzaW9u'); +final $typed_data.Uint8List packageDescriptor = $convert.base64Decode( + 'CgdQYWNrYWdlEhgKB21hbmFnZXIYASABKAlSB21hbmFnZXISEgoEbmFtZRgCIAEoCVIEbmFtZR' + 'IYCgd2ZXJzaW9uGAMgASgJUgd2ZXJzaW9u'); + @$core.Deprecated('Use descriptorDescriptor instead') -const Descriptor$json = const { +const Descriptor$json = { '1': 'Descriptor', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'disambiguator', '3': 2, '4': 1, '5': 9, '10': 'disambiguator'}, - const {'1': 'suffix', '3': 3, '4': 1, '5': 14, '6': '.scip.Descriptor.Suffix', '10': 'suffix'}, + '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'}, ], - '4': const [Descriptor_Suffix$json], + '4': [Descriptor_Suffix$json], }; @$core.Deprecated('Use descriptorDescriptor instead') -const Descriptor_Suffix$json = const { +const Descriptor_Suffix$json = { '1': 'Suffix', - '2': const [ - const {'1': 'UnspecifiedSuffix', '2': 0}, - const {'1': 'Namespace', '2': 1}, - const { + '2': [ + {'1': 'UnspecifiedSuffix', '2': 0}, + {'1': 'Namespace', '2': 1}, + { '1': 'Package', '2': 1, - '3': const {'1': true}, + '3': {'1': true}, }, - const {'1': 'Type', '2': 2}, - const {'1': 'Term', '2': 3}, - const {'1': 'Method', '2': 4}, - const {'1': 'TypeParameter', '2': 5}, - const {'1': 'Parameter', '2': 6}, - const {'1': 'Macro', '2': 9}, - const {'1': 'Meta', '2': 7}, - const {'1': 'Local', '2': 8}, + {'1': 'Type', '2': 2}, + {'1': 'Term', '2': 3}, + {'1': 'Method', '2': 4}, + {'1': 'TypeParameter', '2': 5}, + {'1': 'Parameter', '2': 6}, + {'1': 'Meta', '2': 7}, + {'1': 'Local', '2': 8}, + {'1': 'Macro', '2': 9}, ], - '3': const {'2': true}, + '3': {'2': true}, }; /// Descriptor for `Descriptor`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List descriptorDescriptor = $convert.base64Decode('CgpEZXNjcmlwdG9yEhIKBG5hbWUYASABKAlSBG5hbWUSJAoNZGlzYW1iaWd1YXRvchgCIAEoCVINZGlzYW1iaWd1YXRvchIvCgZzdWZmaXgYAyABKA4yFy5zY2lwLkRlc2NyaXB0b3IuU3VmZml4UgZzdWZmaXgipQEKBlN1ZmZpeBIVChFVbnNwZWNpZmllZFN1ZmZpeBAAEg0KCU5hbWVzcGFjZRABEg8KB1BhY2thZ2UQARoCCAESCAoEVHlwZRACEggKBFRlcm0QAxIKCgZNZXRob2QQBBIRCg1UeXBlUGFyYW1ldGVyEAUSDQoJUGFyYW1ldGVyEAYSCQoFTWFjcm8QCRIICgRNZXRhEAcSCQoFTG9jYWwQCBoCEAE='); +final $typed_data.Uint8List descriptorDescriptor = $convert.base64Decode( + 'CgpEZXNjcmlwdG9yEhIKBG5hbWUYASABKAlSBG5hbWUSJAoNZGlzYW1iaWd1YXRvchgCIAEoCV' + 'INZGlzYW1iaWd1YXRvchIvCgZzdWZmaXgYAyABKA4yFy5zY2lwLkRlc2NyaXB0b3IuU3VmZml4' + 'UgZzdWZmaXgipQEKBlN1ZmZpeBIVChFVbnNwZWNpZmllZFN1ZmZpeBAAEg0KCU5hbWVzcGFjZR' + 'ABEg8KB1BhY2thZ2UQARoCCAESCAoEVHlwZRACEggKBFRlcm0QAxIKCgZNZXRob2QQBBIRCg1U' + 'eXBlUGFyYW1ldGVyEAUSDQoJUGFyYW1ldGVyEAYSCAoETWV0YRAHEgkKBUxvY2FsEAgSCQoFTW' + 'Fjcm8QCRoCEAE='); + @$core.Deprecated('Use symbolInformationDescriptor instead') -const SymbolInformation$json = const { +const SymbolInformation$json = { '1': 'SymbolInformation', - '2': const [ - const {'1': 'symbol', '3': 1, '4': 1, '5': 9, '10': 'symbol'}, - const {'1': 'documentation', '3': 3, '4': 3, '5': 9, '10': 'documentation'}, - const {'1': 'relationships', '3': 4, '4': 3, '5': 11, '6': '.scip.Relationship', '10': 'relationships'}, + '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': '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': 'enclosing_symbol', '3': 8, '4': 1, '5': 9, '10': 'enclosingSymbol'}, + ], + '4': [SymbolInformation_Kind$json], +}; + +@$core.Deprecated('Use symbolInformationDescriptor instead') +const SymbolInformation_Kind$json = { + '1': 'Kind', + '2': [ + {'1': 'UnspecifiedKind', '2': 0}, + {'1': 'AbstractMethod', '2': 66}, + {'1': 'Accessor', '2': 72}, + {'1': 'Array', '2': 1}, + {'1': 'Assertion', '2': 2}, + {'1': 'AssociatedType', '2': 3}, + {'1': 'Attribute', '2': 4}, + {'1': 'Axiom', '2': 5}, + {'1': 'Boolean', '2': 6}, + {'1': 'Class', '2': 7}, + {'1': 'Constant', '2': 8}, + {'1': 'Constructor', '2': 9}, + {'1': 'Contract', '2': 62}, + {'1': 'DataFamily', '2': 10}, + {'1': 'Delegate', '2': 73}, + {'1': 'Enum', '2': 11}, + {'1': 'EnumMember', '2': 12}, + {'1': 'Error', '2': 63}, + {'1': 'Event', '2': 13}, + {'1': 'Fact', '2': 14}, + {'1': 'Field', '2': 15}, + {'1': 'File', '2': 16}, + {'1': 'Function', '2': 17}, + {'1': 'Getter', '2': 18}, + {'1': 'Grammar', '2': 19}, + {'1': 'Instance', '2': 20}, + {'1': 'Interface', '2': 21}, + {'1': 'Key', '2': 22}, + {'1': 'Lang', '2': 23}, + {'1': 'Lemma', '2': 24}, + {'1': 'Library', '2': 64}, + {'1': 'Macro', '2': 25}, + {'1': 'Method', '2': 26}, + {'1': 'MethodAlias', '2': 74}, + {'1': 'MethodReceiver', '2': 27}, + {'1': 'MethodSpecification', '2': 67}, + {'1': 'Message', '2': 28}, + {'1': 'Modifier', '2': 65}, + {'1': 'Module', '2': 29}, + {'1': 'Namespace', '2': 30}, + {'1': 'Null', '2': 31}, + {'1': 'Number', '2': 32}, + {'1': 'Object', '2': 33}, + {'1': 'Operator', '2': 34}, + {'1': 'Package', '2': 35}, + {'1': 'PackageObject', '2': 36}, + {'1': 'Parameter', '2': 37}, + {'1': 'ParameterLabel', '2': 38}, + {'1': 'Pattern', '2': 39}, + {'1': 'Predicate', '2': 40}, + {'1': 'Property', '2': 41}, + {'1': 'Protocol', '2': 42}, + {'1': 'ProtocolMethod', '2': 68}, + {'1': 'PureVirtualMethod', '2': 69}, + {'1': 'Quasiquoter', '2': 43}, + {'1': 'SelfParameter', '2': 44}, + {'1': 'Setter', '2': 45}, + {'1': 'Signature', '2': 46}, + {'1': 'SingletonClass', '2': 75}, + {'1': 'SingletonMethod', '2': 76}, + {'1': 'StaticDataMember', '2': 77}, + {'1': 'StaticEvent', '2': 78}, + {'1': 'StaticField', '2': 79}, + {'1': 'StaticMethod', '2': 80}, + {'1': 'StaticProperty', '2': 81}, + {'1': 'StaticVariable', '2': 82}, + {'1': 'String', '2': 48}, + {'1': 'Struct', '2': 49}, + {'1': 'Subscript', '2': 47}, + {'1': 'Tactic', '2': 50}, + {'1': 'Theorem', '2': 51}, + {'1': 'ThisParameter', '2': 52}, + {'1': 'Trait', '2': 53}, + {'1': 'TraitMethod', '2': 70}, + {'1': 'Type', '2': 54}, + {'1': 'TypeAlias', '2': 55}, + {'1': 'TypeClass', '2': 56}, + {'1': 'TypeClassMethod', '2': 71}, + {'1': 'TypeFamily', '2': 57}, + {'1': 'TypeParameter', '2': 58}, + {'1': 'Union', '2': 59}, + {'1': 'Value', '2': 60}, + {'1': 'Variable', '2': 61}, ], }; /// Descriptor for `SymbolInformation`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List symbolInformationDescriptor = $convert.base64Decode('ChFTeW1ib2xJbmZvcm1hdGlvbhIWCgZzeW1ib2wYASABKAlSBnN5bWJvbBIkCg1kb2N1bWVudGF0aW9uGAMgAygJUg1kb2N1bWVudGF0aW9uEjgKDXJlbGF0aW9uc2hpcHMYBCADKAsyEi5zY2lwLlJlbGF0aW9uc2hpcFINcmVsYXRpb25zaGlwcw=='); +final $typed_data.Uint8List symbolInformationDescriptor = $convert.base64Decode( + 'ChFTeW1ib2xJbmZvcm1hdGlvbhIWCgZzeW1ib2wYASABKAlSBnN5bWJvbBIkCg1kb2N1bWVudG' + 'F0aW9uGAMgAygJUg1kb2N1bWVudGF0aW9uEjgKDXJlbGF0aW9uc2hpcHMYBCADKAsyEi5zY2lw' + 'LlJlbGF0aW9uc2hpcFINcmVsYXRpb25zaGlwcxIwCgRraW5kGAUgASgOMhwuc2NpcC5TeW1ib2' + 'xJbmZvcm1hdGlvbi5LaW5kUgRraW5kEiEKDGRpc3BsYXlfbmFtZRgGIAEoCVILZGlzcGxheU5h' + 'bWUSRwoXc2lnbmF0dXJlX2RvY3VtZW50YXRpb24YByABKAsyDi5zY2lwLkRvY3VtZW50UhZzaW' + 'duYXR1cmVEb2N1bWVudGF0aW9uEikKEGVuY2xvc2luZ19zeW1ib2wYCCABKAlSD2VuY2xvc2lu' + 'Z1N5bWJvbCLUCQoES2luZBITCg9VbnNwZWNpZmllZEtpbmQQABISCg5BYnN0cmFjdE1ldGhvZB' + 'BCEgwKCEFjY2Vzc29yEEgSCQoFQXJyYXkQARINCglBc3NlcnRpb24QAhISCg5Bc3NvY2lhdGVk' + 'VHlwZRADEg0KCUF0dHJpYnV0ZRAEEgkKBUF4aW9tEAUSCwoHQm9vbGVhbhAGEgkKBUNsYXNzEA' + 'cSDAoIQ29uc3RhbnQQCBIPCgtDb25zdHJ1Y3RvchAJEgwKCENvbnRyYWN0ED4SDgoKRGF0YUZh' + 'bWlseRAKEgwKCERlbGVnYXRlEEkSCAoERW51bRALEg4KCkVudW1NZW1iZXIQDBIJCgVFcnJvch' + 'A/EgkKBUV2ZW50EA0SCAoERmFjdBAOEgkKBUZpZWxkEA8SCAoERmlsZRAQEgwKCEZ1bmN0aW9u' + 'EBESCgoGR2V0dGVyEBISCwoHR3JhbW1hchATEgwKCEluc3RhbmNlEBQSDQoJSW50ZXJmYWNlEB' + 'USBwoDS2V5EBYSCAoETGFuZxAXEgkKBUxlbW1hEBgSCwoHTGlicmFyeRBAEgkKBU1hY3JvEBkS' + 'CgoGTWV0aG9kEBoSDwoLTWV0aG9kQWxpYXMQShISCg5NZXRob2RSZWNlaXZlchAbEhcKE01ldG' + 'hvZFNwZWNpZmljYXRpb24QQxILCgdNZXNzYWdlEBwSDAoITW9kaWZpZXIQQRIKCgZNb2R1bGUQ' + 'HRINCglOYW1lc3BhY2UQHhIICgROdWxsEB8SCgoGTnVtYmVyECASCgoGT2JqZWN0ECESDAoIT3' + 'BlcmF0b3IQIhILCgdQYWNrYWdlECMSEQoNUGFja2FnZU9iamVjdBAkEg0KCVBhcmFtZXRlchAl' + 'EhIKDlBhcmFtZXRlckxhYmVsECYSCwoHUGF0dGVybhAnEg0KCVByZWRpY2F0ZRAoEgwKCFByb3' + 'BlcnR5ECkSDAoIUHJvdG9jb2wQKhISCg5Qcm90b2NvbE1ldGhvZBBEEhUKEVB1cmVWaXJ0dWFs' + 'TWV0aG9kEEUSDwoLUXVhc2lxdW90ZXIQKxIRCg1TZWxmUGFyYW1ldGVyECwSCgoGU2V0dGVyEC' + '0SDQoJU2lnbmF0dXJlEC4SEgoOU2luZ2xldG9uQ2xhc3MQSxITCg9TaW5nbGV0b25NZXRob2QQ' + 'TBIUChBTdGF0aWNEYXRhTWVtYmVyEE0SDwoLU3RhdGljRXZlbnQQThIPCgtTdGF0aWNGaWVsZB' + 'BPEhAKDFN0YXRpY01ldGhvZBBQEhIKDlN0YXRpY1Byb3BlcnR5EFESEgoOU3RhdGljVmFyaWFi' + 'bGUQUhIKCgZTdHJpbmcQMBIKCgZTdHJ1Y3QQMRINCglTdWJzY3JpcHQQLxIKCgZUYWN0aWMQMh' + 'ILCgdUaGVvcmVtEDMSEQoNVGhpc1BhcmFtZXRlchA0EgkKBVRyYWl0EDUSDwoLVHJhaXRNZXRo' + 'b2QQRhIICgRUeXBlEDYSDQoJVHlwZUFsaWFzEDcSDQoJVHlwZUNsYXNzEDgSEwoPVHlwZUNsYX' + 'NzTWV0aG9kEEcSDgoKVHlwZUZhbWlseRA5EhEKDVR5cGVQYXJhbWV0ZXIQOhIJCgVVbmlvbhA7' + 'EgkKBVZhbHVlEDwSDAoIVmFyaWFibGUQPQ=='); + @$core.Deprecated('Use relationshipDescriptor instead') -const Relationship$json = const { +const Relationship$json = { '1': 'Relationship', - '2': const [ - const {'1': 'symbol', '3': 1, '4': 1, '5': 9, '10': 'symbol'}, - const {'1': 'is_reference', '3': 2, '4': 1, '5': 8, '10': 'isReference'}, - const {'1': 'is_implementation', '3': 3, '4': 1, '5': 8, '10': 'isImplementation'}, - const {'1': 'is_type_definition', '3': 4, '4': 1, '5': 8, '10': 'isTypeDefinition'}, - const {'1': 'is_definition', '3': 5, '4': 1, '5': 8, '10': 'isDefinition'}, + '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_definition', '3': 5, '4': 1, '5': 8, '10': 'isDefinition'}, ], }; /// Descriptor for `Relationship`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List relationshipDescriptor = $convert.base64Decode('CgxSZWxhdGlvbnNoaXASFgoGc3ltYm9sGAEgASgJUgZzeW1ib2wSIQoMaXNfcmVmZXJlbmNlGAIgASgIUgtpc1JlZmVyZW5jZRIrChFpc19pbXBsZW1lbnRhdGlvbhgDIAEoCFIQaXNJbXBsZW1lbnRhdGlvbhIsChJpc190eXBlX2RlZmluaXRpb24YBCABKAhSEGlzVHlwZURlZmluaXRpb24SIwoNaXNfZGVmaW5pdGlvbhgFIAEoCFIMaXNEZWZpbml0aW9u'); +final $typed_data.Uint8List relationshipDescriptor = $convert.base64Decode( + 'CgxSZWxhdGlvbnNoaXASFgoGc3ltYm9sGAEgASgJUgZzeW1ib2wSIQoMaXNfcmVmZXJlbmNlGA' + 'IgASgIUgtpc1JlZmVyZW5jZRIrChFpc19pbXBsZW1lbnRhdGlvbhgDIAEoCFIQaXNJbXBsZW1l' + 'bnRhdGlvbhIsChJpc190eXBlX2RlZmluaXRpb24YBCABKAhSEGlzVHlwZURlZmluaXRpb24SIw' + 'oNaXNfZGVmaW5pdGlvbhgFIAEoCFIMaXNEZWZpbml0aW9u'); + @$core.Deprecated('Use occurrenceDescriptor instead') -const Occurrence$json = const { +const Occurrence$json = { '1': 'Occurrence', - '2': const [ - const {'1': 'range', '3': 1, '4': 3, '5': 5, '10': 'range'}, - const {'1': 'symbol', '3': 2, '4': 1, '5': 9, '10': 'symbol'}, - const {'1': 'symbol_roles', '3': 3, '4': 1, '5': 5, '10': 'symbolRoles'}, - const {'1': 'override_documentation', '3': 4, '4': 3, '5': 9, '10': 'overrideDocumentation'}, - const {'1': 'syntax_kind', '3': 5, '4': 1, '5': 14, '6': '.scip.SyntaxKind', '10': 'syntaxKind'}, - const {'1': 'diagnostics', '3': 6, '4': 3, '5': 11, '6': '.scip.Diagnostic', '10': 'diagnostics'}, + '2': [ + {'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': 'enclosing_range', '3': 7, '4': 3, '5': 5, '10': 'enclosingRange'}, ], }; /// Descriptor for `Occurrence`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List occurrenceDescriptor = $convert.base64Decode('CgpPY2N1cnJlbmNlEhQKBXJhbmdlGAEgAygFUgVyYW5nZRIWCgZzeW1ib2wYAiABKAlSBnN5bWJvbBIhCgxzeW1ib2xfcm9sZXMYAyABKAVSC3N5bWJvbFJvbGVzEjUKFm92ZXJyaWRlX2RvY3VtZW50YXRpb24YBCADKAlSFW92ZXJyaWRlRG9jdW1lbnRhdGlvbhIxCgtzeW50YXhfa2luZBgFIAEoDjIQLnNjaXAuU3ludGF4S2luZFIKc3ludGF4S2luZBIyCgtkaWFnbm9zdGljcxgGIAMoCzIQLnNjaXAuRGlhZ25vc3RpY1ILZGlhZ25vc3RpY3M='); +final $typed_data.Uint8List occurrenceDescriptor = $convert.base64Decode( + 'CgpPY2N1cnJlbmNlEhQKBXJhbmdlGAEgAygFUgVyYW5nZRIWCgZzeW1ib2wYAiABKAlSBnN5bW' + 'JvbBIhCgxzeW1ib2xfcm9sZXMYAyABKAVSC3N5bWJvbFJvbGVzEjUKFm92ZXJyaWRlX2RvY3Vt' + 'ZW50YXRpb24YBCADKAlSFW92ZXJyaWRlRG9jdW1lbnRhdGlvbhIxCgtzeW50YXhfa2luZBgFIA' + 'EoDjIQLnNjaXAuU3ludGF4S2luZFIKc3ludGF4S2luZBIyCgtkaWFnbm9zdGljcxgGIAMoCzIQ' + 'LnNjaXAuRGlhZ25vc3RpY1ILZGlhZ25vc3RpY3MSJwoPZW5jbG9zaW5nX3JhbmdlGAcgAygFUg' + '5lbmNsb3NpbmdSYW5nZQ=='); + @$core.Deprecated('Use diagnosticDescriptor instead') -const Diagnostic$json = const { +const Diagnostic$json = { '1': 'Diagnostic', - '2': const [ - const {'1': 'severity', '3': 1, '4': 1, '5': 14, '6': '.scip.Severity', '10': 'severity'}, - const {'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, - const {'1': 'message', '3': 3, '4': 1, '5': 9, '10': 'message'}, - const {'1': 'source', '3': 4, '4': 1, '5': 9, '10': 'source'}, - const {'1': 'tags', '3': 5, '4': 3, '5': 14, '6': '.scip.DiagnosticTag', '10': 'tags'}, + '2': [ + {'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'}, ], }; /// Descriptor for `Diagnostic`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List diagnosticDescriptor = $convert.base64Decode('CgpEaWFnbm9zdGljEioKCHNldmVyaXR5GAEgASgOMg4uc2NpcC5TZXZlcml0eVIIc2V2ZXJpdHkSEgoEY29kZRgCIAEoCVIEY29kZRIYCgdtZXNzYWdlGAMgASgJUgdtZXNzYWdlEhYKBnNvdXJjZRgEIAEoCVIGc291cmNlEicKBHRhZ3MYBSADKA4yEy5zY2lwLkRpYWdub3N0aWNUYWdSBHRhZ3M='); +final $typed_data.Uint8List diagnosticDescriptor = $convert.base64Decode( + 'CgpEaWFnbm9zdGljEioKCHNldmVyaXR5GAEgASgOMg4uc2NpcC5TZXZlcml0eVIIc2V2ZXJpdH' + 'kSEgoEY29kZRgCIAEoCVIEY29kZRIYCgdtZXNzYWdlGAMgASgJUgdtZXNzYWdlEhYKBnNvdXJj' + 'ZRgEIAEoCVIGc291cmNlEicKBHRhZ3MYBSADKA4yEy5zY2lwLkRpYWdub3N0aWNUYWdSBHRhZ3' + 'M='); + diff --git a/lib/src/gen/scip.pbserver.dart b/lib/src/gen/scip.pbserver.dart index faeeb920..cfbeb5df 100644 --- a/lib/src/gen/scip.pbserver.dart +++ b/lib/src/gen/scip.pbserver.dart @@ -1,9 +1,14 @@ -/// +// // Generated code. Do not modify. // source: lib/src/gen/scip.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import export 'scip.pb.dart'; diff --git a/lib/src/gen/scip.proto b/lib/src/gen/scip.proto index f1492a22..9e292a27 100644 --- a/lib/src/gen/scip.proto +++ b/lib/src/gen/scip.proto @@ -1,5 +1,5 @@ /// Comes From: https://github.com/sourcegraph/scip/blob/main/scip.proto -/// scip v0.2.3 +/// scip v0.3.3 // An index contains one or more pieces of information about a given piece of // source code or software artifact. Complementary information can be merged @@ -34,6 +34,8 @@ message Index { // external package won't get indexed for some reason then you can use this // field to provide hover documentation for those external symbols. repeated SymbolInformation external_symbols = 3; + // IMPORTANT: When adding a new field to `Index` here, add a matching + // function in `IndexVisitor` and update `ParseStreaming`. } message Metadata { @@ -46,7 +48,8 @@ message Metadata { // directory. string project_root = 3; // Text encoding of the source files on disk that are referenced from - // `Document.relative_path`. + // `Document.relative_path`. This value is unrelated to the `Document.text` + // field, which is a Protobuf string and hence must be UTF-8 encoded. TextEncoding text_document_encoding = 4; } @@ -73,7 +76,7 @@ message ToolInfo { message Document { // The string ID for the programming language this file is written in. // The `Language` enum contains the names of most common programming languages. - // This field is typed as a string to permit any programming langauge, including + // This field is typed as a string to permit any programming language, including // ones that are not specified by the `Language` enum. string language = 4; // (Required) Unique path to the text document. @@ -94,8 +97,55 @@ message Document { // but have a reference and are defined by some other symbol (see // Relationship.is_definition). repeated SymbolInformation symbols = 3; + + // (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 + // contents from the file system by resolving the absolute path from joining + // `Index.metadata.project_root` and `Document.relative_path`. This field was + // introduced to support `SymbolInformation.signature_documentation`, but it + // can be used for other purposes as well, for example testing or when working + // with virtual/in-memory documents. + string text = 5; + + // 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. + PositionEncoding position_encoding = 6; } +// Encoding used to interpret the 'character' value in source ranges. +enum PositionEncoding { + // Default value. This value should not be used by new SCIP indexers + // so that a consumer can process the SCIP index without ambiguity. + UnspecifiedPositionEncoding = 0; + // 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. + UTF8CodeUnitOffsetFromLineStart = 1; + // 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. + UTF16CodeUnitOffsetFromLineStart = 2; + // 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. + UTF32CodeUnitOffsetFromLineStart = 3; +} // Symbol is similar to a URI, it identifies a class, method, or a local // variable. `SymbolInformation` contains rich metadata about symbols such as @@ -111,11 +161,12 @@ message Document { // ::= same as above, use the placeholder '.' to indicate an empty value // ::= same as above // ::= same as above -// ::= | | | | | | +// ::= | | | | | | | // ::= '/' // ::= '#' // ::= '.' // ::= ':' +// ::= '!' // ::= '(' ').' // ::= '[' ']' // ::= '(' ')' @@ -126,6 +177,7 @@ message Document { // ::= '_' | '+' | '-' | '$' | ASCII letter or digit // ::= '`' ()+ '`' // ::= any UTF-8 character, escape backticks with double backtick. +// ::= // ``` // // The list of descriptors for a symbol should together form a fully @@ -133,6 +185,9 @@ message Document { // 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. message Symbol { string scheme = 1; Package package = 2; @@ -163,10 +218,10 @@ message Descriptor { Method = 4; TypeParameter = 5; Parameter = 6; - Macro = 9; // Can be used for any purpose. Meta = 7; Local = 8; + Macro = 9; } string name = 1; string disambiguator = 2; @@ -180,14 +235,208 @@ message SymbolInformation { // The string must be formatted according to the grammar in `Symbol`. string symbol = 1; // (optional, but strongly recommended) The markdown-formatted documentation - // for this symbol. This field is repeated to allow different kinds of - // documentation. For example, it's nice to include both the signature of a - // method (parameters and return type) along with the accompanying docstring. + // for this symbol. Use `SymbolInformation.signature_documentation` to + // document the method/class/type signature of this symbol. + // Due to historical reasons, indexers may include signature documentation in + // this field by rendering markdown code blocks. New indexers should only + // include non-code documentation in this field, for example docstrings. repeated string documentation = 3; // (optional) Relationships to other symbols (e.g., implements, type definition). repeated Relationship relationships = 4; + // The kind of this symbol. Use this field instead of + // `SymbolDescriptor.Suffix` to determine whether something is, for example, a + // class or a method. + Kind kind = 5; + // (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`. + // + // 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. + enum Kind { + UnspecifiedKind = 0; + // A method which may or may not have a body. For Java, Kotlin etc. + AbstractMethod = 66; + // For Ruby's attr_accessor + Accessor = 72; + Array = 1; + // For Alloy + Assertion = 2; + AssociatedType = 3; + // For C++ + Attribute = 4; + // For Lean + Axiom = 5; + Boolean = 6; + Class = 7; + Constant = 8; + Constructor = 9; + // For Solidity + Contract = 62; + // For Haskell + DataFamily = 10; + // For C# and F# + Delegate = 73; + Enum = 11; + EnumMember = 12; + Error = 63; + Event = 13; + // For Alloy + Fact = 14; + Field = 15; + File = 16; + Function = 17; + // For 'get' in Swift, 'attr_reader' in Ruby + Getter = 18; + // For Raku + Grammar = 19; + // For Purescript and Lean + Instance = 20; + Interface = 21; + Key = 22; + // For Racket + Lang = 23; + // For Lean + Lemma = 24; + // For solidity + Library = 64; + Macro = 25; + Method = 26; + // For Ruby + MethodAlias = 74; + // Analogous to 'ThisParameter' and 'SelfParameter', but for languages + // like Go where the receiver doesn't have a conventional name. + MethodReceiver = 27; + // Analogous to 'AbstractMethod', for Go. + MethodSpecification = 67; + // For Protobuf + Message = 28; + // For Solidity + Modifier = 65; + Module = 29; + Namespace = 30; + Null = 31; + Number = 32; + Object = 33; + Operator = 34; + Package = 35; + PackageObject = 36; + Parameter = 37; + ParameterLabel = 38; + // For Haskell's PatternSynonyms + Pattern = 39; + // For Alloy + Predicate = 40; + Property = 41; + // Analogous to 'Trait' and 'TypeClass', for Swift and Objective-C + Protocol = 42; + // Analogous to 'AbstractMethod', for Swift and Objective-C. + ProtocolMethod = 68; + // Analogous to 'AbstractMethod', for C++. + PureVirtualMethod = 69; + // For Haskell + Quasiquoter = 43; + // 'self' in Python, Rust, Swift etc. + SelfParameter = 44; + // For 'set' in Swift, 'attr_writer' in Ruby + Setter = 45; + // For Alloy, analogous to 'Struct'. + Signature = 46; + // For Ruby + SingletonClass = 75; + // Analogous to 'StaticMethod', for Ruby. + SingletonMethod = 76; + // Analogous to 'StaticField', for C++ + StaticDataMember = 77; + // For C# + StaticEvent = 78; + // For C# + StaticField = 79; + // For Java, C#, C++ etc. + StaticMethod = 80; + // For C#, TypeScript etc. + StaticProperty = 81; + // For C, C++ + StaticVariable = 82; + String = 48; + Struct = 49; + // For Swift + Subscript = 47; + // For Lean + Tactic = 50; + // For Lean + Theorem = 51; + // Method receiver for languages + // 'this' in JavaScript, C++, Java etc. + ThisParameter = 52; + // Analogous to 'Protocol' and 'TypeClass', for Rust, Scala etc. + Trait = 53; + // Analogous to 'AbstractMethod', for Rust, Scala etc. + TraitMethod = 70; + // Data type definition for languages like OCaml which use `type` + // rather than separate keywords like `struct` and `enum`. + Type = 54; + TypeAlias = 55; + // Analogous to 'Trait' and 'Protocol', for Haskell, Purescript etc. + TypeClass = 56; + // Analogous to 'AbstractMethod', for Haskell, Purescript etc. + TypeClassMethod = 71; + // For Haskell + TypeFamily = 57; + TypeParameter = 58; + // For C, C++, Capn Proto + Union = 59; + Value = 60; + Variable = 61; + // Next = 83; + // Feel free to open a PR proposing new language-specific kinds. + } + // (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. + string display_name = 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 + // two numbers this would have `Document.language = "java"` and `Document.text + // = "void add(int a, int b)". The `language` and `text` fields are required + // while other fields such as `Documentation.occurrences` can be optionally + // included to support hyperlinking referenced symbols in the signature. + Document signature_documentation = 7; + // (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. + string enclosing_symbol = 8; } + message Relationship { string symbol = 1; // When resolving "Find references", this field documents what other symbols @@ -201,9 +450,9 @@ message Relationship { // ^^^^^ definition Animal#sound() // } // class Dog implements Animal { - // ^^^ definition Dog#, implementation_symbols = Animal# + // ^^^ definition Dog#, relationships = [{symbol: "Animal#", is_implementation: true}] // public sound(): string { return "woof" } - // ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), implementation_symbols = Animal#sound() + // ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), relationships = [{symbol: "Animal#sound()", is_implementation:true, is_reference: true}] // } // const animal: Animal = new Dog() // ^^^^^^ reference Animal# @@ -215,14 +464,14 @@ message Relationship { // references" on the `Dog#sound()` method should include references to the // `Animal#sound()` method as well. bool is_reference = 2; - // Similar to `references_symbols` but for "Go to implementation". - // It's common for the `implementation_symbols` and `references_symbols` fields - // have the same values but that's not always the case. - // In the TypeScript example above, observe that `implementation_symbols` has - // the value `"Animal#"` for the "Dog#" symbol while `references_symbols` is - // empty. When requesting "Find references" on the "Animal#" symbol we don't - // want to include references to "Dog#" even if "Go to implementation" on the - // "Animal#" symbol should navigate to the "Dog#" symbol. + // Similar to `is_reference` but for "Find implementations". + // It's common for `is_implementation` and `is_reference` to both be true but + // it's not always the case. + // In the TypeScript example above, observe that `Dog#` has an + // `is_implementation` relationship with `"Animal#"` but not `is_reference`. + // This is because "Find references" on the "Animal#" symbol should not return + // "Dog#". We only want "Dog#" to return as a result for "Find + // implementations" on the "Animal#" symbol. bool is_implementation = 3; // Similar to `references_symbols` but for "Go to type definition". bool is_type_definition = 4; @@ -246,7 +495,7 @@ message Relationship { // Update registerInverseRelationships on adding a new field here. } -// SymbolRole declares what "role" a symbol has in an occurrence. A role is +// SymbolRole declares what "role" a symbol has in an occurrence. A role is // encoded as a bitset where each bit represents a different role. For example, // to determine if the `Import` role is set, test whether the second bit of the // enum value is defined. In pseudocode, this can be implemented with the @@ -267,6 +516,12 @@ enum SymbolRole { Generated = 0x10; // Is the symbol in test code? Test = 0x20; + // 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. + ForwardDefinition = 0x40; } enum SyntaxKind { @@ -381,11 +636,14 @@ message Occurrence { // 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. + // // 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 + // 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. repeated int32 range = 1; @@ -408,6 +666,59 @@ message Occurrence { SyntaxKind syntax_kind = 5; // (optional) Diagnostics that have been reported for this specific range. repeated Diagnostic diagnostics = 6; + // (optional) Using the same encoding as the sibling `range` field, source + // position 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 + // + // 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 <---------------------------------------| + // ``` + // + // 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-----------------------| + // + // ``` + // + // 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 + // ``` + repeated int32 enclosing_range = 7; } // Represents a diagnostic, such as a compiler error or warning, which should be @@ -443,11 +754,12 @@ enum DiagnosticTag { // for the `Document.language` field. The primary purpose of this enum is to // prevent a situation where we have a single programming language ends up with // multiple string representations. For example, the C++ language uses the name -// "CPlusPlus" in this enum and other names such as "cpp" are incompatible. +// "CPP" in this enum and other names such as "cpp" are incompatible. // Feel free to send a pull-request to add missing programming languages. enum Language { UnspecifiedLanguage = 0; ABAP = 60; + Apex = 96; APL = 49; Ada = 39; Agda = 45; @@ -465,6 +777,7 @@ enum Language { Coffeescript = 21; CommonLisp = 9; Coq = 47; + CUDA = 97; Dart = 3; Delphi = 57; Diff = 88; @@ -480,6 +793,7 @@ enum Language { Git_Config = 89; Git_Rebase = 92; Go = 33; + GraphQL = 98; Groovy = 7; HTML = 30; Hack = 20; @@ -494,28 +808,34 @@ enum Language { JavaScriptReact = 93; Jsonnet = 76; Julia = 55; + Justfile = 109; Kotlin = 4; LaTeX = 83; Lean = 48; Less = 27; Lua = 12; + Luau = 108; Makefile = 79; Markdown = 84; Matlab = 52; + Nickel = 110; // https://nickel-lang.org/ Nix = 77; OCaml = 41; Objective_C = 36; Objective_CPP = 37; + Pascal = 99; PHP = 19; PLSQL = 70; Perl = 13; PowerShell = 67; Prolog = 71; + Protobuf = 100; Python = 15; R = 54; Racket = 11; Raku = 14; Razor = 62; + Repro = 102; // Internal language for testing SCIP ReST = 85; Ruby = 16; Rust = 40; @@ -528,11 +848,18 @@ enum Language { Scheme = 10; ShellScript = 64; // Bash Skylark = 78; + Slang = 107; + Solidity = 95; + Svelte = 106; Swift = 2; + Tcl = 101; TOML = 73; TeX = 82; + Thrift = 103; TypeScript = 23; TypeScriptReact = 94; + Verilog = 104; + VHDL = 105; VisualBasic = 63; Vue = 25; Wolfram = 53; @@ -540,7 +867,7 @@ enum Language { XSL = 32; YAML = 74; Zig = 38; - // NextLanguage = 95; + // NextLanguage = 111; // Steps add a new language: // 1. Copy-paste the "NextLanguage = N" line above // 2. Increment "NextLanguage = N" to "NextLanguage = N+1" diff --git a/lib/src/metadata.dart b/lib/src/metadata.dart index cc9c2521..1c28b8ab 100644 --- a/lib/src/metadata.dart +++ b/lib/src/metadata.dart @@ -25,11 +25,16 @@ const _unusedHintCodes = { /// Use [getSymbolMetadata] to retrieve [SymbolMetadata] for a provided /// [Element] type. class SymbolMetadata { - List documentation; + proto.Document signatureDocumentation; + List? documentation; List? diagnostics; - SymbolMetadata({required this.documentation, this.diagnostics}); + SymbolMetadata({ + required this.signatureDocumentation, + this.documentation, + this.diagnostics, + }); } /// Returns a [SymbolMetadata] object for a provided [Element] type. @@ -65,10 +70,11 @@ SymbolMetadata getSymbolMetadata( .toList(); return SymbolMetadata( - documentation: [ - '```dart\n$displayString\n```', - if (docComment != null) docComment - ], + signatureDocumentation: proto.Document( + language: proto.Language.Dart.name, + text: displayString, + ), + documentation: docComment != null ? [docComment] : null, diagnostics: diagnostics.isNotEmpty ? diagnostics : null, ); } diff --git a/lib/src/scip_visitor.dart b/lib/src/scip_visitor.dart index 49c35f29..fe0e021b 100644 --- a/lib/src/scip_visitor.dart +++ b/lib/src/scip_visitor.dart @@ -177,6 +177,7 @@ class ScipVisitor extends GeneralizingAstVisitor { globalExternalSymbols.add(SymbolInformation( symbol: symbol, documentation: meta.documentation, + signatureDocumentation: meta.signatureDocumentation, )); } } @@ -200,6 +201,7 @@ class ScipVisitor extends GeneralizingAstVisitor { symbol: symbol, documentation: meta.documentation, relationships: relationships, + signatureDocumentation: meta.signatureDocumentation, )); occurrences.add(Occurrence( diff --git a/pubspec.lock b/pubspec.lock index 0735fca6..ab4ca4f5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: e440ac42679dfc04bbbefb58ed225c994bc7e07fccc8a68ec7d3631a127e5da9 + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "54.0.0" + version: "61.0.0" analyzer: dependency: "direct main" description: name: analyzer - sha256: "2c2e3721ee9fb36de92faa060f3480c81b23e904352b087e5c64224b1a044427" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.13.0" args: dependency: "direct main" description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" async: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" build_runner: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.7+1" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.8.0" chalk: dependency: "direct dev" description: @@ -117,18 +117,18 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" code_builder: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.7.0" collection: dependency: transitive description: @@ -149,10 +149,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" dart_dev: dependency: "direct dev" description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "2.3.2" dependency_validator: dependency: "direct dev" description: @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" frontend_server_client: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: "direct dev" description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: @@ -245,26 +245,26 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" logging: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" mime: dependency: transitive description: @@ -317,10 +317,10 @@ packages: dependency: "direct main" description: name: protobuf - sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "3.1.0" pub_semver: dependency: transitive description: @@ -365,18 +365,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -453,9 +453,9 @@ packages: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.19.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index d23a161a..d208b524 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: args: ^2.4.0 package_config: ^2.1.0 path: ^1.8.3 - protobuf: ^2.1.0 + protobuf: ^3.1.0 pubspec_parse: ^1.2.1 dev_dependencies: diff --git a/skynet.yaml b/skynet.yaml deleted file mode 100644 index c7bbc82c..00000000 --- a/skynet.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: empty -contact: Contact "@matthew.nitschke" via slack -image: drydock.workiva.net/workiva/skynet-images:bash_curl_alpinelatest-latest - -size: small -timeout: short - -run: - on-tag: true - on-pull-request: true - -scripts: - - echo "CI in .github/workflows" \ No newline at end of file diff --git a/snapshots/input/basic-project/lib/main.dart b/snapshots/input/basic-project/lib/main.dart index cbb519c9..26437877 100644 --- a/snapshots/input/basic-project/lib/main.dart +++ b/snapshots/input/basic-project/lib/main.dart @@ -43,5 +43,5 @@ class SomeLocalClass {} /// Reference external class: [Foo] /// Missing Reference: [IDontExist] void someFunction(int value) { - Foo(1); + Foo(1, value: true, value2: ''); } \ No newline at end of file diff --git a/snapshots/input/basic-project/lib/other.dart b/snapshots/input/basic-project/lib/other.dart index 36a9d4c7..810b501f 100644 --- a/snapshots/input/basic-project/lib/other.dart +++ b/snapshots/input/basic-project/lib/other.dart @@ -4,8 +4,15 @@ class Foo { int _far; bool value; String value2; - double value3; - Foo(this._far); + double? value3; + Foo( + this._far, { + required this.value, + required this.value2, + this.value3, + }) { + print(_far); + } } class Bar { @@ -23,11 +30,13 @@ void main() { Bar('a').someMethod.call() }); - Foo()..value = false; + Foo(1, value: true, value2: 'asdf')..value = false; final someStr = 'someStr'; - Foo() + Foo(2, value: false, value2: 'some Val!') ..value = true ..value2 = someStr - ..value3 = 2.15 + ..value3 = 2.15; + + more.test((_) => 'val'); } \ No newline at end of file diff --git a/snapshots/input/diagnostics/lib/main.dart b/snapshots/input/diagnostics/lib/main.dart index b6753eef..d33ba6a8 100644 --- a/snapshots/input/diagnostics/lib/main.dart +++ b/snapshots/input/diagnostics/lib/main.dart @@ -4,7 +4,7 @@ class _UnusedClass {} void _unusedMethod() {} -String _unusedTopLevelVariable = 'asdf'; +final _unusedTopLevelVariable = 'asdf'; @Deprecated('This method is deprecated') void deprecatedMethod() {} @@ -16,7 +16,7 @@ void deprecatedParam({ void main() { final unusedVariable = 'asdf'; - String variableWithUnecssaryDeclaration = 'asdf'; + final variableWithUnnecessaryDeclaration = 'asdf'; // dead_code example if (true) { } else { @@ -25,6 +25,7 @@ void main() { deprecatedMethod(); deprecatedParam(foobar: 2); + someDeprecatedFunc(); } @deprecated diff --git a/snapshots/output/basic-project/lib/main.dart b/snapshots/output/basic-project/lib/main.dart index cdaed412..37fd5659 100755 --- a/snapshots/output/basic-project/lib/main.dart +++ b/snapshots/output/basic-project/lib/main.dart @@ -9,19 +9,11 @@ //^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // documentation -// > ```dart -// > int fib(int n) -// > ``` -// documentation // > This is a fib function // > Takes a number // > Returns a number // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 0 -// documentation -// > ```dart -// > int n -// > ``` if (n <= 1) return 0; // ^ reference local 0 return fib(n - 1) + fib(n - 2); @@ -33,16 +25,8 @@ void print_fib(int a) { // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// documentation -// > ```dart -// > void print_fib(int a) -// > ``` // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 1 -// documentation -// > ```dart -// > int a -// > ``` print(fib(a)); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). @@ -51,50 +35,26 @@ final y = 'Hello'; // ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. -// documentation -// > ```dart -// > String y -// > ``` String capture() { //^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). -// documentation -// > ```dart -// > String capture() -// > ``` return y; // ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. } final capture_lambda = () => y; // ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. -// documentation -// > ```dart -// > String Function() capture_lambda -// > ``` // ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` for (var i = 0; i <= 10; i++) {} // ^ definition local 2 -// documentation -// > ```dart -// > int i -// > ``` // ^ reference local 2 // ^ reference local 2 for (var i in [1, 2, 3]) { // ^ definition local 3 -// documentation -// > ```dart -// > int i -// > ``` print(i); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^ reference local 3 @@ -102,10 +62,6 @@ var a = 0; // ^ definition local 4 -// documentation -// > ```dart -// > int a -// > ``` a = 1; // ^ reference local 4 print_fib(a); @@ -115,20 +71,12 @@ void forever() { // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). -// documentation -// > ```dart -// > void forever() -// > ``` return forever(); // ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). } class SomeLocalClass {} // ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# -// documentation -// > ```dart -// > class SomeLocalClass -// > ``` /// Reference parameter: [value] // ^^^^^ reference local 5 @@ -140,20 +88,14 @@ void someFunction(int value) { // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). // documentation -// > ```dart -// > void someFunction(int value) -// > ``` -// documentation // > Reference parameter: [value] // > Reference class: [SomeLocalClass] // > Reference external class: [Foo] // > Missing Reference: [IDontExist] // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^ definition local 5 -// documentation -// > ```dart -// > int value -// > ``` - Foo(1); + Foo(1, value: true, value2: ''); // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) } diff --git a/snapshots/output/basic-project/lib/more.dart b/snapshots/output/basic-project/lib/more.dart index 9857ba25..68773981 100755 --- a/snapshots/output/basic-project/lib/more.dart +++ b/snapshots/output/basic-project/lib/more.dart @@ -1,56 +1,24 @@ import 'dart:math' as math; // definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// documentation -// > ```dart -// > as math -// > ``` enum AnimalType { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// documentation -// > ```dart -// > enum AnimalType -// > ``` cat, // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. -// documentation -// > ```dart -// > AnimalType cat -// > ``` dog, // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. -// documentation -// > ```dart -// > AnimalType dog -// > ``` bird, // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. -// documentation -// > ```dart -// > AnimalType bird -// > ``` } typedef SoundMaker = void Function(); // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# -// documentation -// > ```dart -// > typedef SoundMaker = void Function() -// > ``` mixin SleepMixin { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# -// documentation -// > ```dart -// > mixin SleepMixin on Object -// > ``` void sleep() { // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). -// documentation -// > ```dart -// > void sleep() -// > ``` print('zzz...'); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } @@ -58,53 +26,25 @@ class Animal with SleepMixin { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// documentation -// > ```dart -// > class Animal with SleepMixin -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# String name; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// documentation -// > ```dart -// > String name -// > ``` AnimalType type; // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. -// documentation -// > ```dart -// > AnimalType type -// > ``` SoundMaker? soundMaker; // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// documentation -// > ```dart -// > void Function() soundMaker -// > ``` Animal(this.name, {required this.type}) { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// documentation -// > ```dart -// > Animal Animal(String name, {required AnimalType type}) -// > ``` // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // ^^^^ definition local 0 -// documentation -// > ```dart -// > String name -// > ``` // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// documentation -// > ```dart -// > {required AnimalType type} -// > ``` switch (type) { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. case AnimalType.cat: @@ -137,10 +77,6 @@ void makeSound() { // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). -// documentation -// > ```dart -// > void makeSound() -// > ``` soundMaker?.call(); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. } @@ -150,10 +86,6 @@ String toString() { // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). -// documentation -// > ```dart -// > String toString() -// > ``` // relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference return '$name the $type'; // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. @@ -164,65 +96,33 @@ int calculateSum(List numbers) { //^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// documentation -// > ```dart -// > int calculateSum(List numbers) -// > ``` // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 1 -// documentation -// > ```dart -// > List numbers -// > ``` return numbers.reduce((value, element) => value + element); // ^^^^^^^ reference local 1 // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^^^^^ definition local 2 -// documentation -// > ```dart -// > int value -// > ``` // ^^^^^^^ definition local 3 -// documentation -// > ```dart -// > int element -// > ``` // ^^^^^ reference local 2 // ^^^^^^^ reference local 3 } void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` List numbers = [1, 2, 3, 4, 5]; // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 4 -// documentation -// > ```dart -// > List numbers -// > ``` int sum = calculateSum(numbers); // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^ definition local 5 -// documentation -// > ```dart -// > int sum -// > ``` // ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). // ^^^^^^^ reference local 4 Animal cat = Animal('Kitty', type: AnimalType.cat); // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^ definition local 6 -// documentation -// > ```dart -// > Animal cat -// > ``` // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# @@ -230,10 +130,6 @@ Animal dog = Animal('Buddy', type: AnimalType.dog); // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^ definition local 7 -// documentation -// > ```dart -// > Animal dog -// > ``` // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# @@ -272,42 +168,18 @@ [1,2].reduce((a, b) => a + b); // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^ definition local 8 -// documentation -// > ```dart -// > int a -// > ``` // ^ definition local 9 -// documentation -// > ```dart -// > int b -// > ``` // ^ reference local 8 // ^ reference local 9 } void test(String Function(int) p) {} // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). -// documentation -// > ```dart -// > void test(String Function(int) p) -// > ``` // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 10 -// documentation -// > ```dart -// > String Function(int) p -// > ``` void deepTest(String Function(void Function(String test)) p) {} // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). -// documentation -// > ```dart -// > void deepTest(String Function(void Function(String)) p) -// > ``` // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^ definition local 11 -// documentation -// > ```dart -// > String Function(void Function(String)) p -// > ``` diff --git a/snapshots/output/basic-project/lib/other.dart b/snapshots/output/basic-project/lib/other.dart index be295c20..ef81825b 100755 --- a/snapshots/output/basic-project/lib/other.dart +++ b/snapshots/output/basic-project/lib/other.dart @@ -1,107 +1,56 @@ import 'more.dart' deferred as more; // definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// documentation -// > ```dart -// > as more -// > ``` class Foo { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// documentation -// > ```dart -// > class Foo -// > ``` int _far; // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^ definition local 0 -// documentation -// > ```dart -// > int _far -// > ``` -// diagnostic Information: -// > The value of the field '_far' isn't used. bool value; // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. -// documentation -// > ```dart -// > bool value -// > ``` String value2; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// documentation -// > ```dart -// > String value2 -// > ``` - double value3; + double? value3; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. -// documentation -// > ```dart -// > double value3 -// > ``` - Foo(this._far); +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + Foo( // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// documentation -// > ```dart -// > Foo Foo(int _far) -// > ``` -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. -// ^^^^ reference local 0 -// ^^^^ definition local 1 -// documentation -// > ```dart -// > int _far -// > ``` + this._far, { +// ^^^^ reference local 0 +// ^^^^ definition local 1 + required this.value, +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) + required this.value2, +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) + this.value3, +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value3) + }) { + print(_far); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 0 + } } class Bar { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// documentation -// > ```dart -// > class Bar -// > ``` String _someValue; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^^ definition local 2 -// documentation -// > ```dart -// > String _someValue -// > ``` Bar(this._someValue); // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). -// documentation -// > ```dart -// > Bar Bar(String _someValue) -// > ``` // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# // ^^^^ reference local 2 // ^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String _someValue -// > ``` void someMethod() { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). -// documentation -// > ```dart -// > void someMethod() -// > ``` _someValue = 'asdf'; // ^^^^^^^^^^ reference local 2 print(_someValue); @@ -112,40 +61,37 @@ void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` more.loadLibrary().then((_) => { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. // ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). // ^ definition local 4 -// documentation -// > ```dart -// > dynamic _ -// > ``` Bar('a').someMethod.call() // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). }); - Foo()..value = false; + Foo(1, value: true, value2: 'asdf')..value = false; // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. final someStr = 'someStr'; // ^^^^^^^ definition local 5 -// documentation -// > ```dart -// > String someStr -// > ``` - Foo() + Foo(2, value: false, value2: 'some Val!') // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) ..value = true // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. ..value2 = someStr // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. // ^^^^^^^ reference local 5 - ..value3 = 2.15 + ..value3 = 2.15; // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + + more.test((_) => 'val'); +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). +// ^ definition local 6 } diff --git a/snapshots/output/basic-project/lib/relationships.dart b/snapshots/output/basic-project/lib/relationships.dart index 174afc43..25ee4e05 100755 --- a/snapshots/output/basic-project/lib/relationships.dart +++ b/snapshots/output/basic-project/lib/relationships.dart @@ -1,57 +1,29 @@ abstract class Mammal { // definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# -// documentation -// > ```dart -// > abstract class Mammal -// > ``` String get hierarchy; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` } abstract class Animal extends Mammal { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// documentation -// > ```dart -// > abstract class Animal extends Mammal -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# String sound() => 'NOISE!'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` } mixin SwimAction { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# -// documentation -// > ```dart -// > mixin SwimAction on Object -// > ``` void execute() => print('swimming...'); // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). -// documentation -// > ```dart -// > void execute() -// > ``` // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } class Dog extends Animal with SwimAction { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# -// documentation -// > ```dart -// > class Dog extends Animal with SwimAction -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation @@ -62,10 +34,6 @@ String sound() => 'woof'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference @override @@ -73,9 +41,5 @@ String get hierarchy => 'dog.animal.mammal'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. implementation reference } diff --git a/snapshots/output/basic-project/test/basic_test.dart b/snapshots/output/basic-project/test/basic_test.dart index e06a01f9..3ed37738 100755 --- a/snapshots/output/basic-project/test/basic_test.dart +++ b/snapshots/output/basic-project/test/basic_test.dart @@ -3,10 +3,6 @@ void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` group('some test', () { // ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). test('equality', () { diff --git a/snapshots/output/diagnostics/lib/main.dart b/snapshots/output/diagnostics/lib/main.dart index d49fda0a..8697a36f 100755 --- a/snapshots/output/diagnostics/lib/main.dart +++ b/snapshots/output/diagnostics/lib/main.dart @@ -3,80 +3,42 @@ class _UnusedClass {} // ^^^^^^^^^^^^ definition local 0 -// documentation -// > ```dart -// > class _UnusedClass -// > ``` // diagnostic Information: // > The declaration '_UnusedClass' isn't referenced. void _unusedMethod() {} // ^^^^^^^^^^^^^ definition local 1 -// documentation -// > ```dart -// > void _unusedMethod() -// > ``` // diagnostic Information: // > The declaration '_unusedMethod' isn't referenced. - String _unusedTopLevelVariable = 'asdf'; -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 -// documentation -// > ```dart -// > String _unusedTopLevelVariable -// > ``` -// diagnostic Information: -// > The declaration '_unusedTopLevelVariable' isn't referenced. + final _unusedTopLevelVariable = 'asdf'; +// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 +// diagnostic Information: +// > The declaration '_unusedTopLevelVariable' isn't referenced. @Deprecated('This method is deprecated') // ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# void deprecatedMethod() {} // ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). -// documentation -// > ```dart -// > void deprecatedMethod() -// > ``` void deprecatedParam({ // ^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). -// documentation -// > ```dart -// > void deprecatedParam({dynamic foobar}) -// > ``` @Deprecated('this param is deprecated') dynamic foobar // ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# // ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) -// documentation -// > ```dart -// > {dynamic foobar} -// > ``` }) {} void main() { // ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` final unusedVariable = 'asdf'; // ^^^^^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String unusedVariable -// > ``` -// diagnostic Information: +// diagnostic Warning: // > The value of the local variable 'unusedVariable' isn't used. - String variableWithUnecssaryDeclaration = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 -// documentation -// > ```dart -// > String variableWithUnecssaryDeclaration -// > ``` -// diagnostic Information: -// > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. + final variableWithUnnecessaryDeclaration = 'asdf'; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 +// diagnostic Warning: +// > The value of the local variable 'variableWithUnnecessaryDeclaration' isn't used. // dead_code example if (true) { } else { @@ -93,13 +55,13 @@ // ^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) // diagnostic Information: // > 'foobar' is deprecated and shouldn't be used. this param is deprecated. + someDeprecatedFunc(); +// ^^^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). +// diagnostic Information: +// > 'someDeprecatedFunc' is deprecated and shouldn't be used. } @deprecated // ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. void someDeprecatedFunc() {} // ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). -// documentation -// > ```dart -// > void someDeprecatedFunc() -// > ```