diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index c64c47ef..9be717f8 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -10,9 +10,9 @@ jobs: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: - sdk: 2.19.6 + sdk: 3.1.0 - run: dart pub get - - run: dart run dart_dev analyze + - run: dart analyze format: runs-on: ubuntu-latest @@ -20,9 +20,9 @@ jobs: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: - sdk: 2.19.6 + sdk: 3.1.0 - run: dart pub get - - run: dart run dart_dev format --check + - run: dart format --set-exit-if-changed lib bin dependency-validator: runs-on: ubuntu-latest @@ -30,6 +30,6 @@ jobs: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: - sdk: 2.19.6 + sdk: 3.1.0 - run: dart pub get - run: dart run dependency_validator \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 216e7870..1ea272a7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,8 +20,8 @@ jobs: - uses: dart-lang/setup-dart@v1 with: # use a fixed version number so changes to 'stable', dont break snapshot diffs (language version is used in the scip symbol) - sdk: 2.19.6 - - name: dart pub get scip-dart package + sdk: 3.1.0 + - name: pub get scip-dart package run: dart pub get - name: dart pub get basic-project directory @@ -67,7 +67,7 @@ jobs: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: - sdk: 2.19.6 + sdk: 3.1.0 - run: dart pub get # Setup repo to run on diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..07772a00 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +dart 3.1.0 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..34a6c636 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.sdkPath": "~/.asdf/installs/dart/3.1.0/dart-sdk" +} \ No newline at end of file diff --git a/Makefile b/Makefile index bdf91850..9c84d441 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,12 @@ lint: stats: scip stats +# Requires running `dart pub global acitvate protoc_plugin` gen-proto: protoc --dart_out=. ./lib/src/gen/scip.proto print: - scip print ./index.scip \ No newline at end of file + scip print ./index.scip + +print-ast: + dart ./tool/ast_printer.dart ./snapshots/input/staging-project \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 74177def..2e858918 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,7 +1,7 @@ include: package:workiva_analysis_options/v2.yaml analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true exclude: - snapshots/** \ No newline at end of file diff --git a/lib/src/gen/scip.pb.dart b/lib/src/gen/scip.pb.dart index d4da93b6..55e508d3 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,57 +17,80 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + Index._() : super(); + factory Index.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory Index.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Index', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'metadata', + subBuilder: Metadata.create) + ..pc(2, _omitFieldNames ? '' : 'documents', $pb.PbFieldType.PM, + subBuilder: Document.create) + ..pc( + 3, _omitFieldNames ? '' : 'externalSymbols', $pb.PbFieldType.PM, + subBuilder: SymbolInformation.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Index clone() => Index()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Index copyWith(void Function(Index) updates) => super.copyWith((message) => updates(message as Index)) as Index; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Index copyWith(void Function(Index) updates) => + super.copyWith((message) => updates(message as Index)) as Index; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Index create() => Index._(); Index createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Index getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set metadata(Metadata v) { setField(1, v); } + set metadata(Metadata v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasMetadata() => $_has(0); @$pb.TagNumber(1) @@ -71,78 +98,110 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') Metadata clone() => Metadata()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Metadata copyWith(void Function(Metadata) updates) => super.copyWith((message) => updates(message as Metadata)) as Metadata; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Metadata copyWith(void Function(Metadata) updates) => + super.copyWith((message) => updates(message as Metadata)) as Metadata; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Metadata create() => Metadata._(); Metadata createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Metadata getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set version(ProtocolVersion v) { setField(1, v); } + set version(ProtocolVersion v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasVersion() => $_has(0); @$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) - set toolInfo(ToolInfo v) { setField(2, v); } + set toolInfo(ToolInfo v) { + setField(2, v); + } + @$pb.TagNumber(2) $core.bool hasToolInfo() => $_has(1); @$pb.TagNumber(2) @@ -150,19 +209,30 @@ 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) - set projectRoot($core.String v) { $_setString(2, v); } + set projectRoot($core.String v) { + $_setString(2, v); + } + @$pb.TagNumber(3) $core.bool hasProjectRoot() => $_has(2); @$pb.TagNumber(3) void clearProjectRoot() => clearField(3); + /// Text encoding of the source files on disk that are referenced from + /// `Document.relative_path`. @$pb.TagNumber(4) TextEncoding get textDocumentEncoding => $_getN(3); @$pb.TagNumber(4) - set textDocumentEncoding(TextEncoding v) { setField(4, v); } + set textDocumentEncoding(TextEncoding v) { + setField(4, v); + } + @$pb.TagNumber(4) $core.bool hasTextDocumentEncoding() => $_has(3); @$pb.TagNumber(4) @@ -170,202 +240,310 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') ToolInfo clone() => ToolInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ToolInfo copyWith(void Function(ToolInfo) updates) => super.copyWith((message) => updates(message as ToolInfo)) as ToolInfo; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ToolInfo copyWith(void Function(ToolInfo) updates) => + super.copyWith((message) => updates(message as ToolInfo)) as ToolInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ToolInfo create() => ToolInfo._(); ToolInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ToolInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set name($core.String v) { $_setString(0, v); } + set name($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$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) - set version($core.String v) { $_setString(1, v); } + set version($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasVersion() => $_has(1); @$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, }) { - 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; } - return _result; + return $result; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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') + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Document clone() => Document()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Document copyWith(void Function(Document) updates) => super.copyWith((message) => updates(message as Document)) as Document; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Document copyWith(void Function(Document) updates) => + super.copyWith((message) => updates(message as Document)) as Document; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Document create() => Document._(); Document createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Document getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set relativePath($core.String v) { $_setString(0, v); } + set relativePath($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasRelativePath() => $_has(0); @$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 langauge, including + /// ones that are not specified by the `Language` enum. @$pb.TagNumber(4) $core.String get language => $_getSZ(3); @$pb.TagNumber(4) - set language($core.String v) { $_setString(3, v); } + set language($core.String v) { + $_setString(3, v); + } + @$pb.TagNumber(4) $core.bool hasLanguage() => $_has(3); @$pb.TagNumber(4) void clearLanguage() => clearField(4); } +/// 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. 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + Symbol._() : super(); + factory Symbol.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory Symbol.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Symbol', + package: const $pb.PackageName(_omitMessageNames ? '' : 'scip'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'scheme') + ..aOM(2, _omitFieldNames ? '' : 'package', + subBuilder: Package.create) + ..pc( + 3, _omitFieldNames ? '' : 'descriptors', $pb.PbFieldType.PM, + subBuilder: Descriptor.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Symbol clone() => Symbol()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Symbol copyWith(void Function(Symbol) updates) => super.copyWith((message) => updates(message as Symbol)) as Symbol; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Symbol copyWith(void Function(Symbol) updates) => + super.copyWith((message) => updates(message as Symbol)) as Symbol; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Symbol create() => Symbol._(); Symbol createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Symbol getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Symbol getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Symbol? _defaultInstance; @$pb.TagNumber(1) $core.String get scheme => $_getSZ(0); @$pb.TagNumber(1) - set scheme($core.String v) { $_setString(0, v); } + set scheme($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasScheme() => $_has(0); @$pb.TagNumber(1) @@ -374,7 +552,10 @@ class Symbol extends $pb.GeneratedMessage { @$pb.TagNumber(2) Package get package => $_getN(1); @$pb.TagNumber(2) - set package(Package v) { setField(2, v); } + set package(Package v) { + setField(2, v); + } + @$pb.TagNumber(2) $core.bool hasPackage() => $_has(1); @$pb.TagNumber(2) @@ -386,57 +567,72 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') Package clone() => Package()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Package copyWith(void Function(Package) updates) => super.copyWith((message) => updates(message as Package)) as Package; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Package copyWith(void Function(Package) updates) => + super.copyWith((message) => updates(message as Package)) as Package; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Package create() => Package._(); Package createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Package getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Package getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Package? _defaultInstance; @$pb.TagNumber(1) $core.String get manager => $_getSZ(0); @$pb.TagNumber(1) - set manager($core.String v) { $_setString(0, v); } + set manager($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasManager() => $_has(0); @$pb.TagNumber(1) @@ -445,7 +641,10 @@ class Package extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } + set name($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasName() => $_has(1); @$pb.TagNumber(2) @@ -454,7 +653,10 @@ class Package extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get version => $_getSZ(2); @$pb.TagNumber(3) - set version($core.String v) { $_setString(2, v); } + set version($core.String v) { + $_setString(2, v); + } + @$pb.TagNumber(3) $core.bool hasVersion() => $_has(2); @$pb.TagNumber(3) @@ -462,56 +664,72 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') Descriptor clone() => Descriptor()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Descriptor copyWith(void Function(Descriptor) updates) => super.copyWith((message) => updates(message as Descriptor)) as Descriptor; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Descriptor copyWith(void Function(Descriptor) updates) => + super.copyWith((message) => updates(message as Descriptor)) as Descriptor; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Descriptor create() => Descriptor._(); Descriptor createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Descriptor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Descriptor getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static Descriptor? _defaultInstance; @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } + set name($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$pb.TagNumber(1) @@ -520,7 +738,10 @@ class Descriptor extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get disambiguator => $_getSZ(1); @$pb.TagNumber(2) - set disambiguator($core.String v) { $_setString(1, v); } + set disambiguator($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasDisambiguator() => $_has(1); @$pb.TagNumber(2) @@ -529,87 +750,105 @@ class Descriptor extends $pb.GeneratedMessage { @$pb.TagNumber(3) Descriptor_Suffix get suffix => $_getN(2); @$pb.TagNumber(3) - set suffix(Descriptor_Suffix v) { setField(3, v); } + set suffix(Descriptor_Suffix v) { + setField(3, v); + } + @$pb.TagNumber(3) $core.bool hasSuffix() => $_has(2); @$pb.TagNumber(3) 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, }) { - 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); } - return _result; + return $result; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SymbolInformation clone() => SymbolInformation()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SymbolInformation copyWith(void Function(SymbolInformation) updates) => super.copyWith((message) => updates(message as SymbolInformation)) as SymbolInformation; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SymbolInformation copyWith(void Function(SymbolInformation) updates) => + super.copyWith((message) => updates(message as SymbolInformation)) + as SymbolInformation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static SymbolInformation create() => SymbolInformation._(); SymbolInformation createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static SymbolInformation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set symbol($core.String v) { $_setString(0, v); } + set symbol($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasSymbol() => $_has(0); @$pb.TagNumber(1) void clearSymbol() => clearField(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. @$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); } 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,103 +856,182 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') Relationship clone() => Relationship()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Relationship copyWith(void Function(Relationship) updates) => super.copyWith((message) => updates(message as Relationship)) as Relationship; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Relationship copyWith(void Function(Relationship) updates) => + super.copyWith((message) => updates(message as Relationship)) + as Relationship; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Relationship create() => Relationship._(); Relationship createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static Relationship getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Relationship getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static Relationship? _defaultInstance; @$pb.TagNumber(1) $core.String get symbol => $_getSZ(0); @$pb.TagNumber(1) - set symbol($core.String v) { $_setString(0, v); } + set symbol($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasSymbol() => $_has(0); @$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#, implementation_symbols = Animal# + /// public sound(): string { return "woof" } + /// ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), implementation_symbols = Animal#sound() + /// } + /// 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) - set isReference($core.bool v) { $_setBool(1, v); } + set isReference($core.bool v) { + $_setBool(1, v); + } + @$pb.TagNumber(2) $core.bool hasIsReference() => $_has(1); @$pb.TagNumber(2) void clearIsReference() => clearField(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. @$pb.TagNumber(3) $core.bool get isImplementation => $_getBF(2); @$pb.TagNumber(3) - set isImplementation($core.bool v) { $_setBool(2, v); } + set isImplementation($core.bool v) { + $_setBool(2, v); + } + @$pb.TagNumber(3) $core.bool hasIsImplementation() => $_has(2); @$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) - set isTypeDefinition($core.bool v) { $_setBool(3, v); } + set isTypeDefinition($core.bool v) { + $_setBool(3, v); + } + @$pb.TagNumber(4) $core.bool hasIsTypeDefinition() => $_has(3); @$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) - set isDefinition($core.bool v) { $_setBool(4, v); } + set isDefinition($core.bool v) { + $_setBool(4, v); + } + @$pb.TagNumber(5) $core.bool hasIsDefinition() => $_has(4); @$pb.TagNumber(5) 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, @@ -722,96 +1040,154 @@ class Occurrence extends $pb.GeneratedMessage { SyntaxKind? syntaxKind, $core.Iterable? diagnostics, }) { - 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; + return $result; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Occurrence clone() => Occurrence()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Occurrence copyWith(void Function(Occurrence) updates) => super.copyWith((message) => updates(message as Occurrence)) as Occurrence; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Occurrence copyWith(void Function(Occurrence) updates) => + super.copyWith((message) => updates(message as Occurrence)) as Occurrence; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Occurrence create() => Occurrence._(); Occurrence createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Occurrence getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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. + /// + /// 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) - set symbol($core.String v) { $_setString(1, v); } + set symbol($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasSymbol() => $_has(1); @$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) - set symbolRoles($core.int v) { $_setSignedInt32(2, v); } + set symbolRoles($core.int v) { + $_setSignedInt32(2, v); + } + @$pb.TagNumber(3) $core.bool hasSymbolRoles() => $_has(2); @$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) - set syntaxKind(SyntaxKind v) { setField(5, v); } + set syntaxKind(SyntaxKind v) { + setField(5, v); + } + @$pb.TagNumber(5) $core.bool hasSyntaxKind() => $_has(4); @$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); } +/// 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,76 +1195,118 @@ 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; } - 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); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + 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. ' + 'Will be removed in next major version') Diagnostic clone() => Diagnostic()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Diagnostic copyWith(void Function(Diagnostic) updates) => super.copyWith((message) => updates(message as Diagnostic)) as Diagnostic; // ignore: deprecated_member_use + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Diagnostic copyWith(void Function(Diagnostic) updates) => + super.copyWith((message) => updates(message as Diagnostic)) as Diagnostic; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Diagnostic create() => Diagnostic._(); Diagnostic createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Diagnostic getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + 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) - set severity(Severity v) { setField(1, v); } + set severity(Severity v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasSeverity() => $_has(0); @$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) - set code($core.String v) { $_setString(1, v); } + set code($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasCode() => $_has(1); @$pb.TagNumber(2) void clearCode() => clearField(2); + /// Message of this diagnostic. @$pb.TagNumber(3) $core.String get message => $_getSZ(2); @$pb.TagNumber(3) - set message($core.String v) { $_setString(2, v); } + set message($core.String v) { + $_setString(2, v); + } + @$pb.TagNumber(3) $core.bool hasMessage() => $_has(2); @$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) - set source($core.String v) { $_setString(3, v); } + set source($core.String v) { + $_setString(3, v); + } + @$pb.TagNumber(4) $core.bool hasSource() => $_has(3); @$pb.TagNumber(4) @@ -898,3 +1316,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..11a2bc69 100644 --- a/lib/src/gen/scip.pbenum.dart +++ b/lib/src/gen/scip.pbenum.dart @@ -1,54 +1,75 @@ -/// +// // 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 = [ + static const $core.List values = [ UnspecifiedProtocolVersion, ]; - static final $core.Map<$core.int, ProtocolVersion> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, ProtocolVersion> _byValue = + $pb.ProtobufEnum.initByValue(values); static ProtocolVersion? valueOf($core.int value) => _byValue[value]; const ProtocolVersion._($core.int v, $core.String n) : super(v, n); } 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 $core.List values = [ + 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, UTF8, UTF16, ]; - static final $core.Map<$core.int, TextEncoding> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, TextEncoding> _byValue = + $pb.ProtobufEnum.initByValue(values); static TextEncoding? valueOf($core.int value) => _byValue[value]; const TextEncoding._($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 $core.List values = [ + 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 $core.List values = [ UnspecifiedSymbolRole, Definition, Import, @@ -58,55 +79,92 @@ class SymbolRole extends $pb.ProtobufEnum { Test, ]; - static final $core.Map<$core.int, SymbolRole> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, SymbolRole> _byValue = + $pb.ProtobufEnum.initByValue(values); static SymbolRole? valueOf($core.int value) => _byValue[value]; const SymbolRole._($core.int v, $core.String n) : super(v, n); } 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; - static const $core.List values = [ + static const $core.List values = [ UnspecifiedSyntaxKind, Comment, PunctuationDelimiter, @@ -146,20 +204,24 @@ class SyntaxKind extends $pb.ProtobufEnum { TagDelimiter, ]; - static final $core.Map<$core.int, SyntaxKind> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, SyntaxKind> _byValue = + $pb.ProtobufEnum.initByValue(values); static SyntaxKind? valueOf($core.int value) => _byValue[value]; const SyntaxKind._($core.int v, $core.String n) : super(v, n); } 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 $core.List values = [ + 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, Error, Warning, @@ -167,126 +229,164 @@ class Severity extends $pb.ProtobufEnum { Hint, ]; - static final $core.Map<$core.int, Severity> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, Severity> _byValue = + $pb.ProtobufEnum.initByValue(values); static Severity? valueOf($core.int value) => _byValue[value]; const Severity._($core.int v, $core.String n) : super(v, n); } 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 $core.List values = [ + 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, Unnecessary, Deprecated, ]; - static final $core.Map<$core.int, DiagnosticTag> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, DiagnosticTag> _byValue = + $pb.ProtobufEnum.initByValue(values); static DiagnosticTag? valueOf($core.int value) => _byValue[value]; 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 +/// "CPlusPlus" 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 $core.List values = [ + static const Language UnspecifiedLanguage = + Language._(0, _omitEnumNames ? '' : 'UnspecifiedLanguage'); + static const Language ABAP = Language._(60, _omitEnumNames ? '' : 'ABAP'); + 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 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 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 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 Makefile = + Language._(79, _omitEnumNames ? '' : 'Makefile'); + static const Language Markdown = + Language._(84, _omitEnumNames ? '' : 'Markdown'); + static const Language Matlab = Language._(52, _omitEnumNames ? '' : 'Matlab'); + 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 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 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 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 Swift = Language._(2, _omitEnumNames ? '' : 'Swift'); + static const Language TOML = Language._(73, _omitEnumNames ? '' : 'TOML'); + static const Language TeX = Language._(82, _omitEnumNames ? '' : 'TeX'); + static const Language TypeScript = + Language._(23, _omitEnumNames ? '' : 'TypeScript'); + static const Language TypeScriptReact = + Language._(94, _omitEnumNames ? '' : 'TypeScriptReact'); + 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, APL, @@ -383,27 +483,38 @@ class Language extends $pb.ProtobufEnum { Zig, ]; - static final $core.Map<$core.int, Language> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, Language> _byValue = + $pb.ProtobufEnum.initByValue(values); static Language? valueOf($core.int value) => _byValue[value]; const Language._($core.int v, $core.String n) : super(v, n); } 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 Macro = + Descriptor_Suffix._(9, _omitEnumNames ? '' : 'Macro'); + static const Descriptor_Suffix Meta = + Descriptor_Suffix._(7, _omitEnumNames ? '' : 'Meta'); + static const Descriptor_Suffix Local = + Descriptor_Suffix._(8, _omitEnumNames ? '' : 'Local'); static const Descriptor_Suffix Package = Namespace; - static const $core.List values = [ + static const $core.List values = [ UnspecifiedSuffix, Namespace, Type, @@ -416,9 +527,11 @@ class Descriptor_Suffix extends $pb.ProtobufEnum { Local, ]; - static final $core.Map<$core.int, Descriptor_Suffix> _byValue = $pb.ProtobufEnum.initByValue(values); + static final $core.Map<$core.int, Descriptor_Suffix> _byValue = + $pb.ProtobufEnum.initByValue(values); static Descriptor_Suffix? valueOf($core.int value) => _byValue[value]; const Descriptor_Suffix._($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..8279ee27 100644 --- a/lib/src/gen/scip.pbjson.dart +++ b/lib/src/gen/scip.pbjson.dart @@ -1,399 +1,638 @@ -/// +// // 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 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}, ], }; /// 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' + 'ZWQQEBIICgRUZXN0ECA='); + @$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': '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': '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': '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': 'Kotlin', '2': 4}, + {'1': 'LaTeX', '2': 83}, + {'1': 'Lean', '2': 48}, + {'1': 'Less', '2': 27}, + {'1': 'Lua', '2': 12}, + {'1': 'Makefile', '2': 79}, + {'1': 'Markdown', '2': 84}, + {'1': 'Matlab', '2': 52}, + {'1': 'Nix', '2': 77}, + {'1': 'OCaml', '2': 41}, + {'1': 'Objective_C', '2': 36}, + {'1': 'Objective_CPP', '2': 37}, + {'1': 'PHP', '2': 19}, + {'1': 'PLSQL', '2': 70}, + {'1': 'Perl', '2': 13}, + {'1': 'PowerShell', '2': 67}, + {'1': 'Prolog', '2': 71}, + {'1': 'Python', '2': 15}, + {'1': 'R', '2': 54}, + {'1': 'Racket', '2': 11}, + {'1': 'Raku', '2': 14}, + {'1': 'Razor', '2': 62}, + {'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': 'Swift', '2': 2}, + {'1': 'TOML', '2': 73}, + {'1': 'TeX', '2': 82}, + {'1': 'TypeScript', '2': 23}, + {'1': 'TypeScriptReact', '2': 94}, + {'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( + 'CghMYW5ndWFnZRIXChNVbnNwZWNpZmllZExhbmd1YWdlEAASCAoEQUJBUBA8EgcKA0FQTBAxEg' + 'cKA0FkYRAnEggKBEFnZGEQLRIMCghBc2NpaURvYxBWEgwKCEFzc2VtYmx5EDoSBwoDQXdrEEIS' + 'BwoDQmF0EEQSCgoGQmliVGVYEFESBQoBQxAiEgkKBUNPQk9MEDsSBwoDQ1BQECMSBwoDQ1NTEB' + 'oSCgoGQ1NoYXJwEAESCwoHQ2xvanVyZRAIEhAKDENvZmZlZXNjcmlwdBAVEg4KCkNvbW1vbkxp' + 'c3AQCRIHCgNDb3EQLxIICgREYXJ0EAMSCgoGRGVscGhpEDkSCAoERGlmZhBYEg4KCkRvY2tlcm' + 'ZpbGUQUBIKCgZEeWFsb2cQMhIKCgZFbGl4aXIQERIKCgZFcmxhbmcQEhIKCgZGU2hhcnAQKhII' + 'CgRGaXNoEEESCAoERmxvdxAYEgsKB0ZvcnRyYW4QOBIOCgpHaXRfQ29tbWl0EFsSDgoKR2l0X0' + 'NvbmZpZxBZEg4KCkdpdF9SZWJhc2UQXBIGCgJHbxAhEgoKBkdyb292eRAHEggKBEhUTUwQHhII' + 'CgRIYWNrEBQSDgoKSGFuZGxlYmFycxBaEgsKB0hhc2tlbGwQLBIJCgVJZHJpcxAuEgcKA0luaR' + 'BIEgUKAUoQMxIICgRKU09OEEsSCAoESmF2YRAGEg4KCkphdmFTY3JpcHQQFhITCg9KYXZhU2Ny' + 'aXB0UmVhY3QQXRILCgdKc29ubmV0EEwSCQoFSnVsaWEQNxIKCgZLb3RsaW4QBBIJCgVMYVRlWB' + 'BTEggKBExlYW4QMBIICgRMZXNzEBsSBwoDTHVhEAwSDAoITWFrZWZpbGUQTxIMCghNYXJrZG93' + 'bhBUEgoKBk1hdGxhYhA0EgcKA05peBBNEgkKBU9DYW1sECkSDwoLT2JqZWN0aXZlX0MQJBIRCg' + '1PYmplY3RpdmVfQ1BQECUSBwoDUEhQEBMSCQoFUExTUUwQRhIICgRQZXJsEA0SDgoKUG93ZXJT' + 'aGVsbBBDEgoKBlByb2xvZxBHEgoKBlB5dGhvbhAPEgUKAVIQNhIKCgZSYWNrZXQQCxIICgRSYW' + 't1EA4SCQoFUmF6b3IQPhIICgRSZVNUEFUSCAoEUnVieRAQEggKBFJ1c3QQKBIHCgNTQVMQPRII' + 'CgRTQ1NTEB0SBwoDU01MECsSBwoDU1FMEEUSCAoEU2FzcxAcEgkKBVNjYWxhEAUSCgoGU2NoZW' + '1lEAoSDwoLU2hlbGxTY3JpcHQQQBILCgdTa3lsYXJrEE4SCQoFU3dpZnQQAhIICgRUT01MEEkS' + 'BwoDVGVYEFISDgoKVHlwZVNjcmlwdBAXEhMKD1R5cGVTY3JpcHRSZWFjdBBeEg8KC1Zpc3VhbE' + 'Jhc2ljED8SBwoDVnVlEBkSCwoHV29sZnJhbRA1EgcKA1hNTBAfEgcKA1hTTBAgEggKBFlBTUwQ' + 'ShIHCgNaaWcQJg=='); + @$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' + }, ], }; /// 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' + 'lvblIHc3ltYm9scw=='); + @$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': 'Macro', '2': 9}, + {'1': 'Meta', '2': 7}, + {'1': 'Local', '2': 8}, ], - '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' + 'eXBlUGFyYW1ldGVyEAUSDQoJUGFyYW1ldGVyEAYSCQoFTWFjcm8QCRIICgRNZXRhEAcSCQoFTG' + '9jYWwQCBoCEAE='); + @$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' + }, ], }; /// 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' + 'LlJlbGF0aW9uc2hpcFINcmVsYXRpb25zaGlwcw=='); + @$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' + }, ], }; /// 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' + 'LnNjaXAuRGlhZ25vc3RpY1ILZGlhZ25vc3RpY3M='); + @$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..5383fecc 100644 --- a/lib/src/gen/scip.pbserver.dart +++ b/lib/src/gen/scip.pbserver.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,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 -export 'scip.pb.dart'; +// 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/scip_visitor.dart b/lib/src/scip_visitor.dart index 49c35f29..1e2003d4 100644 --- a/lib/src/scip_visitor.dart +++ b/lib/src/scip_visitor.dart @@ -56,6 +56,12 @@ class ScipVisitor extends GeneralizingAstVisitor { _visitNormalFormalParameter(node); } else if (node is SimpleIdentifier) { _visitSimpleIdentifier(node); + } else if (node is TypeAnnotation) { + _visitTypeAnnotation(node); + } else if (node is ImportPrefixReference) { + _visitImportPrefixReference(node); + } else if (node is DeclaredVariablePattern) { + _visitPatternField(node); } super.visitNode(node); @@ -147,6 +153,42 @@ class ScipVisitor extends GeneralizingAstVisitor { } } + void _visitTypeAnnotation(TypeAnnotation node) { + final element = node is NamedType ? node.element : node.type?.element; + if (element == null) return; + + var offset = node.offset; + if (node is NamedType && node.importPrefix != null) { + offset += node.importPrefix!.name.length + 1; + } + + _registerAsReference( + element, + node, + offset: offset, + length: element.nameLength, + ); + } + + void _visitImportPrefixReference(ImportPrefixReference node) { + final element = node.element; + if (element == null) return; + + _registerAsReference( + element, + node, + offset: node.offset, + length: element.nameLength, + ); + } + + void _visitPatternField(DeclaredVariablePattern node) { + final element = node.declaredElement; + if (element == null) return; + + _registerAsDefinition(element, node); + } + /// Registers the provided [element] as a reference to an existing definition /// /// [node] refers to the ast node where the reference exists, [element] diff --git a/pubspec.lock b/pubspec.lock index 0735fca6..695d72bb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: e440ac42679dfc04bbbefb58ed225c994bc7e07fccc8a68ec7d3631a127e5da9 + sha256: "0f7b1783ddb1e4600580b8c00d0ddae5b06ae7f0382bd4fcce5db4df97b618e1" url: "https://pub.dev" source: hosted - version: "54.0.0" + version: "66.0.0" analyzer: dependency: "direct main" description: name: analyzer - sha256: "2c2e3721ee9fb36de92faa060f3480c81b23e904352b087e5c64224b1a044427" + sha256: "5e8bdcda061d91da6b034d64d8e4026f355bcb8c3e7a0ac2da1523205a91a737" url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "6.4.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: @@ -33,22 +33,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" - url: "https://pub.dev" - source: hosted - version: "2.3.1" build_config: dependency: transitive description: @@ -57,54 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 - url: "https://pub.dev" - source: hosted - version: "2.2.0" - build_runner: - dependency: transitive - description: - name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 - url: "https://pub.dev" - source: hosted - version: "2.3.3" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" - url: "https://pub.dev" - source: hosted - version: "7.2.7" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" - url: "https://pub.dev" - source: hosted - version: "8.6.1" chalk: dependency: "direct dev" description: @@ -117,18 +53,10 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "2.0.3" collection: dependency: transitive description: @@ -149,26 +77,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 - url: "https://pub.dev" - source: hosted - version: "3.0.2" - dart_dev: - dependency: "direct dev" - description: - name: dart_dev - sha256: "05b00aabe00a284ccf007188475cce7963bf54fa266bb04856687d50d8b82ac1" - url: "https://pub.dev" - source: hosted - version: "4.1.0" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "3.0.3" dependency_validator: dependency: "direct dev" description: @@ -181,58 +93,26 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" - url: "https://pub.dev" - source: hosted - version: "3.2.0" + version: "1.1.0" glob: dependency: "direct dev" description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.3.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" + version: "2.1.2" io: dependency: transitive description: @@ -241,54 +121,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" - url: "https://pub.dev" - source: hosted - version: "0.6.5" 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" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" + version: "1.2.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.11.0" package_config: dependency: "direct main" description: @@ -301,26 +157,18 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.5.1" + version: "1.9.0" protobuf: 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: @@ -337,22 +185,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" source_span: dependency: transitive description: @@ -361,30 +193,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" string_scanner: dependency: transitive description: @@ -401,22 +209,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" - url: "https://pub.dev" - source: hosted - version: "0.6.0" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" typed_data: dependency: transitive description: @@ -429,18 +221,10 @@ packages: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" + version: "1.1.0" workiva_analysis_options: dependency: "direct dev" description: @@ -453,9 +237,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: ">=3.0.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index d23a161a..82cce2b5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,22 +4,21 @@ description: generates scip bindings for dart files repository: https://github.com/Workiva/scip-dart environment: - sdk: ">=2.18.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" executables: scip_dart: dependencies: - analyzer: ^5.4.0 - args: ^2.4.0 + analyzer: ^6.2.0 + args: ^2.4.2 package_config: ^2.1.0 path: ^1.8.3 - protobuf: ^2.1.0 + protobuf: ^3.1.0 pubspec_parse: ^1.2.1 dev_dependencies: chalk: ^1.2.1 - dart_dev: ^4.1.0 dependency_validator: ^3.2.3 glob: ^2.1.1 - workiva_analysis_options: ^1.4.1 \ No newline at end of file + workiva_analysis_options: ^1.4.1 diff --git a/snapshots/input/basic-project/lib/relationships.dart b/snapshots/input/basic-project/lib/relationships.dart index bd028ee2..39b7f2da 100644 --- a/snapshots/input/basic-project/lib/relationships.dart +++ b/snapshots/input/basic-project/lib/relationships.dart @@ -16,4 +16,4 @@ class Dog extends Animal with SwimAction { @override String get hierarchy => 'dog.animal.mammal'; -} \ No newline at end of file +} diff --git a/snapshots/input/basic-project/pubspec.lock b/snapshots/input/basic-project/pubspec.lock index ab95fe07..c40ae71c 100644 --- a/snapshots/input/basic-project/pubspec.lock +++ b/snapshots/input/basic-project/pubspec.lock @@ -362,4 +362,4 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.18.0 <4.0.0" diff --git a/snapshots/input/dart3-features/.tool-versions b/snapshots/input/dart3-features/.tool-versions new file mode 100644 index 00000000..b7a2d8be --- /dev/null +++ b/snapshots/input/dart3-features/.tool-versions @@ -0,0 +1 @@ +dart 3.0.5 diff --git a/snapshots/input/dart3-features/lib/main.dart b/snapshots/input/dart3-features/lib/main.dart new file mode 100644 index 00000000..67338643 --- /dev/null +++ b/snapshots/input/dart3-features/lib/main.dart @@ -0,0 +1,65 @@ +(String, int) userInfo(Map json) { + return (json['name'] as String, json['height'] as int); +} + +void parser(int charCode) { + const slash = 1; + const star = 2; + const plus = 3; + const minus = 4; + + final nextCharCode = 'a'; + const digit0 = 0; + const digit9 = 9; + + void skipComment() {} + void operatorFn(int charCode) {} + void number() {} + void invalid() {} + + switch (charCode) { + case slash when nextCharCode == slash: + skipComment(); + + case slash || star || plus || minus: + operatorFn(charCode); + + case >= digit0 && <= digit9: + number(); + + default: + invalid(); + } +} + +const six = 6; +const msg = 'Feeling the Monday blues?'; +String describeDate(DateTime dt) { + const one = 1; + return switch (dt.weekday) { + one => 'Feeling the Monday blues?', + 7 || six => 'Enjoy the weekend!', + _ => 'Hang in there.' + }; +} + +void main() { + var ( + String name, + int height, + ) = userInfo({'name': 'Michael', 'height': 180}); + print('User $name is $height cm tall.'); + + final json = {'name': 'Michael', 'height': 180}; + if (json case {'name': 'Michael', 'height': int h}) { + print('Michael is $h cm tall.'); + } +} + +base class Foo {} + +final class Bar {} + +interface class Car {} + +sealed class Zar {} diff --git a/snapshots/input/dart3-features/pubspec.lock b/snapshots/input/dart3-features/pubspec.lock new file mode 100644 index 00000000..573410f7 --- /dev/null +++ b/snapshots/input/dart3-features/pubspec.lock @@ -0,0 +1,5 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: {} +sdks: + dart: ">=3.0.0 <4.0.0" diff --git a/snapshots/input/dart3-features/pubspec.yaml b/snapshots/input/dart3-features/pubspec.yaml new file mode 100644 index 00000000..a61ac8bc --- /dev/null +++ b/snapshots/input/dart3-features/pubspec.yaml @@ -0,0 +1,5 @@ +name: dart3_features +version: 1.0.0 + +environment: + sdk: ">=3.0.0 <4.0.0" \ No newline at end of file diff --git a/snapshots/input/diagnostics/pubspec.lock b/snapshots/input/diagnostics/pubspec.lock index 97c4e65c..694427d0 100644 --- a/snapshots/input/diagnostics/pubspec.lock +++ b/snapshots/input/diagnostics/pubspec.lock @@ -10,4 +10,4 @@ packages: source: hosted version: "2.0.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.18.0 <4.0.0" diff --git a/snapshots/input/relationships-project/pubspec.lock b/snapshots/input/relationships-project/pubspec.lock new file mode 100644 index 00000000..62ac150b --- /dev/null +++ b/snapshots/input/relationships-project/pubspec.lock @@ -0,0 +1,5 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: {} +sdks: + dart: ">=2.18.0 <4.0.0" diff --git a/snapshots/input/staging-project/.vscode/settings.json b/snapshots/input/staging-project/.vscode/settings.json new file mode 100644 index 00000000..34a6c636 --- /dev/null +++ b/snapshots/input/staging-project/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.sdkPath": "~/.asdf/installs/dart/3.1.0/dart-sdk" +} \ No newline at end of file diff --git a/snapshots/input/staging-project/pubspec.lock b/snapshots/input/staging-project/pubspec.lock index 89b205e1..573410f7 100644 --- a/snapshots/input/staging-project/pubspec.lock +++ b/snapshots/input/staging-project/pubspec.lock @@ -2,4 +2,4 @@ # See https://dart.dev/tools/pub/glossary#lockfile packages: {} sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/snapshots/input/staging-project/pubspec.yaml b/snapshots/input/staging-project/pubspec.yaml index 01372323..8ff77ffb 100644 --- a/snapshots/input/staging-project/pubspec.yaml +++ b/snapshots/input/staging-project/pubspec.yaml @@ -2,4 +2,4 @@ name: dart_test version: 1.0.0 environment: - sdk: ">=2.18.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" diff --git a/snapshots/output/basic-project/lib/main.dart b/snapshots/output/basic-project/lib/main.dart index cdaed412..cdfbda25 100755 --- a/snapshots/output/basic-project/lib/main.dart +++ b/snapshots/output/basic-project/lib/main.dart @@ -6,7 +6,7 @@ /// Takes a number /// Returns a number int fib(int n) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // documentation // > ```dart @@ -16,7 +16,7 @@ // > 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# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^ definition local 0 // documentation // > ```dart @@ -37,14 +37,14 @@ // > ```dart // > void print_fib(int a) // > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.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:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // ^ reference local 1 } @@ -56,7 +56,7 @@ // > String y // > ``` String capture() { -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). // documentation // > ```dart @@ -96,7 +96,7 @@ // > int i // > ``` print(i); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^ reference local 3 } @@ -148,7 +148,7 @@ // > Reference class: [SomeLocalClass] // > Reference external class: [Foo] // > Missing Reference: [IDontExist] -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^ definition local 5 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/more.dart b/snapshots/output/basic-project/lib/more.dart index 9857ba25..016d705a 100755 --- a/snapshots/output/basic-project/lib/more.dart +++ b/snapshots/output/basic-project/lib/more.dart @@ -52,7 +52,7 @@ // > void sleep() // > ``` print('zzz...'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } } @@ -65,7 +65,7 @@ // 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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // documentation // > ```dart @@ -112,26 +112,26 @@ // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. soundMaker = () => print('Meow!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; case AnimalType.dog: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. soundMaker = () => print('Woof!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; case AnimalType.bird: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. soundMaker = () => print('Chirp!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; default: soundMaker = () => print('Unknown animal type'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } } @@ -146,15 +146,15 @@ } @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String toString() { -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.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 +// relationship scip-dart pub dart:core 3.1.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. // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. @@ -162,14 +162,14 @@ } int calculateSum(List numbers) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 3.1.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# +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 1 // documentation // > ```dart @@ -177,7 +177,7 @@ // > ``` 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(). +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^^^^^ definition local 2 // documentation // > ```dart @@ -199,15 +199,15 @@ // > 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# +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.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# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^ definition local 5 // documentation // > ```dart @@ -254,23 +254,23 @@ // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). print(cat); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference local 6 print(dog); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference local 7 print('The sum of $numbers is $sum'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^^^^ reference local 4 // ^^^ reference local 5 print(math.Rectangle(1,2,3,4)); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle# +// ^^^^^^^^^ reference scip-dart pub dart:math 3.1.0 dart:math/`rectangle.dart`/Rectangle# [1,2].reduce((a, b) => a + b); -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^ definition local 8 // documentation // > ```dart @@ -291,8 +291,8 @@ // > ```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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^ definition local 10 // documentation // > ```dart @@ -304,8 +304,8 @@ // > ```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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^ definition local 11 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/other.dart b/snapshots/output/basic-project/lib/other.dart index be295c20..50c122d6 100755 --- a/snapshots/output/basic-project/lib/other.dart +++ b/snapshots/output/basic-project/lib/other.dart @@ -13,30 +13,30 @@ // > class Foo // > ``` int _far; -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^ definition local 0 // documentation // > ```dart // > int _far // > ``` -// diagnostic Information: +// diagnostic Warning: // > 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# +// ^^^^ reference scip-dart pub dart:core 3.1.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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.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; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`double.dart`/double# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. // documentation // > ```dart @@ -76,7 +76,7 @@ // > class Bar // > ``` String _someValue; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -105,7 +105,7 @@ _someValue = 'asdf'; // ^^^^^^^^^^ reference local 2 print(_someValue); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^^^^^^^ reference local 2 } } @@ -118,7 +118,7 @@ // > ``` 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(). +// ^^^^ reference scip-dart pub dart:async 3.1.0 dart:async/`future.dart`/Future#then(). // ^ definition local 4 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/relationships.dart b/snapshots/output/basic-project/lib/relationships.dart index 174afc43..6fe70019 100755 --- a/snapshots/output/basic-project/lib/relationships.dart +++ b/snapshots/output/basic-project/lib/relationships.dart @@ -6,7 +6,7 @@ // > abstract class Mammal // > ``` String get hierarchy; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. // documentation // > ```dart @@ -23,7 +23,7 @@ // 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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). // documentation // > ```dart @@ -43,7 +43,7 @@ // > ```dart // > void execute() // > ``` -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } class Dog extends Animal with SwimAction { @@ -58,9 +58,9 @@ // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String sound() => 'woof'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). // documentation // > ```dart @@ -69,9 +69,9 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String get hierarchy => 'dog.animal.mammal'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. // documentation // > ```dart @@ -79,3 +79,4 @@ // > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. implementation reference } + diff --git a/snapshots/output/dart3-features/lib/main.dart b/snapshots/output/dart3-features/lib/main.dart new file mode 100755 index 00000000..1a5f4b97 --- /dev/null +++ b/snapshots/output/dart3-features/lib/main.dart @@ -0,0 +1,168 @@ + (String, int) userInfo(Map json) { +// definition scip-dart pub dart3_features 1.0.0 lib/main.dart/ +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# +// ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/userInfo(). +// documentation ```dart +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/map.dart/Map# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^ definition local 0 +// documentation ```dart + return (json['name'] as String, json['height'] as int); +// ^^^^ reference local 0 +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^ reference local 0 +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# + } + + void parser(int charCode) { +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/parser(). +// documentation ```dart +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# +// ^^^^^^^^ definition local 1 +// documentation ```dart + const slash = 1; +// ^^^^^ definition local 2 +// documentation ```dart + const star = 2; +// ^^^^ definition local 3 +// documentation ```dart + const plus = 3; +// ^^^^ definition local 4 +// documentation ```dart + const minus = 4; +// ^^^^^ definition local 5 +// documentation ```dart + + final nextCharCode = 'a'; +// ^^^^^^^^^^^^ definition local 6 +// documentation ```dart + const digit0 = 0; +// ^^^^^^ definition local 7 +// documentation ```dart + const digit9 = 9; +// ^^^^^^ definition local 8 +// documentation ```dart + + void skipComment() {} +// ^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/skipComment(). +// documentation ```dart + void operatorFn(int charCode) {} +// ^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/operatorFn(). +// documentation ```dart +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# +// ^^^^^^^^ definition local 9 +// documentation ```dart + void number() {} +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/number(). +// documentation ```dart + void invalid() {} +// ^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/invalid(). +// documentation ```dart + + switch (charCode) { +// ^^^^^^^^ reference local 1 + case slash when nextCharCode == slash: +// ^^^^^ reference local 2 +// ^^^^^^^^^^^^ reference local 6 +// ^^^^^ reference local 2 + skipComment(); +// ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/skipComment(). + + case slash || star || plus || minus: +// ^^^^^ reference local 2 +// ^^^^ reference local 3 +// ^^^^ reference local 4 +// ^^^^^ reference local 5 + operatorFn(charCode); +// ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/operatorFn(). +// ^^^^^^^^ reference local 1 + + case >= digit0 && <= digit9: +// ^^^^^^ reference local 7 +// ^^^^^^ reference local 8 + number(); +// ^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/number(). + + default: + invalid(); +// ^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/invalid(). + } + } + + const six = 6; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/six. +// documentation ```dart + const msg = 'Feeling the Monday blues?'; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/msg. +// documentation ```dart + String describeDate(DateTime dt) { +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/describeDate(). +// documentation ```dart +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/date_time.dart/DateTime# +// ^^ definition local 10 +// documentation ```dart + const one = 1; +// ^^^ definition local 11 +// documentation ```dart + return switch (dt.weekday) { +// ^^ reference local 10 +// ^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/date_time.dart/DateTime#weekday. + one => 'Feeling the Monday blues?', +// ^^^ reference local 11 + 7 || six => 'Enjoy the weekend!', +// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/six. + _ => 'Hang in there.' + }; + } + + void main() { +// ^^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/main(). +// documentation ```dart + var ( + String name, +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^ definition local 12 +// documentation ```dart + int height, +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# +// ^^^^^^ definition local 13 +// documentation ```dart + ) = userInfo({'name': 'Michael', 'height': 180}); +// ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/main.dart/userInfo(). + print('User $name is $height cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/print.dart/print(). +// ^^^^ reference local 12 +// ^^^^^^ reference local 13 + + final json = {'name': 'Michael', 'height': 180}; +// ^^^^ definition local 14 +// documentation ```dart + if (json case {'name': 'Michael', 'height': int h}) { +// ^^^^ reference local 14 +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/int.dart/int# +// ^ definition local 15 +// documentation ```dart + print('Michael is $h cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/print.dart/print(). +// ^ reference local 15 + } + } + + base class Foo {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/Foo# +// documentation ```dart + + final class Bar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/Bar# +// documentation ```dart + + interface class Car {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/Car# +// documentation ```dart + + sealed class Zar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/main.dart/Zar# +// documentation ```dart + diff --git a/snapshots/output/diagnostics/lib/main.dart b/snapshots/output/diagnostics/lib/main.dart index d49fda0a..85ac8cb1 100755 --- a/snapshots/output/diagnostics/lib/main.dart +++ b/snapshots/output/diagnostics/lib/main.dart @@ -20,7 +20,7 @@ // > The declaration '_unusedMethod' isn't referenced. String _unusedTopLevelVariable = 'asdf'; -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -30,7 +30,7 @@ // > 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# +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# void deprecatedMethod() {} // ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). // documentation @@ -45,7 +45,7 @@ // > 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# +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# // ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) // documentation // > ```dart @@ -65,23 +65,23 @@ // > ```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# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 // documentation // > ```dart // > String variableWithUnecssaryDeclaration // > ``` -// diagnostic Information: +// diagnostic Warning: // > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. // dead_code example if (true) { } else { print('This condition is never met!'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } deprecatedMethod(); @@ -96,7 +96,7 @@ } @deprecated -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/deprecated. void someDeprecatedFunc() {} // ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). // documentation diff --git a/snapshots/output/relationships-project/lib/main.dart b/snapshots/output/relationships-project/lib/main.dart new file mode 100755 index 00000000..46991bf0 --- /dev/null +++ b/snapshots/output/relationships-project/lib/main.dart @@ -0,0 +1,55 @@ + abstract class Mammal { +// definition scip-dart pub dart_test 1.0.0 lib/main.dart/ +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal# +// documentation ```dart + String get hierarchy; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal#hierarchy. +// documentation ```dart + } + + abstract class Animal extends Mammal { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Animal# +// documentation ```dart +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal# + String sound() => 'NOISE!'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Animal#sound(). +// documentation ```dart + } + + mixin SwimAction { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/SwimAction# +// documentation ```dart + void execute() => print('swimming...'); +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/SwimAction#execute(). +// documentation ```dart +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/print.dart/print(). + } + + class Dog extends Animal with SwimAction { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Dog# +// documentation ```dart +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/Animal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/SwimAction# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/Animal# +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/SwimAction# + @override +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/annotations.dart/override. + String sound() => 'woof'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Dog#sound(). +// documentation ```dart +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/Animal#sound(). implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/annotations.dart/override. + String get hierarchy => 'dog.animal.mammal'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/string.dart/String# +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Dog#hierarchy. +// documentation ```dart +// relationship scip-dart pub dart_test 1.0.0 lib/main.dart/Mammal#hierarchy. implementation reference + } + diff --git a/tool/dart_dev/config.dart b/tool/dart_dev/config.dart deleted file mode 100644 index ffe7397c..00000000 --- a/tool/dart_dev/config.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:dart_dev/dart_dev.dart'; -import 'package:glob/glob.dart'; - -final config = { - ...coreConfig, - 'format': FormatTool() - ..exclude = [ - Glob('snapshots/**'), - Glob('lib/src/gen/*.dart'), - ], -};