diff --git a/.gitattributes b/.gitattributes index 3a83cab3..51bae792 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,7 @@ bindings/typescript/scip_pb.ts linguist-generated=true bindings/go/scip/scip.pb.go linguist-generated=true bindings/rust/src/generated/scip.rs linguist-generated=true +bindings/dotnet/src/Scip.cs linguist-generated=true bindings/haskell/src/Proto/**.hs linguist-generated=true bindings/java/src/main/java/org/scip_code/scip/**.java linguist-generated=true bindings/kotlin/src/main/kotlin/org/scip_code/scip/**.kt linguist-generated=true diff --git a/.github/renovate.json b/.github/renovate.json index 489e04f9..9ed2a227 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -11,8 +11,8 @@ "packageRules": [ { "description": "Bump manually in lock-step with flake.nix's protoc.", - "matchManagers": ["maven"], - "matchPackageNames": ["com.google.protobuf:*"], + "matchManagers": ["maven", "nuget"], + "matchPackageNames": ["com.google.protobuf:*", "Google.Protobuf"], "enabled": false }, { diff --git a/.github/workflows/dotnet-bindings.yaml b/.github/workflows/dotnet-bindings.yaml new file mode 100644 index 00000000..4c557fa7 --- /dev/null +++ b/.github/workflows/dotnet-bindings.yaml @@ -0,0 +1,44 @@ +name: .NET bindings + +# The Nix `dotnet-bindings` check already builds and packs this project with +# the pinned SDK. This workflow covers the toolchain a contributor without +# Nix uses, and annotates the exact file when the package version drifts +# from cmd/scip/version.txt. + +on: + pull_request: + paths: + - bindings/dotnet/** + - cmd/scip/version.txt + - scip.proto + - .github/workflows/dotnet-bindings.yaml + +permissions: + contents: read + +concurrency: + group: dotnet-bindings-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: '10.0.x' + + - name: Validate Scip.csproj version matches cmd/scip/version.txt + run: | + set -euo pipefail + expected=$(cat cmd/scip/version.txt) + actual=$(dotnet msbuild bindings/dotnet/Scip.csproj -getProperty:Version) + if [ "$actual" != "$expected" ]; then + echo "::error file=bindings/dotnet/Scip.csproj::version is '$actual', expected '$expected'" + exit 1 + fi + + - name: Pack the Scip package + run: dotnet pack -c Release bindings/dotnet/Scip.csproj diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c0871452..fcd46723 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -104,6 +104,34 @@ jobs: fi working-directory: bindings/rust + publish-dotnet-bindings: + needs: publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + ref: v${{ needs.publish.outputs.version }} + - uses: DeterminateSystems/nix-installer-action@v22 + - uses: DeterminateSystems/magic-nix-cache-action@v14 + with: + use-flakehub: "disabled" + # LICENSE and README.md are packed into the nupkg; LICENSE is a symlink + # in-tree (matches bindings/{haskell,rust,typescript}) and dotnet pack + # follows it, so no materialization step is needed. + - name: Pack + working-directory: bindings/dotnet + run: nix develop -c dotnet pack -c Release + - name: Publish to NuGet + working-directory: bindings/dotnet + # --skip-duplicate keeps re-runs of a partially failed release green; + # NuGet publications are irreversible, like the other registries here. + run: | + nix develop -c dotnet nuget push \ + 'bin/Release/Scip.${{ needs.publish.outputs.version }}.nupkg' \ + --source https://api.nuget.org/v3/index.json \ + --api-key '${{ secrets.NUGET_API_KEY }}' \ + --skip-duplicate + publish-haskell-bindings: needs: publish runs-on: ubuntu-latest @@ -262,7 +290,7 @@ jobs: gh release upload "$TAG" "$ASSET.tar.gz" "$ASSET.tar.gz.sha256" --clobber finalize-release: - needs: [publish, release-crate, publish-haskell-bindings, build-go-binaries, publish-jvm-bindings, publish-npm] + needs: [publish, release-crate, publish-dotnet-bindings, publish-haskell-bindings, build-go-binaries, publish-jvm-bindings, publish-npm] runs-on: ubuntu-latest permissions: contents: write diff --git a/.prettierignore b/.prettierignore index 5c262ad1..df3ca878 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,5 +2,7 @@ reprolang/target reprolang/src/grammar.json reprolang/src/node-types.json bindings/typescript +bindings/dotnet/bin +bindings/dotnet/obj docs/scip.md .bin diff --git a/bindings/dotnet/.gitignore b/bindings/dotnet/.gitignore new file mode 100644 index 00000000..cd42ee34 --- /dev/null +++ b/bindings/dotnet/.gitignore @@ -0,0 +1,2 @@ +bin/ +obj/ diff --git a/bindings/dotnet/LICENSE b/bindings/dotnet/LICENSE new file mode 120000 index 00000000..30cff740 --- /dev/null +++ b/bindings/dotnet/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/bindings/dotnet/README.md b/bindings/dotnet/README.md new file mode 100644 index 00000000..ada938ef --- /dev/null +++ b/bindings/dotnet/README.md @@ -0,0 +1,42 @@ +# `Scip` + +Generated .NET bindings for the [SCIP Code Intelligence Protocol]. + +## Install + +```sh +dotnet add package Scip +``` + +The package targets `netstandard2.0` and depends on [`Google.Protobuf`], which +is installed transitively. + +## Use + +```csharp +using Scip; +// Alias `Scip.Index`, which is ambiguous with `System.Index` under +// implicit usings. +using ScipIndex = Scip.Index; + +using var stream = File.OpenRead("index.scip"); +var index = ScipIndex.Parser.ParseFrom(stream); + +Console.WriteLine(index.Metadata.ProjectRoot); +foreach (var document in index.Documents) +{ + Console.WriteLine($"{document.RelativePath} {document.Occurrences.Count}"); +} +``` + +## Naming + +The `scip.Descriptor` message is generated as `Scip.SymbolDescriptor`: C# +rejects a class whose member has the same name as the class itself, and every +generated message carries a static `Descriptor` property. The name matches the +schema's own comments and the [scip-dotnet] indexer. Nothing else is renamed, +and the Protobuf descriptor still reports `scip.Descriptor`. + +[SCIP Code Intelligence Protocol]: https://github.com/scip-code/scip +[scip-dotnet]: https://github.com/sourcegraph/scip-dotnet +[`Google.Protobuf`]: https://www.nuget.org/packages/Google.Protobuf diff --git a/bindings/dotnet/Scip.csproj b/bindings/dotnet/Scip.csproj new file mode 100644 index 00000000..88d9f9da --- /dev/null +++ b/bindings/dotnet/Scip.csproj @@ -0,0 +1,48 @@ + + + + + netstandard2.0 + Scip + Scip + true + + + + Scip + + 0.9.0 + + Generated .NET bindings for the Semantic Code Intelligence Protocol (SCIP). + + SCIP Maintainers + scip-code + https://github.com/scip-code/scip + https://github.com/scip-code/scip.git + git + Apache-2.0 + README.md + scip;protobuf;code-intelligence;code-navigation + + + + + + + + + + + + + diff --git a/bindings/dotnet/deps.json b/bindings/dotnet/deps.json new file mode 100644 index 00000000..fdb7af95 --- /dev/null +++ b/bindings/dotnet/deps.json @@ -0,0 +1,37 @@ +[ + { + "pname": "Google.Protobuf", + "version": "3.34.2", + "hash": "sha256-2Ll4KYge9xzqBGP80aRbkJ2Nxc9lhvv7Oa1xBPJU0+k=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.1.0", + "hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM=" + }, + { + "pname": "NETStandard.Library", + "version": "2.0.3", + "hash": "sha256-Prh2RPebz/s8AzHb2sPHg3Jl8s31inv9k+Qxd293ybo=" + }, + { + "pname": "System.Buffers", + "version": "4.4.0", + "hash": "sha256-KTxAhYawFG2V5VX1jw3pzx3IrQXRgn1TsvgjPgxAbqA=" + }, + { + "pname": "System.Memory", + "version": "4.5.3", + "hash": "sha256-Cvl7RbRbRu9qKzeRBWjavUkseT2jhZBUWV1SPipUWFk=" + }, + { + "pname": "System.Numerics.Vectors", + "version": "4.4.0", + "hash": "sha256-auXQK2flL/JpnB/rEcAcUm4vYMCYMEMiWOCAlIaqu2U=" + }, + { + "pname": "System.Runtime.CompilerServices.Unsafe", + "version": "4.5.2", + "hash": "sha256-8eUXXGWO2LL7uATMZye2iCpQOETn2jCcjUhG6coR5O8=" + } +] diff --git a/bindings/dotnet/src/Scip.cs b/bindings/dotnet/src/Scip.cs new file mode 100644 index 00000000..6bf0c3ce --- /dev/null +++ b/bindings/dotnet/src/Scip.cs @@ -0,0 +1,5924 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: scip.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Scip { + + /// Holder for reflection information generated from scip.proto + public static partial class ScipReflection { + + #region Descriptor + /// File descriptor for scip.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ScipReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgpzY2lwLnByb3RvEgRzY2lwIqUBCgVJbmRleBIqCghtZXRhZGF0YRgBIAEo", + "CzIOLnNjaXAuTWV0YWRhdGFSCG1ldGFkYXRhEiwKCWRvY3VtZW50cxgCIAMo", + "CzIOLnNjaXAuRG9jdW1lbnRSCWRvY3VtZW50cxJCChBleHRlcm5hbF9zeW1i", + "b2xzGAMgAygLMhcuc2NpcC5TeW1ib2xJbmZvcm1hdGlvblIPZXh0ZXJuYWxT", + "eW1ib2xzItUBCghNZXRhZGF0YRIvCgd2ZXJzaW9uGAEgASgOMhUuc2NpcC5Q", + "cm90b2NvbFZlcnNpb25SB3ZlcnNpb24SKwoJdG9vbF9pbmZvGAIgASgLMg4u", + "c2NpcC5Ub29sSW5mb1IIdG9vbEluZm8SIQoMcHJvamVjdF9yb290GAMgASgJ", + "Ugtwcm9qZWN0Um9vdBJIChZ0ZXh0X2RvY3VtZW50X2VuY29kaW5nGAQgASgO", + "MhIuc2NpcC5UZXh0RW5jb2RpbmdSFHRleHREb2N1bWVudEVuY29kaW5nIlYK", + "CFRvb2xJbmZvEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHdmVyc2lvbhgCIAEo", + "CVIHdmVyc2lvbhIcCglhcmd1bWVudHMYAyADKAlSCWFyZ3VtZW50cyKLAgoI", + "RG9jdW1lbnQSGgoIbGFuZ3VhZ2UYBCABKAlSCGxhbmd1YWdlEiMKDXJlbGF0", + "aXZlX3BhdGgYASABKAlSDHJlbGF0aXZlUGF0aBIyCgtvY2N1cnJlbmNlcxgC", + "IAMoCzIQLnNjaXAuT2NjdXJyZW5jZVILb2NjdXJyZW5jZXMSMQoHc3ltYm9s", + "cxgDIAMoCzIXLnNjaXAuU3ltYm9sSW5mb3JtYXRpb25SB3N5bWJvbHMSEgoE", + "dGV4dBgFIAEoCVIEdGV4dBJDChFwb3NpdGlvbl9lbmNvZGluZxgGIAEoDjIW", + "LnNjaXAuUG9zaXRpb25FbmNvZGluZ1IQcG9zaXRpb25FbmNvZGluZyJ9CgZT", + "eW1ib2wSFgoGc2NoZW1lGAEgASgJUgZzY2hlbWUSJwoHcGFja2FnZRgCIAEo", + "CzINLnNjaXAuUGFja2FnZVIHcGFja2FnZRIyCgtkZXNjcmlwdG9ycxgDIAMo", + "CzIQLnNjaXAuRGVzY3JpcHRvclILZGVzY3JpcHRvcnMiUQoHUGFja2FnZRIY", + "CgdtYW5hZ2VyGAEgASgJUgdtYW5hZ2VyEhIKBG5hbWUYAiABKAlSBG5hbWUS", + "GAoHdmVyc2lvbhgDIAEoCVIHdmVyc2lvbiKfAgoKRGVzY3JpcHRvchISCgRu", + "YW1lGAEgASgJUgRuYW1lEiQKDWRpc2FtYmlndWF0b3IYAiABKAlSDWRpc2Ft", + "YmlndWF0b3ISLwoGc3VmZml4GAMgASgOMhcuc2NpcC5EZXNjcmlwdG9yLlN1", + "ZmZpeFIGc3VmZml4IqUBCgZTdWZmaXgSFQoRVW5zcGVjaWZpZWRTdWZmaXgQ", + "ABINCglOYW1lc3BhY2UQARIPCgdQYWNrYWdlEAEaAggBEggKBFR5cGUQAhII", + "CgRUZXJtEAMSCgoGTWV0aG9kEAQSEQoNVHlwZVBhcmFtZXRlchAFEg0KCVBh", + "cmFtZXRlchAGEggKBE1ldGEQBxIJCgVMb2NhbBAIEgkKBU1hY3JvEAkaAhAB", + "IoEBCglTaWduYXR1cmUSGgoIbGFuZ3VhZ2UYBCABKAlSCGxhbmd1YWdlEhIK", + "BHRleHQYBSABKAlSBHRleHQSMgoLb2NjdXJyZW5jZXMYAiADKAsyEC5zY2lw", + "Lk9jY3VycmVuY2VSC29jY3VycmVuY2VzSgQIARACSgQIAxAESgQIBhAHItMM", + "ChFTeW1ib2xJbmZvcm1hdGlvbhIWCgZzeW1ib2wYASABKAlSBnN5bWJvbBIk", + "Cg1kb2N1bWVudGF0aW9uGAMgAygJUg1kb2N1bWVudGF0aW9uEjgKDXJlbGF0", + "aW9uc2hpcHMYBCADKAsyEi5zY2lwLlJlbGF0aW9uc2hpcFINcmVsYXRpb25z", + "aGlwcxIwCgRraW5kGAUgASgOMhwuc2NpcC5TeW1ib2xJbmZvcm1hdGlvbi5L", + "aW5kUgRraW5kEiEKDGRpc3BsYXlfbmFtZRgGIAEoCVILZGlzcGxheU5hbWUS", + "SAoXc2lnbmF0dXJlX2RvY3VtZW50YXRpb24YByABKAsyDy5zY2lwLlNpZ25h", + "dHVyZVIWc2lnbmF0dXJlRG9jdW1lbnRhdGlvbhIpChBlbmNsb3Npbmdfc3lt", + "Ym9sGAggASgJUg9lbmNsb3NpbmdTeW1ib2wi+wkKBEtpbmQSEwoPVW5zcGVj", + "aWZpZWRLaW5kEAASEgoOQWJzdHJhY3RNZXRob2QQQhIMCghBY2Nlc3NvchBI", + "EgkKBUFycmF5EAESDQoJQXNzZXJ0aW9uEAISEgoOQXNzb2NpYXRlZFR5cGUQ", + "AxINCglBdHRyaWJ1dGUQBBIJCgVBeGlvbRAFEgsKB0Jvb2xlYW4QBhIJCgVD", + "bGFzcxAHEgsKB0NvbmNlcHQQVhIMCghDb25zdGFudBAIEg8KC0NvbnN0cnVj", + "dG9yEAkSDAoIQ29udHJhY3QQPhIOCgpEYXRhRmFtaWx5EAoSDAoIRGVsZWdh", + "dGUQSRIICgRFbnVtEAsSDgoKRW51bU1lbWJlchAMEgkKBUVycm9yED8SCQoF", + "RXZlbnQQDRINCglFeHRlbnNpb24QVBIICgRGYWN0EA4SCQoFRmllbGQQDxII", + "CgRGaWxlEBASDAoIRnVuY3Rpb24QERIKCgZHZXR0ZXIQEhILCgdHcmFtbWFy", + "EBMSDAoISW5zdGFuY2UQFBINCglJbnRlcmZhY2UQFRIHCgNLZXkQFhIICgRM", + "YW5nEBcSCQoFTGVtbWEQGBILCgdMaWJyYXJ5EEASCQoFTWFjcm8QGRIKCgZN", + "ZXRob2QQGhIPCgtNZXRob2RBbGlhcxBKEhIKDk1ldGhvZFJlY2VpdmVyEBsS", + "FwoTTWV0aG9kU3BlY2lmaWNhdGlvbhBDEgsKB01lc3NhZ2UQHBIJCgVNaXhp", + "bhBVEgwKCE1vZGlmaWVyEEESCgoGTW9kdWxlEB0SDQoJTmFtZXNwYWNlEB4S", + "CAoETnVsbBAfEgoKBk51bWJlchAgEgoKBk9iamVjdBAhEgwKCE9wZXJhdG9y", + "ECISCwoHUGFja2FnZRAjEhEKDVBhY2thZ2VPYmplY3QQJBINCglQYXJhbWV0", + "ZXIQJRISCg5QYXJhbWV0ZXJMYWJlbBAmEgsKB1BhdHRlcm4QJxINCglQcmVk", + "aWNhdGUQKBIMCghQcm9wZXJ0eRApEgwKCFByb3RvY29sECoSEgoOUHJvdG9j", + "b2xNZXRob2QQRBIVChFQdXJlVmlydHVhbE1ldGhvZBBFEg8KC1F1YXNpcXVv", + "dGVyECsSEQoNU2VsZlBhcmFtZXRlchAsEgoKBlNldHRlchAtEg0KCVNpZ25h", + "dHVyZRAuEhIKDlNpbmdsZXRvbkNsYXNzEEsSEwoPU2luZ2xldG9uTWV0aG9k", + "EEwSFAoQU3RhdGljRGF0YU1lbWJlchBNEg8KC1N0YXRpY0V2ZW50EE4SDwoL", + "U3RhdGljRmllbGQQTxIQCgxTdGF0aWNNZXRob2QQUBISCg5TdGF0aWNQcm9w", + "ZXJ0eRBREhIKDlN0YXRpY1ZhcmlhYmxlEFISCgoGU3RyaW5nEDASCgoGU3Ry", + "dWN0EDESDQoJU3Vic2NyaXB0EC8SCgoGVGFjdGljEDISCwoHVGhlb3JlbRAz", + "EhEKDVRoaXNQYXJhbWV0ZXIQNBIJCgVUcmFpdBA1Eg8KC1RyYWl0TWV0aG9k", + "EEYSCAoEVHlwZRA2Eg0KCVR5cGVBbGlhcxA3Eg0KCVR5cGVDbGFzcxA4EhMK", + "D1R5cGVDbGFzc01ldGhvZBBHEg4KClR5cGVGYW1pbHkQORIRCg1UeXBlUGFy", + "YW1ldGVyEDoSCQoFVW5pb24QOxIJCgVWYWx1ZRA8EgwKCFZhcmlhYmxlED0i", + "yQEKDFJlbGF0aW9uc2hpcBIWCgZzeW1ib2wYASABKAlSBnN5bWJvbBIhCgxp", + "c19yZWZlcmVuY2UYAiABKAhSC2lzUmVmZXJlbmNlEisKEWlzX2ltcGxlbWVu", + "dGF0aW9uGAMgASgIUhBpc0ltcGxlbWVudGF0aW9uEiwKEmlzX3R5cGVfZGVm", + "aW5pdGlvbhgEIAEoCFIQaXNUeXBlRGVmaW5pdGlvbhIjCg1pc19kZWZpbml0", + "aW9uGAUgASgIUgxpc0RlZmluaXRpb24icwoPU2luZ2xlTGluZVJhbmdlEhIK", + "BGxpbmUYASABKAVSBGxpbmUSJwoPc3RhcnRfY2hhcmFjdGVyGAIgASgFUg5z", + "dGFydENoYXJhY3RlchIjCg1lbmRfY2hhcmFjdGVyGAMgASgFUgxlbmRDaGFy", + "YWN0ZXIimAEKDk11bHRpTGluZVJhbmdlEh0KCnN0YXJ0X2xpbmUYASABKAVS", + "CXN0YXJ0TGluZRInCg9zdGFydF9jaGFyYWN0ZXIYAiABKAVSDnN0YXJ0Q2hh", + "cmFjdGVyEhkKCGVuZF9saW5lGAMgASgFUgdlbmRMaW5lEiMKDWVuZF9jaGFy", + "YWN0ZXIYBCABKAVSDGVuZENoYXJhY3RlciKIBQoKT2NjdXJyZW5jZRIYCgVy", + "YW5nZRgBIAMoBUICGAFSBXJhbmdlEkMKEXNpbmdsZV9saW5lX3JhbmdlGAgg", + "ASgLMhUuc2NpcC5TaW5nbGVMaW5lUmFuZ2VIAFIPc2luZ2xlTGluZVJhbmdl", + "EkAKEG11bHRpX2xpbmVfcmFuZ2UYCSABKAsyFC5zY2lwLk11bHRpTGluZVJh", + "bmdlSABSDm11bHRpTGluZVJhbmdlEhYKBnN5bWJvbBgCIAEoCVIGc3ltYm9s", + "EiEKDHN5bWJvbF9yb2xlcxgDIAEoBVILc3ltYm9sUm9sZXMSNQoWb3ZlcnJp", + "ZGVfZG9jdW1lbnRhdGlvbhgEIAMoCVIVb3ZlcnJpZGVEb2N1bWVudGF0aW9u", + "EjEKC3N5bnRheF9raW5kGAUgASgOMhAuc2NpcC5TeW50YXhLaW5kUgpzeW50", + "YXhLaW5kEjIKC2RpYWdub3N0aWNzGAYgAygLMhAuc2NpcC5EaWFnbm9zdGlj", + "UgtkaWFnbm9zdGljcxIrCg9lbmNsb3NpbmdfcmFuZ2UYByADKAVCAhgBUg5l", + "bmNsb3NpbmdSYW5nZRJWChtzaW5nbGVfbGluZV9lbmNsb3NpbmdfcmFuZ2UY", + "CiABKAsyFS5zY2lwLlNpbmdsZUxpbmVSYW5nZUgBUhhzaW5nbGVMaW5lRW5j", + "bG9zaW5nUmFuZ2USUwoabXVsdGlfbGluZV9lbmNsb3NpbmdfcmFuZ2UYCyAB", + "KAsyFC5zY2lwLk11bHRpTGluZVJhbmdlSAFSF211bHRpTGluZUVuY2xvc2lu", + "Z1JhbmdlQg0KC3R5cGVkX3JhbmdlQhcKFXR5cGVkX2VuY2xvc2luZ19yYW5n", + "ZSKnAQoKRGlhZ25vc3RpYxIqCghzZXZlcml0eRgBIAEoDjIOLnNjaXAuU2V2", + "ZXJpdHlSCHNldmVyaXR5EhIKBGNvZGUYAiABKAlSBGNvZGUSGAoHbWVzc2Fn", + "ZRgDIAEoCVIHbWVzc2FnZRIWCgZzb3VyY2UYBCABKAlSBnNvdXJjZRInCgR0", + "YWdzGAUgAygOMhMuc2NpcC5EaWFnbm9zdGljVGFnUgR0YWdzKjEKD1Byb3Rv", + "Y29sVmVyc2lvbhIeChpVbnNwZWNpZmllZFByb3RvY29sVmVyc2lvbhAAKkAK", + "DFRleHRFbmNvZGluZxIbChdVbnNwZWNpZmllZFRleHRFbmNvZGluZxAAEggK", + "BFVURjgQARIJCgVVVEYxNhACKqQBChBQb3NpdGlvbkVuY29kaW5nEh8KG1Vu", + "c3BlY2lmaWVkUG9zaXRpb25FbmNvZGluZxAAEiMKH1VURjhDb2RlVW5pdE9m", + "ZnNldEZyb21MaW5lU3RhcnQQARIkCiBVVEYxNkNvZGVVbml0T2Zmc2V0RnJv", + "bUxpbmVTdGFydBACEiQKIFVURjMyQ29kZVVuaXRPZmZzZXRGcm9tTGluZVN0", + "YXJ0EAMqlAEKClN5bWJvbFJvbGUSGQoVVW5zcGVjaWZpZWRTeW1ib2xSb2xl", + "EAASDgoKRGVmaW5pdGlvbhABEgoKBkltcG9ydBACEg8KC1dyaXRlQWNjZXNz", + "EAQSDgoKUmVhZEFjY2VzcxAIEg0KCUdlbmVyYXRlZBAQEggKBFRlc3QQIBIV", + "ChFGb3J3YXJkRGVmaW5pdGlvbhBAKuoGCgpTeW50YXhLaW5kEhkKFVVuc3Bl", + "Y2lmaWVkU3ludGF4S2luZBAAEgsKB0NvbW1lbnQQARIYChRQdW5jdHVhdGlv", + "bkRlbGltaXRlchACEhYKElB1bmN0dWF0aW9uQnJhY2tldBADEgsKB0tleXdv", + "cmQQBBIZChFJZGVudGlmaWVyS2V5d29yZBAEGgIIARIWChJJZGVudGlmaWVy", + "T3BlcmF0b3IQBRIOCgpJZGVudGlmaWVyEAYSFQoRSWRlbnRpZmllckJ1aWx0", + "aW4QBxISCg5JZGVudGlmaWVyTnVsbBAIEhYKEklkZW50aWZpZXJDb25zdGFu", + "dBAJEhsKF0lkZW50aWZpZXJNdXRhYmxlR2xvYmFsEAoSFwoTSWRlbnRpZmll", + "clBhcmFtZXRlchALEhMKD0lkZW50aWZpZXJMb2NhbBAMEhYKEklkZW50aWZp", + "ZXJTaGFkb3dlZBANEhcKE0lkZW50aWZpZXJOYW1lc3BhY2UQDhIYChBJZGVu", + "dGlmaWVyTW9kdWxlEA4aAggBEhYKEklkZW50aWZpZXJGdW5jdGlvbhAPEiAK", + "HElkZW50aWZpZXJGdW5jdGlvbkRlZmluaXRpb24QEBITCg9JZGVudGlmaWVy", + "TWFjcm8QERIdChlJZGVudGlmaWVyTWFjcm9EZWZpbml0aW9uEBISEgoOSWRl", + "bnRpZmllclR5cGUQExIZChVJZGVudGlmaWVyQnVpbHRpblR5cGUQFBIXChNJ", + "ZGVudGlmaWVyQXR0cmlidXRlEBUSDwoLUmVnZXhFc2NhcGUQFhIRCg1SZWdl", + "eFJlcGVhdGVkEBcSEQoNUmVnZXhXaWxkY2FyZBAYEhIKDlJlZ2V4RGVsaW1p", + "dGVyEBkSDQoJUmVnZXhKb2luEBoSEQoNU3RyaW5nTGl0ZXJhbBAbEhcKE1N0", + "cmluZ0xpdGVyYWxFc2NhcGUQHBIYChRTdHJpbmdMaXRlcmFsU3BlY2lhbBAd", + "EhQKEFN0cmluZ0xpdGVyYWxLZXkQHhIUChBDaGFyYWN0ZXJMaXRlcmFsEB8S", + "EgoOTnVtZXJpY0xpdGVyYWwQIBISCg5Cb29sZWFuTGl0ZXJhbBAhEgcKA1Rh", + "ZxAiEhAKDFRhZ0F0dHJpYnV0ZRAjEhAKDFRhZ0RlbGltaXRlchAkGgIQASpW", + "CghTZXZlcml0eRIXChNVbnNwZWNpZmllZFNldmVyaXR5EAASCQoFRXJyb3IQ", + "ARILCgdXYXJuaW5nEAISDwoLSW5mb3JtYXRpb24QAxIICgRIaW50EAQqTgoN", + "RGlhZ25vc3RpY1RhZxIcChhVbnNwZWNpZmllZERpYWdub3N0aWNUYWcQABIP", + "CgtVbm5lY2Vzc2FyeRABEg4KCkRlcHJlY2F0ZWQQAiqlCgoITGFuZ3VhZ2US", + "FwoTVW5zcGVjaWZpZWRMYW5ndWFnZRAAEggKBEFCQVAQPBIICgRBcGV4EGAS", + "BwoDQVBMEDESBwoDQWRhECcSCAoEQWdkYRAtEgwKCEFzY2lpRG9jEFYSDAoI", + "QXNzZW1ibHkQOhIHCgNBd2sQQhIHCgNCYXQQRBIKCgZCaWJUZVgQURIFCgFD", + "ECISCQoFQ09CT0wQOxIHCgNDUFAQIxIHCgNDU1MQGhIKCgZDU2hhcnAQARIL", + "CgdDbG9qdXJlEAgSEAoMQ29mZmVlc2NyaXB0EBUSDgoKQ29tbW9uTGlzcBAJ", + "EgcKA0NvcRAvEggKBENVREEQYRIICgREYXJ0EAMSCgoGRGVscGhpEDkSCAoE", + "RGlmZhBYEg4KCkRvY2tlcmZpbGUQUBIKCgZEeWFsb2cQMhIKCgZFbGl4aXIQ", + "ERIKCgZFcmxhbmcQEhIKCgZGU2hhcnAQKhIICgRGaXNoEEESCAoERmxvdxAY", + "EgsKB0ZvcnRyYW4QOBIOCgpHaXRfQ29tbWl0EFsSDgoKR2l0X0NvbmZpZxBZ", + "Eg4KCkdpdF9SZWJhc2UQXBIGCgJHbxAhEgsKB0dyYXBoUUwQYhIKCgZHcm9v", + "dnkQBxIICgRIVE1MEB4SCAoESGFjaxAUEg4KCkhhbmRsZWJhcnMQWhILCgdI", + "YXNrZWxsECwSCQoFSWRyaXMQLhIHCgNJbmkQSBIFCgFKEDMSCAoESlNPThBL", + "EggKBEphdmEQBhIOCgpKYXZhU2NyaXB0EBYSEwoPSmF2YVNjcmlwdFJlYWN0", + "EF0SCwoHSnNvbm5ldBBMEgkKBUp1bGlhEDcSDAoISnVzdGZpbGUQbRIKCgZL", + "b3RsaW4QBBIJCgVMYVRlWBBTEggKBExlYW4QMBIICgRMZXNzEBsSBwoDTHVh", + "EAwSCAoETHVhdRBsEgwKCE1ha2VmaWxlEE8SDAoITWFya2Rvd24QVBIKCgZN", + "YXRsYWIQNBIKCgZOaWNrZWwQbhIHCgNOaXgQTRIJCgVPQ2FtbBApEg8KC09i", + "amVjdGl2ZV9DECQSEQoNT2JqZWN0aXZlX0NQUBAlEggKBE9kaW4QbxIKCgZQ", + "YXNjYWwQYxIHCgNQSFAQExIJCgVQTFNRTBBGEggKBFBlcmwQDRIOCgpQb3dl", + "clNoZWxsEEMSCgoGUHJvbG9nEEcSDAoIUHJvdG9idWYQZBIKCgZQeXRob24Q", + "DxIFCgFSEDYSCgoGUmFja2V0EAsSCAoEUmFrdRAOEgkKBVJhem9yED4SCQoF", + "UmVwcm8QZhIICgRSZVNUEFUSCAoEUnVieRAQEggKBFJ1c3QQKBIHCgNTQVMQ", + "PRIICgRTQ1NTEB0SBwoDU01MECsSBwoDU1FMEEUSCAoEU2FzcxAcEgkKBVNj", + "YWxhEAUSCgoGU2NoZW1lEAoSDwoLU2hlbGxTY3JpcHQQQBILCgdTa3lsYXJr", + "EE4SCQoFU2xhbmcQaxIMCghTb2xpZGl0eRBfEgoKBlN2ZWx0ZRBqEgkKBVN3", + "aWZ0EAISBwoDVGNsEGUSCAoEVE9NTBBJEgcKA1RlWBBSEgoKBlRocmlmdBBn", + "Eg4KClR5cGVTY3JpcHQQFxITCg9UeXBlU2NyaXB0UmVhY3QQXhILCgdWZXJp", + "bG9nEGgSCAoEVkhETBBpEg8KC1Zpc3VhbEJhc2ljED8SBwoDVnVlEBkSCwoH", + "V29sZnJhbRA1EgcKA1hNTBAfEgcKA1hTTBAgEggKBFlBTUwQShIHCgNaaWcQ", + "JkJOChJvcmcuc2NpcF9jb2RlLnNjaXBCCVNjaXBQcm90b1ABWitnaXRodWIu", + "Y29tL3NjaXAtY29kZS9zY2lwL2JpbmRpbmdzL2dvL3NjaXAvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Scip.ProtocolVersion), typeof(global::Scip.TextEncoding), typeof(global::Scip.PositionEncoding), typeof(global::Scip.SymbolRole), typeof(global::Scip.SyntaxKind), typeof(global::Scip.Severity), typeof(global::Scip.DiagnosticTag), typeof(global::Scip.Language), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Index), global::Scip.Index.Parser, new[]{ "Metadata", "Documents", "ExternalSymbols" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Metadata), global::Scip.Metadata.Parser, new[]{ "Version", "ToolInfo", "ProjectRoot", "TextDocumentEncoding" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.ToolInfo), global::Scip.ToolInfo.Parser, new[]{ "Name", "Version", "Arguments" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Document), global::Scip.Document.Parser, new[]{ "Language", "RelativePath", "Occurrences", "Symbols", "Text", "PositionEncoding" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Symbol), global::Scip.Symbol.Parser, new[]{ "Scheme", "Package", "Descriptors" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Package), global::Scip.Package.Parser, new[]{ "Manager", "Name", "Version" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.SymbolDescriptor), global::Scip.SymbolDescriptor.Parser, new[]{ "Name", "Disambiguator", "Suffix" }, null, new[]{ typeof(global::Scip.SymbolDescriptor.Types.Suffix) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Signature), global::Scip.Signature.Parser, new[]{ "Language", "Text", "Occurrences" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.SymbolInformation), global::Scip.SymbolInformation.Parser, new[]{ "Symbol", "Documentation", "Relationships", "Kind", "DisplayName", "SignatureDocumentation", "EnclosingSymbol" }, null, new[]{ typeof(global::Scip.SymbolInformation.Types.Kind) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Relationship), global::Scip.Relationship.Parser, new[]{ "Symbol", "IsReference", "IsImplementation", "IsTypeDefinition", "IsDefinition" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.SingleLineRange), global::Scip.SingleLineRange.Parser, new[]{ "Line", "StartCharacter", "EndCharacter" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.MultiLineRange), global::Scip.MultiLineRange.Parser, new[]{ "StartLine", "StartCharacter", "EndLine", "EndCharacter" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Occurrence), global::Scip.Occurrence.Parser, new[]{ "Range", "SingleLineRange", "MultiLineRange", "Symbol", "SymbolRoles", "OverrideDocumentation", "SyntaxKind", "Diagnostics", "EnclosingRange", "SingleLineEnclosingRange", "MultiLineEnclosingRange" }, new[]{ "TypedRange", "TypedEnclosingRange" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Scip.Diagnostic), global::Scip.Diagnostic.Parser, new[]{ "Severity", "Code", "Message", "Source", "Tags" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum ProtocolVersion { + [pbr::OriginalName("UnspecifiedProtocolVersion")] UnspecifiedProtocolVersion = 0, + } + + public enum TextEncoding { + [pbr::OriginalName("UnspecifiedTextEncoding")] UnspecifiedTextEncoding = 0, + [pbr::OriginalName("UTF8")] Utf8 = 1, + [pbr::OriginalName("UTF16")] Utf16 = 2, + } + + /// + /// Encoding used to interpret the 'character' value in source ranges. + /// + public enum PositionEncoding { + /// + /// Default value. This value should not be used by new SCIP indexers + /// so that a consumer can process the SCIP index without ambiguity. + /// + [pbr::OriginalName("UnspecifiedPositionEncoding")] UnspecifiedPositionEncoding = 0, + /// + /// The 'character' value is interpreted as an offset in terms + /// of UTF-8 code units (i.e. bytes). + /// + /// Example: For the string "🚀 Woo" in UTF-8, the bytes are + /// [240, 159, 154, 128, 32, 87, 111, 111], so the offset for 'W' + /// would be 5. + /// + [pbr::OriginalName("UTF8CodeUnitOffsetFromLineStart")] Utf8CodeUnitOffsetFromLineStart = 1, + /// + /// The 'character' value is interpreted as an offset in terms + /// of UTF-16 code units (each is 2 bytes). + /// + /// Example: For the string "🚀 Woo", the UTF-16 code units are + /// ['\ud83d', '\ude80', ' ', 'W', 'o', 'o'], so the offset for 'W' + /// would be 3. + /// + [pbr::OriginalName("UTF16CodeUnitOffsetFromLineStart")] Utf16CodeUnitOffsetFromLineStart = 2, + /// + /// The 'character' value is interpreted as an offset in terms + /// of UTF-32 code units (each is 4 bytes). + /// + /// Example: For the string "🚀 Woo", the UTF-32 code units are + /// ['🚀', ' ', 'W', 'o', 'o'], so the offset for 'W' would be 2. + /// + [pbr::OriginalName("UTF32CodeUnitOffsetFromLineStart")] Utf32CodeUnitOffsetFromLineStart = 3, + } + + /// + /// 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`. + /// + public enum SymbolRole { + /// + /// This case is not meant to be used; it only exists to avoid an error + /// from the Protobuf code generator. + /// + [pbr::OriginalName("UnspecifiedSymbolRole")] UnspecifiedSymbolRole = 0, + /// + /// Is the symbol defined here? If not, then this is a symbol reference. + /// + [pbr::OriginalName("Definition")] Definition = 1, + /// + /// Is the symbol imported here? + /// + [pbr::OriginalName("Import")] Import = 2, + /// + /// Is the symbol written here? + /// + [pbr::OriginalName("WriteAccess")] WriteAccess = 4, + /// + /// Is the symbol read here? + /// + [pbr::OriginalName("ReadAccess")] ReadAccess = 8, + /// + /// Is the symbol in generated code? + /// + [pbr::OriginalName("Generated")] Generated = 16, + /// + /// Is the symbol in test code? + /// + [pbr::OriginalName("Test")] Test = 32, + /// + /// Is this a signature for a symbol that is defined elsewhere? + /// + /// Applies to forward declarations for languages like C, C++ + /// and Objective-C, as well as `val` declarations in interface + /// files in languages like SML and OCaml. + /// + [pbr::OriginalName("ForwardDefinition")] ForwardDefinition = 64, + } + + public enum SyntaxKind { + [pbr::OriginalName("UnspecifiedSyntaxKind")] UnspecifiedSyntaxKind = 0, + /// + /// Comment, including comment markers and text + /// + [pbr::OriginalName("Comment")] Comment = 1, + /// + /// `;` `.` `,` + /// + [pbr::OriginalName("PunctuationDelimiter")] PunctuationDelimiter = 2, + /// + /// (), {}, [] when used syntactically + /// + [pbr::OriginalName("PunctuationBracket")] PunctuationBracket = 3, + /// + /// `if`, `else`, `return`, `class`, etc. + /// + [pbr::OriginalName("Keyword")] Keyword = 4, + [global::System.ObsoleteAttribute] + [pbr::OriginalName("IdentifierKeyword", PreferredAlias = false)] IdentifierKeyword = 4, + /// + /// `+`, `*`, etc. + /// + [pbr::OriginalName("IdentifierOperator")] IdentifierOperator = 5, + /// + /// non-specific catch-all for any identifier not better described elsewhere + /// + [pbr::OriginalName("Identifier")] Identifier = 6, + /// + /// Identifiers builtin to the language: `min`, `print` in Python. + /// + [pbr::OriginalName("IdentifierBuiltin")] IdentifierBuiltin = 7, + /// + /// Identifiers representing `null`-like values: `None` in Python, `nil` in Go. + /// + [pbr::OriginalName("IdentifierNull")] IdentifierNull = 8, + /// + /// `xyz` in `const xyz = "hello"` + /// + [pbr::OriginalName("IdentifierConstant")] IdentifierConstant = 9, + /// + /// `var X = "hello"` in Go + /// + [pbr::OriginalName("IdentifierMutableGlobal")] IdentifierMutableGlobal = 10, + /// + /// Parameter definition and references + /// + [pbr::OriginalName("IdentifierParameter")] IdentifierParameter = 11, + /// + /// Identifiers for variable definitions and references within a local scope + /// + [pbr::OriginalName("IdentifierLocal")] IdentifierLocal = 12, + /// + /// Identifiers that shadow other identifiers in an outer scope + /// + [pbr::OriginalName("IdentifierShadowed")] IdentifierShadowed = 13, + /// + /// Identifier representing a unit of code abstraction and/or namespacing. + /// + /// NOTE: This corresponds to a package in Go and JVM languages, + /// and a module in languages like Python and JavaScript. + /// + [pbr::OriginalName("IdentifierNamespace")] IdentifierNamespace = 14, + [global::System.ObsoleteAttribute] + [pbr::OriginalName("IdentifierModule", PreferredAlias = false)] IdentifierModule = 14, + /// + /// Function references, including calls + /// + [pbr::OriginalName("IdentifierFunction")] IdentifierFunction = 15, + /// + /// Function definition only + /// + [pbr::OriginalName("IdentifierFunctionDefinition")] IdentifierFunctionDefinition = 16, + /// + /// Macro references, including invocations + /// + [pbr::OriginalName("IdentifierMacro")] IdentifierMacro = 17, + /// + /// Macro definition only + /// + [pbr::OriginalName("IdentifierMacroDefinition")] IdentifierMacroDefinition = 18, + /// + /// non-builtin types + /// + [pbr::OriginalName("IdentifierType")] IdentifierType = 19, + /// + /// builtin types only, such as `str` for Python or `int` in Go + /// + [pbr::OriginalName("IdentifierBuiltinType")] IdentifierBuiltinType = 20, + /// + /// Python decorators, c-like __attribute__ + /// + [pbr::OriginalName("IdentifierAttribute")] IdentifierAttribute = 21, + /// + /// `\b` + /// + [pbr::OriginalName("RegexEscape")] RegexEscape = 22, + /// + /// `*`, `+` + /// + [pbr::OriginalName("RegexRepeated")] RegexRepeated = 23, + /// + /// `.` + /// + [pbr::OriginalName("RegexWildcard")] RegexWildcard = 24, + /// + /// `(`, `)`, `[`, `]` + /// + [pbr::OriginalName("RegexDelimiter")] RegexDelimiter = 25, + /// + /// `|`, `-` + /// + [pbr::OriginalName("RegexJoin")] RegexJoin = 26, + /// + /// Literal strings: "Hello, world!" + /// + [pbr::OriginalName("StringLiteral")] StringLiteral = 27, + /// + /// non-regex escapes: "\t", "\n" + /// + [pbr::OriginalName("StringLiteralEscape")] StringLiteralEscape = 28, + /// + /// datetimes within strings, special words within a string, `{}` in format strings + /// + [pbr::OriginalName("StringLiteralSpecial")] StringLiteralSpecial = 29, + /// + /// "key" in { "key": "value" }, useful for example in JSON + /// + [pbr::OriginalName("StringLiteralKey")] StringLiteralKey = 30, + /// + /// 'c' or similar, in languages that differentiate strings and characters + /// + [pbr::OriginalName("CharacterLiteral")] CharacterLiteral = 31, + /// + /// Literal numbers, both floats and integers + /// + [pbr::OriginalName("NumericLiteral")] NumericLiteral = 32, + /// + /// `true`, `false` + /// + [pbr::OriginalName("BooleanLiteral")] BooleanLiteral = 33, + /// + /// Used for XML-like tags + /// + [pbr::OriginalName("Tag")] Tag = 34, + /// + /// Attribute name in XML-like tags + /// + [pbr::OriginalName("TagAttribute")] TagAttribute = 35, + /// + /// Delimiters for XML-like tags + /// + [pbr::OriginalName("TagDelimiter")] TagDelimiter = 36, + } + + public enum Severity { + [pbr::OriginalName("UnspecifiedSeverity")] UnspecifiedSeverity = 0, + [pbr::OriginalName("Error")] Error = 1, + [pbr::OriginalName("Warning")] Warning = 2, + [pbr::OriginalName("Information")] Information = 3, + [pbr::OriginalName("Hint")] Hint = 4, + } + + public enum DiagnosticTag { + [pbr::OriginalName("UnspecifiedDiagnosticTag")] UnspecifiedDiagnosticTag = 0, + [pbr::OriginalName("Unnecessary")] Unnecessary = 1, + [pbr::OriginalName("Deprecated")] Deprecated = 2, + } + + /// + /// Language standardises names of common programming languages that can be used + /// for the `Document.language` field. The primary purpose of this enum is to + /// prevent a situation where we have a single programming language ends up with + /// multiple string representations. For example, the C++ language uses the name + /// "CPP" in this enum and other names such as "cpp" are incompatible. + /// Feel free to send a pull-request to add missing programming languages. + /// + public enum Language { + [pbr::OriginalName("UnspecifiedLanguage")] UnspecifiedLanguage = 0, + [pbr::OriginalName("ABAP")] Abap = 60, + [pbr::OriginalName("Apex")] Apex = 96, + [pbr::OriginalName("APL")] Apl = 49, + [pbr::OriginalName("Ada")] Ada = 39, + [pbr::OriginalName("Agda")] Agda = 45, + [pbr::OriginalName("AsciiDoc")] AsciiDoc = 86, + [pbr::OriginalName("Assembly")] Assembly = 58, + [pbr::OriginalName("Awk")] Awk = 66, + [pbr::OriginalName("Bat")] Bat = 68, + [pbr::OriginalName("BibTeX")] BibTeX = 81, + [pbr::OriginalName("C")] C = 34, + [pbr::OriginalName("COBOL")] Cobol = 59, + /// + /// C++ (the name "CPP" was chosen for consistency with LSP) + /// + [pbr::OriginalName("CPP")] Cpp = 35, + [pbr::OriginalName("CSS")] Css = 26, + [pbr::OriginalName("CSharp")] Csharp = 1, + [pbr::OriginalName("Clojure")] Clojure = 8, + [pbr::OriginalName("Coffeescript")] Coffeescript = 21, + [pbr::OriginalName("CommonLisp")] CommonLisp = 9, + [pbr::OriginalName("Coq")] Coq = 47, + [pbr::OriginalName("CUDA")] Cuda = 97, + [pbr::OriginalName("Dart")] Dart = 3, + [pbr::OriginalName("Delphi")] Delphi = 57, + [pbr::OriginalName("Diff")] Diff = 88, + [pbr::OriginalName("Dockerfile")] Dockerfile = 80, + [pbr::OriginalName("Dyalog")] Dyalog = 50, + [pbr::OriginalName("Elixir")] Elixir = 17, + [pbr::OriginalName("Erlang")] Erlang = 18, + [pbr::OriginalName("FSharp")] Fsharp = 42, + [pbr::OriginalName("Fish")] Fish = 65, + [pbr::OriginalName("Flow")] Flow = 24, + [pbr::OriginalName("Fortran")] Fortran = 56, + [pbr::OriginalName("Git_Commit")] GitCommit = 91, + [pbr::OriginalName("Git_Config")] GitConfig = 89, + [pbr::OriginalName("Git_Rebase")] GitRebase = 92, + [pbr::OriginalName("Go")] Go = 33, + [pbr::OriginalName("GraphQL")] GraphQl = 98, + [pbr::OriginalName("Groovy")] Groovy = 7, + [pbr::OriginalName("HTML")] Html = 30, + [pbr::OriginalName("Hack")] Hack = 20, + [pbr::OriginalName("Handlebars")] Handlebars = 90, + [pbr::OriginalName("Haskell")] Haskell = 44, + [pbr::OriginalName("Idris")] Idris = 46, + [pbr::OriginalName("Ini")] Ini = 72, + [pbr::OriginalName("J")] J = 51, + [pbr::OriginalName("JSON")] Json = 75, + [pbr::OriginalName("Java")] Java = 6, + [pbr::OriginalName("JavaScript")] JavaScript = 22, + [pbr::OriginalName("JavaScriptReact")] JavaScriptReact = 93, + [pbr::OriginalName("Jsonnet")] Jsonnet = 76, + [pbr::OriginalName("Julia")] Julia = 55, + [pbr::OriginalName("Justfile")] Justfile = 109, + [pbr::OriginalName("Kotlin")] Kotlin = 4, + [pbr::OriginalName("LaTeX")] LaTeX = 83, + [pbr::OriginalName("Lean")] Lean = 48, + [pbr::OriginalName("Less")] Less = 27, + [pbr::OriginalName("Lua")] Lua = 12, + [pbr::OriginalName("Luau")] Luau = 108, + [pbr::OriginalName("Makefile")] Makefile = 79, + [pbr::OriginalName("Markdown")] Markdown = 84, + [pbr::OriginalName("Matlab")] Matlab = 52, + /// + /// https://nickel-lang.org/ + /// + [pbr::OriginalName("Nickel")] Nickel = 110, + [pbr::OriginalName("Nix")] Nix = 77, + [pbr::OriginalName("OCaml")] Ocaml = 41, + [pbr::OriginalName("Objective_C")] ObjectiveC = 36, + [pbr::OriginalName("Objective_CPP")] ObjectiveCpp = 37, + /// + /// https://odin-lang.org/ + /// + [pbr::OriginalName("Odin")] Odin = 111, + [pbr::OriginalName("Pascal")] Pascal = 99, + [pbr::OriginalName("PHP")] Php = 19, + [pbr::OriginalName("PLSQL")] Plsql = 70, + [pbr::OriginalName("Perl")] Perl = 13, + [pbr::OriginalName("PowerShell")] PowerShell = 67, + [pbr::OriginalName("Prolog")] Prolog = 71, + [pbr::OriginalName("Protobuf")] Protobuf = 100, + [pbr::OriginalName("Python")] Python = 15, + [pbr::OriginalName("R")] R = 54, + [pbr::OriginalName("Racket")] Racket = 11, + [pbr::OriginalName("Raku")] Raku = 14, + [pbr::OriginalName("Razor")] Razor = 62, + /// + /// Internal language for testing SCIP + /// + [pbr::OriginalName("Repro")] Repro = 102, + [pbr::OriginalName("ReST")] ReSt = 85, + [pbr::OriginalName("Ruby")] Ruby = 16, + [pbr::OriginalName("Rust")] Rust = 40, + [pbr::OriginalName("SAS")] Sas = 61, + [pbr::OriginalName("SCSS")] Scss = 29, + [pbr::OriginalName("SML")] Sml = 43, + [pbr::OriginalName("SQL")] Sql = 69, + [pbr::OriginalName("Sass")] Sass = 28, + [pbr::OriginalName("Scala")] Scala = 5, + [pbr::OriginalName("Scheme")] Scheme = 10, + /// + /// Bash + /// + [pbr::OriginalName("ShellScript")] ShellScript = 64, + [pbr::OriginalName("Skylark")] Skylark = 78, + [pbr::OriginalName("Slang")] Slang = 107, + [pbr::OriginalName("Solidity")] Solidity = 95, + [pbr::OriginalName("Svelte")] Svelte = 106, + [pbr::OriginalName("Swift")] Swift = 2, + [pbr::OriginalName("Tcl")] Tcl = 101, + [pbr::OriginalName("TOML")] Toml = 73, + [pbr::OriginalName("TeX")] TeX = 82, + [pbr::OriginalName("Thrift")] Thrift = 103, + [pbr::OriginalName("TypeScript")] TypeScript = 23, + [pbr::OriginalName("TypeScriptReact")] TypeScriptReact = 94, + [pbr::OriginalName("Verilog")] Verilog = 104, + [pbr::OriginalName("VHDL")] Vhdl = 105, + [pbr::OriginalName("VisualBasic")] VisualBasic = 63, + [pbr::OriginalName("Vue")] Vue = 25, + [pbr::OriginalName("Wolfram")] Wolfram = 53, + [pbr::OriginalName("XML")] Xml = 31, + [pbr::OriginalName("XSL")] Xsl = 32, + [pbr::OriginalName("YAML")] Yaml = 74, + /// + /// NextLanguage = 112; + /// Steps add a new language: + /// 1. Copy-paste the "NextLanguage = N" line above + /// 2. Increment "NextLanguage = N" to "NextLanguage = N+1" + /// 3. Replace "NextLanguage = N" with the name of the new language. + /// 4. Move the new language to the correct line above using alphabetical order + /// 5. (optional) Add a brief comment behind the language if the name is not self-explanatory + /// + [pbr::OriginalName("Zig")] Zig = 38, + } + + #endregion + + #region Messages + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Index : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Index()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Index() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Index(Index other) : this() { + metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null; + documents_ = other.documents_.Clone(); + externalSymbols_ = other.externalSymbols_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Index Clone() { + return new Index(this); + } + + /// Field number for the "metadata" field. + public const int MetadataFieldNumber = 1; + private global::Scip.Metadata metadata_; + /// + /// Metadata about this index. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.Metadata Metadata { + get { return metadata_; } + set { + metadata_ = value; + } + } + + /// Field number for the "documents" field. + public const int DocumentsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_documents_codec + = pb::FieldCodec.ForMessage(18, global::Scip.Document.Parser); + private readonly pbc::RepeatedField documents_ = new pbc::RepeatedField(); + /// + /// Documents that belong to this index. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Documents { + get { return documents_; } + } + + /// Field number for the "external_symbols" field. + public const int ExternalSymbolsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_externalSymbols_codec + = pb::FieldCodec.ForMessage(26, global::Scip.SymbolInformation.Parser); + private readonly pbc::RepeatedField externalSymbols_ = new pbc::RepeatedField(); + /// + /// (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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ExternalSymbols { + get { return externalSymbols_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Index); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Index other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Metadata, other.Metadata)) return false; + if(!documents_.Equals(other.documents_)) return false; + if(!externalSymbols_.Equals(other.externalSymbols_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (metadata_ != null) hash ^= Metadata.GetHashCode(); + hash ^= documents_.GetHashCode(); + hash ^= externalSymbols_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + documents_.WriteTo(output, _repeated_documents_codec); + externalSymbols_.WriteTo(output, _repeated_externalSymbols_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + documents_.WriteTo(ref output, _repeated_documents_codec); + externalSymbols_.WriteTo(ref output, _repeated_externalSymbols_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (metadata_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata); + } + size += documents_.CalculateSize(_repeated_documents_codec); + size += externalSymbols_.CalculateSize(_repeated_externalSymbols_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Index other) { + if (other == null) { + return; + } + if (other.metadata_ != null) { + if (metadata_ == null) { + Metadata = new global::Scip.Metadata(); + } + Metadata.MergeFrom(other.Metadata); + } + documents_.Add(other.documents_); + externalSymbols_.Add(other.externalSymbols_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Scip.Metadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + documents_.AddEntriesFrom(input, _repeated_documents_codec); + break; + } + case 26: { + externalSymbols_.AddEntriesFrom(input, _repeated_externalSymbols_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Scip.Metadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + documents_.AddEntriesFrom(ref input, _repeated_documents_codec); + break; + } + case 26: { + externalSymbols_.AddEntriesFrom(ref input, _repeated_externalSymbols_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Metadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Metadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metadata(Metadata other) : this() { + version_ = other.version_; + toolInfo_ = other.toolInfo_ != null ? other.toolInfo_.Clone() : null; + projectRoot_ = other.projectRoot_; + textDocumentEncoding_ = other.textDocumentEncoding_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metadata Clone() { + return new Metadata(this); + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 1; + private global::Scip.ProtocolVersion version_ = global::Scip.ProtocolVersion.UnspecifiedProtocolVersion; + /// + /// Which version of this protocol was used to generate this index? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.ProtocolVersion Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "tool_info" field. + public const int ToolInfoFieldNumber = 2; + private global::Scip.ToolInfo toolInfo_; + /// + /// Information about the tool that produced this index. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.ToolInfo ToolInfo { + get { return toolInfo_; } + set { + toolInfo_ = value; + } + } + + /// Field number for the "project_root" field. + public const int ProjectRootFieldNumber = 3; + private string projectRoot_ = ""; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProjectRoot { + get { return projectRoot_; } + set { + projectRoot_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "text_document_encoding" field. + public const int TextDocumentEncodingFieldNumber = 4; + private global::Scip.TextEncoding textDocumentEncoding_ = global::Scip.TextEncoding.UnspecifiedTextEncoding; + /// + /// Text encoding of the source files on disk that are referenced from + /// `Document.relative_path`. This value is unrelated to the `Document.text` + /// field, which is a Protobuf string and hence must be UTF-8 encoded. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.TextEncoding TextDocumentEncoding { + get { return textDocumentEncoding_; } + set { + textDocumentEncoding_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Metadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Metadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Version != other.Version) return false; + if (!object.Equals(ToolInfo, other.ToolInfo)) return false; + if (ProjectRoot != other.ProjectRoot) return false; + if (TextDocumentEncoding != other.TextDocumentEncoding) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Version != global::Scip.ProtocolVersion.UnspecifiedProtocolVersion) hash ^= Version.GetHashCode(); + if (toolInfo_ != null) hash ^= ToolInfo.GetHashCode(); + if (ProjectRoot.Length != 0) hash ^= ProjectRoot.GetHashCode(); + if (TextDocumentEncoding != global::Scip.TextEncoding.UnspecifiedTextEncoding) hash ^= TextDocumentEncoding.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Version != global::Scip.ProtocolVersion.UnspecifiedProtocolVersion) { + output.WriteRawTag(8); + output.WriteEnum((int) Version); + } + if (toolInfo_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ToolInfo); + } + if (ProjectRoot.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ProjectRoot); + } + if (TextDocumentEncoding != global::Scip.TextEncoding.UnspecifiedTextEncoding) { + output.WriteRawTag(32); + output.WriteEnum((int) TextDocumentEncoding); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Version != global::Scip.ProtocolVersion.UnspecifiedProtocolVersion) { + output.WriteRawTag(8); + output.WriteEnum((int) Version); + } + if (toolInfo_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ToolInfo); + } + if (ProjectRoot.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ProjectRoot); + } + if (TextDocumentEncoding != global::Scip.TextEncoding.UnspecifiedTextEncoding) { + output.WriteRawTag(32); + output.WriteEnum((int) TextDocumentEncoding); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Version != global::Scip.ProtocolVersion.UnspecifiedProtocolVersion) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Version); + } + if (toolInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ToolInfo); + } + if (ProjectRoot.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProjectRoot); + } + if (TextDocumentEncoding != global::Scip.TextEncoding.UnspecifiedTextEncoding) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TextDocumentEncoding); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Metadata other) { + if (other == null) { + return; + } + if (other.Version != global::Scip.ProtocolVersion.UnspecifiedProtocolVersion) { + Version = other.Version; + } + if (other.toolInfo_ != null) { + if (toolInfo_ == null) { + ToolInfo = new global::Scip.ToolInfo(); + } + ToolInfo.MergeFrom(other.ToolInfo); + } + if (other.ProjectRoot.Length != 0) { + ProjectRoot = other.ProjectRoot; + } + if (other.TextDocumentEncoding != global::Scip.TextEncoding.UnspecifiedTextEncoding) { + TextDocumentEncoding = other.TextDocumentEncoding; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Version = (global::Scip.ProtocolVersion) input.ReadEnum(); + break; + } + case 18: { + if (toolInfo_ == null) { + ToolInfo = new global::Scip.ToolInfo(); + } + input.ReadMessage(ToolInfo); + break; + } + case 26: { + ProjectRoot = input.ReadString(); + break; + } + case 32: { + TextDocumentEncoding = (global::Scip.TextEncoding) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Version = (global::Scip.ProtocolVersion) input.ReadEnum(); + break; + } + case 18: { + if (toolInfo_ == null) { + ToolInfo = new global::Scip.ToolInfo(); + } + input.ReadMessage(ToolInfo); + break; + } + case 26: { + ProjectRoot = input.ReadString(); + break; + } + case 32: { + TextDocumentEncoding = (global::Scip.TextEncoding) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ToolInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ToolInfo()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ToolInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ToolInfo(ToolInfo other) : this() { + name_ = other.name_; + version_ = other.version_; + arguments_ = other.arguments_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ToolInfo Clone() { + return new ToolInfo(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Name of the indexer that produced this index. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 2; + private string version_ = ""; + /// + /// Version of the indexer that produced this index. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Version { + get { return version_; } + set { + version_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "arguments" field. + public const int ArgumentsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_arguments_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField arguments_ = new pbc::RepeatedField(); + /// + /// Command-line arguments that were used to invoke this indexer. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Arguments { + get { return arguments_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ToolInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ToolInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Version != other.Version) return false; + if(!arguments_.Equals(other.arguments_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Version.Length != 0) hash ^= Version.GetHashCode(); + hash ^= arguments_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Version.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Version); + } + arguments_.WriteTo(output, _repeated_arguments_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Version.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Version); + } + arguments_.WriteTo(ref output, _repeated_arguments_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Version.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Version); + } + size += arguments_.CalculateSize(_repeated_arguments_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ToolInfo other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Version.Length != 0) { + Version = other.Version; + } + arguments_.Add(other.arguments_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Version = input.ReadString(); + break; + } + case 26: { + arguments_.AddEntriesFrom(input, _repeated_arguments_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Version = input.ReadString(); + break; + } + case 26: { + arguments_.AddEntriesFrom(ref input, _repeated_arguments_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Document defines the metadata about a source file on disk. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Document : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Document()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Document() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Document(Document other) : this() { + language_ = other.language_; + relativePath_ = other.relativePath_; + occurrences_ = other.occurrences_.Clone(); + symbols_ = other.symbols_.Clone(); + text_ = other.text_; + positionEncoding_ = other.positionEncoding_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Document Clone() { + return new Document(this); + } + + /// Field number for the "language" field. + public const int LanguageFieldNumber = 4; + private string language_ = ""; + /// + /// The string ID for the programming language this file is written in. + /// The `Language` enum contains the names of most common programming languages. + /// This field is typed as a string to permit any programming language, including + /// ones that are not specified by the `Language` enum. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Language { + get { return language_; } + set { + language_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "relative_path" field. + public const int RelativePathFieldNumber = 1; + private string relativePath_ = ""; + /// + /// (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 '..'. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RelativePath { + get { return relativePath_; } + set { + relativePath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "occurrences" field. + public const int OccurrencesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_occurrences_codec + = pb::FieldCodec.ForMessage(18, global::Scip.Occurrence.Parser); + private readonly pbc::RepeatedField occurrences_ = new pbc::RepeatedField(); + /// + /// Occurrences that appear in this file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Occurrences { + get { return occurrences_; } + } + + /// Field number for the "symbols" field. + public const int SymbolsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_symbols_codec + = pb::FieldCodec.ForMessage(26, global::Scip.SymbolInformation.Parser); + private readonly pbc::RepeatedField symbols_ = new pbc::RepeatedField(); + /// + /// 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). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Symbols { + get { return symbols_; } + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 5; + private string text_ = ""; + /// + /// (optional) Text contents of this document. Indexers are not expected to + /// include the text by default. It's preferable that clients read the text + /// contents from the file system by resolving the absolute path from joining + /// `Index.metadata.project_root` and `Document.relative_path`. This field + /// can be useful for testing or when working with virtual/in-memory documents. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return text_; } + set { + text_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "position_encoding" field. + public const int PositionEncodingFieldNumber = 6; + private global::Scip.PositionEncoding positionEncoding_ = global::Scip.PositionEncoding.UnspecifiedPositionEncoding; + /// + /// Specifies the encoding used for source ranges in this Document. + /// + /// Usually, this will match the type used to index the string type + /// in the indexer's implementation language in O(1) time. + /// - For an indexer implemented in JVM/.NET language or JavaScript/TypeScript, + /// use UTF16CodeUnitOffsetFromLineStart. + /// - For an indexer implemented in Python, + /// use UTF32CodeUnitOffsetFromLineStart. + /// - For an indexer implemented in Go, Rust or C++, + /// use UTF8ByteOffsetFromLineStart. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.PositionEncoding PositionEncoding { + get { return positionEncoding_; } + set { + positionEncoding_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Document); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Document other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Language != other.Language) return false; + if (RelativePath != other.RelativePath) return false; + if(!occurrences_.Equals(other.occurrences_)) return false; + if(!symbols_.Equals(other.symbols_)) return false; + if (Text != other.Text) return false; + if (PositionEncoding != other.PositionEncoding) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Language.Length != 0) hash ^= Language.GetHashCode(); + if (RelativePath.Length != 0) hash ^= RelativePath.GetHashCode(); + hash ^= occurrences_.GetHashCode(); + hash ^= symbols_.GetHashCode(); + if (Text.Length != 0) hash ^= Text.GetHashCode(); + if (PositionEncoding != global::Scip.PositionEncoding.UnspecifiedPositionEncoding) hash ^= PositionEncoding.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RelativePath.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RelativePath); + } + occurrences_.WriteTo(output, _repeated_occurrences_codec); + symbols_.WriteTo(output, _repeated_symbols_codec); + if (Language.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Language); + } + if (Text.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Text); + } + if (PositionEncoding != global::Scip.PositionEncoding.UnspecifiedPositionEncoding) { + output.WriteRawTag(48); + output.WriteEnum((int) PositionEncoding); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RelativePath.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RelativePath); + } + occurrences_.WriteTo(ref output, _repeated_occurrences_codec); + symbols_.WriteTo(ref output, _repeated_symbols_codec); + if (Language.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Language); + } + if (Text.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Text); + } + if (PositionEncoding != global::Scip.PositionEncoding.UnspecifiedPositionEncoding) { + output.WriteRawTag(48); + output.WriteEnum((int) PositionEncoding); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Language.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Language); + } + if (RelativePath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RelativePath); + } + size += occurrences_.CalculateSize(_repeated_occurrences_codec); + size += symbols_.CalculateSize(_repeated_symbols_codec); + if (Text.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + if (PositionEncoding != global::Scip.PositionEncoding.UnspecifiedPositionEncoding) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PositionEncoding); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Document other) { + if (other == null) { + return; + } + if (other.Language.Length != 0) { + Language = other.Language; + } + if (other.RelativePath.Length != 0) { + RelativePath = other.RelativePath; + } + occurrences_.Add(other.occurrences_); + symbols_.Add(other.symbols_); + if (other.Text.Length != 0) { + Text = other.Text; + } + if (other.PositionEncoding != global::Scip.PositionEncoding.UnspecifiedPositionEncoding) { + PositionEncoding = other.PositionEncoding; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RelativePath = input.ReadString(); + break; + } + case 18: { + occurrences_.AddEntriesFrom(input, _repeated_occurrences_codec); + break; + } + case 26: { + symbols_.AddEntriesFrom(input, _repeated_symbols_codec); + break; + } + case 34: { + Language = input.ReadString(); + break; + } + case 42: { + Text = input.ReadString(); + break; + } + case 48: { + PositionEncoding = (global::Scip.PositionEncoding) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RelativePath = input.ReadString(); + break; + } + case 18: { + occurrences_.AddEntriesFrom(ref input, _repeated_occurrences_codec); + break; + } + case 26: { + symbols_.AddEntriesFrom(ref input, _repeated_symbols_codec); + break; + } + case 34: { + Language = input.ReadString(); + break; + } + case 42: { + Text = input.ReadString(); + break; + } + case 48: { + PositionEncoding = (global::Scip.PositionEncoding) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// 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: + /// ``` + /// # (<x>)+ stands for one or more repetitions of <x> + /// # (<x>)? stands for zero or one occurrence of <x> + /// <symbol> ::= <scheme> ' ' <package> ' ' (<descriptor>)+ | 'local ' <local-id> + /// <package> ::= <manager> ' ' <package-name> ' ' <version> + /// <scheme> ::= any UTF-8, escape spaces with double space. Must not be empty nor start with 'local' + /// <manager> ::= any UTF-8, escape spaces with double space. Use the placeholder '.' to indicate an empty value + /// <package-name> ::= same as above + /// <version> ::= same as above + /// <descriptor> ::= <namespace> | <type> | <term> | <method> | <type-parameter> | <parameter> | <meta> | <macro> + /// <namespace> ::= <name> '/' + /// <type> ::= <name> '#' + /// <term> ::= <name> '.' + /// <meta> ::= <name> ':' + /// <macro> ::= <name> '!' + /// <method> ::= <name> '(' (<method-disambiguator>)? ').' + /// <type-parameter> ::= '[' <name> ']' + /// <parameter> ::= '(' <name> ')' + /// <name> ::= <identifier> + /// <method-disambiguator> ::= <simple-identifier> + /// <identifier> ::= <simple-identifier> | <escaped-identifier> + /// <simple-identifier> ::= (<identifier-character>)+ + /// <identifier-character> ::= '_' | '+' | '-' | '$' | ASCII letter or digit + /// <escaped-identifier> ::= '`' (<escaped-character>)+ '`', must contain at least one non-<identifier-character> + /// <escaped-characters> ::= any UTF-8, escape backticks with double backtick. + /// <local-id> ::= <simple-identifier> + /// ``` + /// + /// The list of descriptors for a symbol should together form a fully + /// qualified name for the symbol. That is, it should serve as a unique + /// identifier across the package. Typically, it will include one descriptor + /// for every node in the AST (along the ancestry path) between the root of + /// the file and the node corresponding to the symbol. + /// + /// Local symbols MUST only be used for entities which are local to a Document, + /// and cannot be accessed from outside the Document. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Symbol : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Symbol()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Symbol() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Symbol(Symbol other) : this() { + scheme_ = other.scheme_; + package_ = other.package_ != null ? other.package_.Clone() : null; + descriptors_ = other.descriptors_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Symbol Clone() { + return new Symbol(this); + } + + /// Field number for the "scheme" field. + public const int SchemeFieldNumber = 1; + private string scheme_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Scheme { + get { return scheme_; } + set { + scheme_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "package" field. + public const int PackageFieldNumber = 2; + private global::Scip.Package package_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.Package Package { + get { return package_; } + set { + package_ = value; + } + } + + /// Field number for the "descriptors" field. + public const int DescriptorsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_descriptors_codec + = pb::FieldCodec.ForMessage(26, global::Scip.SymbolDescriptor.Parser); + private readonly pbc::RepeatedField descriptors_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Descriptors { + get { return descriptors_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Symbol); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Symbol other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Scheme != other.Scheme) return false; + if (!object.Equals(Package, other.Package)) return false; + if(!descriptors_.Equals(other.descriptors_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Scheme.Length != 0) hash ^= Scheme.GetHashCode(); + if (package_ != null) hash ^= Package.GetHashCode(); + hash ^= descriptors_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Scheme.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Scheme); + } + if (package_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Package); + } + descriptors_.WriteTo(output, _repeated_descriptors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Scheme.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Scheme); + } + if (package_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Package); + } + descriptors_.WriteTo(ref output, _repeated_descriptors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Scheme.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Scheme); + } + if (package_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Package); + } + size += descriptors_.CalculateSize(_repeated_descriptors_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Symbol other) { + if (other == null) { + return; + } + if (other.Scheme.Length != 0) { + Scheme = other.Scheme; + } + if (other.package_ != null) { + if (package_ == null) { + Package = new global::Scip.Package(); + } + Package.MergeFrom(other.Package); + } + descriptors_.Add(other.descriptors_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Scheme = input.ReadString(); + break; + } + case 18: { + if (package_ == null) { + Package = new global::Scip.Package(); + } + input.ReadMessage(Package); + break; + } + case 26: { + descriptors_.AddEntriesFrom(input, _repeated_descriptors_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Scheme = input.ReadString(); + break; + } + case 18: { + if (package_ == null) { + Package = new global::Scip.Package(); + } + input.ReadMessage(Package); + break; + } + case 26: { + descriptors_.AddEntriesFrom(ref input, _repeated_descriptors_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Unit of packaging and distribution. + /// + /// NOTE: This corresponds to a module in Go and JVM languages. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Package : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Package()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Package() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Package(Package other) : this() { + manager_ = other.manager_; + name_ = other.name_; + version_ = other.version_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Package Clone() { + return new Package(this); + } + + /// Field number for the "manager" field. + public const int ManagerFieldNumber = 1; + private string manager_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Manager { + get { return manager_; } + set { + manager_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 3; + private string version_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Version { + get { return version_; } + set { + version_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Package); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Package other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Manager != other.Manager) return false; + if (Name != other.Name) return false; + if (Version != other.Version) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Manager.Length != 0) hash ^= Manager.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Version.Length != 0) hash ^= Version.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Manager.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Manager); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (Version.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Manager.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Manager); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (Version.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Manager.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Manager); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Version.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Version); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Package other) { + if (other == null) { + return; + } + if (other.Manager.Length != 0) { + Manager = other.Manager; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Version.Length != 0) { + Version = other.Version; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Manager = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 26: { + Version = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Manager = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 26: { + Version = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SymbolDescriptor : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SymbolDescriptor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolDescriptor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolDescriptor(SymbolDescriptor other) : this() { + name_ = other.name_; + disambiguator_ = other.disambiguator_; + suffix_ = other.suffix_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolDescriptor Clone() { + return new SymbolDescriptor(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "disambiguator" field. + public const int DisambiguatorFieldNumber = 2; + private string disambiguator_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Disambiguator { + get { return disambiguator_; } + set { + disambiguator_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "suffix" field. + public const int SuffixFieldNumber = 3; + private global::Scip.SymbolDescriptor.Types.Suffix suffix_ = global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix; + /// + /// NOTE: If you add new fields here, make sure to update the prepareSlot() + /// function responsible for parsing symbols. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.SymbolDescriptor.Types.Suffix Suffix { + get { return suffix_; } + set { + suffix_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SymbolDescriptor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SymbolDescriptor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Disambiguator != other.Disambiguator) return false; + if (Suffix != other.Suffix) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Disambiguator.Length != 0) hash ^= Disambiguator.GetHashCode(); + if (Suffix != global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix) hash ^= Suffix.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Disambiguator.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Disambiguator); + } + if (Suffix != global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix) { + output.WriteRawTag(24); + output.WriteEnum((int) Suffix); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Disambiguator.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Disambiguator); + } + if (Suffix != global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix) { + output.WriteRawTag(24); + output.WriteEnum((int) Suffix); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Disambiguator.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Disambiguator); + } + if (Suffix != global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Suffix); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SymbolDescriptor other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Disambiguator.Length != 0) { + Disambiguator = other.Disambiguator; + } + if (other.Suffix != global::Scip.SymbolDescriptor.Types.Suffix.UnspecifiedSuffix) { + Suffix = other.Suffix; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Disambiguator = input.ReadString(); + break; + } + case 24: { + Suffix = (global::Scip.SymbolDescriptor.Types.Suffix) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Disambiguator = input.ReadString(); + break; + } + case 24: { + Suffix = (global::Scip.SymbolDescriptor.Types.Suffix) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SymbolDescriptor message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Suffix { + [pbr::OriginalName("UnspecifiedSuffix")] UnspecifiedSuffix = 0, + /// + /// Unit of code abstraction and/or namespacing. + /// + /// NOTE: This corresponds to a package in Go and JVM languages. + /// + [pbr::OriginalName("Namespace")] Namespace = 1, + /// + /// Use Namespace instead. + /// + [global::System.ObsoleteAttribute] + [pbr::OriginalName("Package", PreferredAlias = false)] Package = 1, + [pbr::OriginalName("Type")] Type = 2, + [pbr::OriginalName("Term")] Term = 3, + [pbr::OriginalName("Method")] Method = 4, + [pbr::OriginalName("TypeParameter")] TypeParameter = 5, + [pbr::OriginalName("Parameter")] Parameter = 6, + /// + /// Can be used for any purpose. + /// + [pbr::OriginalName("Meta")] Meta = 7, + [pbr::OriginalName("Local")] Local = 8, + [pbr::OriginalName("Macro")] Macro = 9, + } + + } + #endregion + + } + + /// + /// Signature represents the signature of a symbol as it's displayed in API + /// documentation or hover tooltips. It uses a subset of Document's fields with + /// the same field numbers for wire compatibility with older indexes that encoded + /// signatures using the Document message type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Signature : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Signature()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Signature() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Signature(Signature other) : this() { + language_ = other.language_; + text_ = other.text_; + occurrences_ = other.occurrences_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Signature Clone() { + return new Signature(this); + } + + /// Field number for the "language" field. + public const int LanguageFieldNumber = 4; + private string language_ = ""; + /// + /// The language of the signature, e.g. "java", "go", "python". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Language { + get { return language_; } + set { + language_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 5; + private string text_ = ""; + /// + /// The text content of the signature, e.g. "void add(int a, int b)". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return text_; } + set { + text_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "occurrences" field. + public const int OccurrencesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_occurrences_codec + = pb::FieldCodec.ForMessage(18, global::Scip.Occurrence.Parser); + private readonly pbc::RepeatedField occurrences_ = new pbc::RepeatedField(); + /// + /// (optional) Occurrences within the signature text that reference other + /// symbols, enabling hyperlinking of types in the signature. Ranges are + /// relative to the `text` field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Occurrences { + get { return occurrences_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Signature); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Signature other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Language != other.Language) return false; + if (Text != other.Text) return false; + if(!occurrences_.Equals(other.occurrences_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Language.Length != 0) hash ^= Language.GetHashCode(); + if (Text.Length != 0) hash ^= Text.GetHashCode(); + hash ^= occurrences_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + occurrences_.WriteTo(output, _repeated_occurrences_codec); + if (Language.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Language); + } + if (Text.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + occurrences_.WriteTo(ref output, _repeated_occurrences_codec); + if (Language.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Language); + } + if (Text.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Language.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Language); + } + if (Text.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + size += occurrences_.CalculateSize(_repeated_occurrences_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Signature other) { + if (other == null) { + return; + } + if (other.Language.Length != 0) { + Language = other.Language; + } + if (other.Text.Length != 0) { + Text = other.Text; + } + occurrences_.Add(other.occurrences_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + occurrences_.AddEntriesFrom(input, _repeated_occurrences_codec); + break; + } + case 34: { + Language = input.ReadString(); + break; + } + case 42: { + Text = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + occurrences_.AddEntriesFrom(ref input, _repeated_occurrences_codec); + break; + } + case 34: { + Language = input.ReadString(); + break; + } + case 42: { + Text = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// SymbolInformation defines metadata about a symbol, such as the symbol's + /// docstring or what package it's defined it. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SymbolInformation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SymbolInformation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolInformation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolInformation(SymbolInformation other) : this() { + symbol_ = other.symbol_; + documentation_ = other.documentation_.Clone(); + relationships_ = other.relationships_.Clone(); + kind_ = other.kind_; + displayName_ = other.displayName_; + signatureDocumentation_ = other.signatureDocumentation_ != null ? other.signatureDocumentation_.Clone() : null; + enclosingSymbol_ = other.enclosingSymbol_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SymbolInformation Clone() { + return new SymbolInformation(this); + } + + /// Field number for the "symbol" field. + public const int SymbolFieldNumber = 1; + private string symbol_ = ""; + /// + /// Identifier of this symbol, which can be referenced from `Occurence.symbol`. + /// The string must be formatted according to the grammar in `Symbol`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Symbol { + get { return symbol_; } + set { + symbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "documentation" field. + public const int DocumentationFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_documentation_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField documentation_ = new pbc::RepeatedField(); + /// + /// (optional, but strongly recommended) The markdown-formatted documentation + /// for this symbol. Use `SymbolInformation.signature_documentation` to + /// document the method/class/type signature of this symbol. + /// Due to historical reasons, indexers may include signature documentation in + /// this field by rendering markdown code blocks. New indexers should only + /// include non-code documentation in this field, for example docstrings. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Documentation { + get { return documentation_; } + } + + /// Field number for the "relationships" field. + public const int RelationshipsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_relationships_codec + = pb::FieldCodec.ForMessage(34, global::Scip.Relationship.Parser); + private readonly pbc::RepeatedField relationships_ = new pbc::RepeatedField(); + /// + /// (optional) Relationships to other symbols (e.g., implements, type definition). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Relationships { + get { return relationships_; } + } + + /// Field number for the "kind" field. + public const int KindFieldNumber = 5; + private global::Scip.SymbolInformation.Types.Kind kind_ = global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind; + /// + /// The kind of this symbol. Use this field instead of + /// `SymbolDescriptor.Suffix` to determine whether something is, for example, a + /// class or a method. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.SymbolInformation.Types.Kind Kind { + get { return kind_; } + set { + kind_ = value; + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 6; + private string displayName_ = ""; + /// + /// (optional) The name of this symbol as it should be displayed to the user. + /// For example, the symbol "com/example/MyClass#myMethod(+1)." should have the + /// display name "myMethod". The `symbol` field is not a reliable source of + /// the display name for several reasons: + /// + /// - Local symbols don't encode the name. + /// - Some languages have case-insensitive names, so the symbol is all-lowercase. + /// - The symbol may encode names with special characters that should not be + /// displayed to the user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "signature_documentation" field. + public const int SignatureDocumentationFieldNumber = 7; + private global::Scip.Signature signatureDocumentation_; + /// + /// (optional) The signature of this symbol as it's displayed in API + /// documentation or in hover tooltips. For example, a Java method that adds + /// two numbers would have `Signature.language = "java"` and + /// `Signature.text = "void add(int a, int b)"`. The `language` and `text` + /// fields are required while `occurrences` can be optionally included to + /// support hyperlinking referenced symbols in the signature. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.Signature SignatureDocumentation { + get { return signatureDocumentation_; } + set { + signatureDocumentation_ = value; + } + } + + /// Field number for the "enclosing_symbol" field. + public const int EnclosingSymbolFieldNumber = 8; + private string enclosingSymbol_ = ""; + /// + /// (optional) The enclosing symbol if this is a local symbol. For non-local + /// symbols, the enclosing symbol should be parsed from the `symbol` field + /// using the `Descriptor` grammar. + /// + /// The primary use-case for this field is to allow local symbol to be displayed + /// in a symbol hierarchy for API documentation. It's OK to leave this field + /// empty for local variables since local variables usually don't belong in API + /// documentation. However, in the situation that you wish to include a local + /// symbol in the hierarchy, then you can use `enclosing_symbol` to locate the + /// "parent" or "owner" of this local symbol. For example, a Java indexer may + /// choose to use local symbols for private class fields while providing an + /// `enclosing_symbol` to reference the enclosing class to allow the field to + /// be part of the class documentation hierarchy. From the perspective of an + /// author of an indexer, the decision to use a local symbol or global symbol + /// should exclusively be determined whether the local symbol is accessible + /// outside the document, not by the capability to find the enclosing + /// symbol. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnclosingSymbol { + get { return enclosingSymbol_; } + set { + enclosingSymbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SymbolInformation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SymbolInformation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Symbol != other.Symbol) return false; + if(!documentation_.Equals(other.documentation_)) return false; + if(!relationships_.Equals(other.relationships_)) return false; + if (Kind != other.Kind) return false; + if (DisplayName != other.DisplayName) return false; + if (!object.Equals(SignatureDocumentation, other.SignatureDocumentation)) return false; + if (EnclosingSymbol != other.EnclosingSymbol) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Symbol.Length != 0) hash ^= Symbol.GetHashCode(); + hash ^= documentation_.GetHashCode(); + hash ^= relationships_.GetHashCode(); + if (Kind != global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind) hash ^= Kind.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (signatureDocumentation_ != null) hash ^= SignatureDocumentation.GetHashCode(); + if (EnclosingSymbol.Length != 0) hash ^= EnclosingSymbol.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Symbol.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Symbol); + } + documentation_.WriteTo(output, _repeated_documentation_codec); + relationships_.WriteTo(output, _repeated_relationships_codec); + if (Kind != global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind) { + output.WriteRawTag(40); + output.WriteEnum((int) Kind); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DisplayName); + } + if (signatureDocumentation_ != null) { + output.WriteRawTag(58); + output.WriteMessage(SignatureDocumentation); + } + if (EnclosingSymbol.Length != 0) { + output.WriteRawTag(66); + output.WriteString(EnclosingSymbol); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Symbol.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Symbol); + } + documentation_.WriteTo(ref output, _repeated_documentation_codec); + relationships_.WriteTo(ref output, _repeated_relationships_codec); + if (Kind != global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind) { + output.WriteRawTag(40); + output.WriteEnum((int) Kind); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DisplayName); + } + if (signatureDocumentation_ != null) { + output.WriteRawTag(58); + output.WriteMessage(SignatureDocumentation); + } + if (EnclosingSymbol.Length != 0) { + output.WriteRawTag(66); + output.WriteString(EnclosingSymbol); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Symbol.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Symbol); + } + size += documentation_.CalculateSize(_repeated_documentation_codec); + size += relationships_.CalculateSize(_repeated_relationships_codec); + if (Kind != global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (signatureDocumentation_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SignatureDocumentation); + } + if (EnclosingSymbol.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnclosingSymbol); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SymbolInformation other) { + if (other == null) { + return; + } + if (other.Symbol.Length != 0) { + Symbol = other.Symbol; + } + documentation_.Add(other.documentation_); + relationships_.Add(other.relationships_); + if (other.Kind != global::Scip.SymbolInformation.Types.Kind.UnspecifiedKind) { + Kind = other.Kind; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.signatureDocumentation_ != null) { + if (signatureDocumentation_ == null) { + SignatureDocumentation = new global::Scip.Signature(); + } + SignatureDocumentation.MergeFrom(other.SignatureDocumentation); + } + if (other.EnclosingSymbol.Length != 0) { + EnclosingSymbol = other.EnclosingSymbol; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Symbol = input.ReadString(); + break; + } + case 26: { + documentation_.AddEntriesFrom(input, _repeated_documentation_codec); + break; + } + case 34: { + relationships_.AddEntriesFrom(input, _repeated_relationships_codec); + break; + } + case 40: { + Kind = (global::Scip.SymbolInformation.Types.Kind) input.ReadEnum(); + break; + } + case 50: { + DisplayName = input.ReadString(); + break; + } + case 58: { + if (signatureDocumentation_ == null) { + SignatureDocumentation = new global::Scip.Signature(); + } + input.ReadMessage(SignatureDocumentation); + break; + } + case 66: { + EnclosingSymbol = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Symbol = input.ReadString(); + break; + } + case 26: { + documentation_.AddEntriesFrom(ref input, _repeated_documentation_codec); + break; + } + case 34: { + relationships_.AddEntriesFrom(ref input, _repeated_relationships_codec); + break; + } + case 40: { + Kind = (global::Scip.SymbolInformation.Types.Kind) input.ReadEnum(); + break; + } + case 50: { + DisplayName = input.ReadString(); + break; + } + case 58: { + if (signatureDocumentation_ == null) { + SignatureDocumentation = new global::Scip.Signature(); + } + input.ReadMessage(SignatureDocumentation); + break; + } + case 66: { + EnclosingSymbol = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SymbolInformation message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// (optional) Kind represents the fine-grained category of a symbol, suitable for presenting + /// information about the symbol's meaning in the language. + /// + /// For example: + /// - A Java method would have the kind `Method` while a Go function would + /// have the kind `Function`, even if the symbols for these use the same + /// syntax for the descriptor `SymbolDescriptor.Suffix.Method`. + /// - A Go struct has the symbol kind `Struct` while a Java class has + /// the symbol kind `Class` even if they both have the same descriptor: + /// `SymbolDescriptor.Suffix.Type`. + /// + /// Since Kind is more fine-grained than Suffix: + /// - If two symbols have the same Kind, they should share the same Suffix. + /// - If two symbols have different Suffixes, they should have different Kinds. + /// + public enum Kind { + [pbr::OriginalName("UnspecifiedKind")] UnspecifiedKind = 0, + /// + /// A method which may or may not have a body. For Java, Kotlin etc. + /// + [pbr::OriginalName("AbstractMethod")] AbstractMethod = 66, + /// + /// For Ruby's attr_accessor + /// + [pbr::OriginalName("Accessor")] Accessor = 72, + [pbr::OriginalName("Array")] Array = 1, + /// + /// For Alloy + /// + [pbr::OriginalName("Assertion")] Assertion = 2, + [pbr::OriginalName("AssociatedType")] AssociatedType = 3, + /// + /// For C++ + /// + [pbr::OriginalName("Attribute")] Attribute = 4, + /// + /// For Lean + /// + [pbr::OriginalName("Axiom")] Axiom = 5, + [pbr::OriginalName("Boolean")] Boolean = 6, + [pbr::OriginalName("Class")] Class = 7, + /// + /// For C++ + /// + [pbr::OriginalName("Concept")] Concept = 86, + [pbr::OriginalName("Constant")] Constant = 8, + [pbr::OriginalName("Constructor")] Constructor = 9, + /// + /// For Solidity + /// + [pbr::OriginalName("Contract")] Contract = 62, + /// + /// For Haskell + /// + [pbr::OriginalName("DataFamily")] DataFamily = 10, + /// + /// For C# and F# + /// + [pbr::OriginalName("Delegate")] Delegate = 73, + [pbr::OriginalName("Enum")] Enum = 11, + [pbr::OriginalName("EnumMember")] EnumMember = 12, + [pbr::OriginalName("Error")] Error = 63, + [pbr::OriginalName("Event")] Event = 13, + /// + /// For Dart + /// + [pbr::OriginalName("Extension")] Extension = 84, + /// + /// For Alloy + /// + [pbr::OriginalName("Fact")] Fact = 14, + [pbr::OriginalName("Field")] Field = 15, + [pbr::OriginalName("File")] File = 16, + [pbr::OriginalName("Function")] Function = 17, + /// + /// For 'get' in Swift, 'attr_reader' in Ruby + /// + [pbr::OriginalName("Getter")] Getter = 18, + /// + /// For Raku + /// + [pbr::OriginalName("Grammar")] Grammar = 19, + /// + /// For Purescript and Lean + /// + [pbr::OriginalName("Instance")] Instance = 20, + [pbr::OriginalName("Interface")] Interface = 21, + [pbr::OriginalName("Key")] Key = 22, + /// + /// For Racket + /// + [pbr::OriginalName("Lang")] Lang = 23, + /// + /// For Lean + /// + [pbr::OriginalName("Lemma")] Lemma = 24, + /// + /// For solidity + /// + [pbr::OriginalName("Library")] Library = 64, + [pbr::OriginalName("Macro")] Macro = 25, + [pbr::OriginalName("Method")] Method = 26, + /// + /// For Ruby + /// + [pbr::OriginalName("MethodAlias")] MethodAlias = 74, + /// + /// Analogous to 'ThisParameter' and 'SelfParameter', but for languages + /// like Go where the receiver doesn't have a conventional name. + /// + [pbr::OriginalName("MethodReceiver")] MethodReceiver = 27, + /// + /// Analogous to 'AbstractMethod', for Go. + /// + [pbr::OriginalName("MethodSpecification")] MethodSpecification = 67, + /// + /// For Protobuf + /// + [pbr::OriginalName("Message")] Message = 28, + /// + /// For Dart + /// + [pbr::OriginalName("Mixin")] Mixin = 85, + /// + /// For Solidity + /// + [pbr::OriginalName("Modifier")] Modifier = 65, + [pbr::OriginalName("Module")] Module = 29, + [pbr::OriginalName("Namespace")] Namespace = 30, + [pbr::OriginalName("Null")] Null = 31, + [pbr::OriginalName("Number")] Number = 32, + [pbr::OriginalName("Object")] Object = 33, + [pbr::OriginalName("Operator")] Operator = 34, + [pbr::OriginalName("Package")] Package = 35, + [pbr::OriginalName("PackageObject")] PackageObject = 36, + [pbr::OriginalName("Parameter")] Parameter = 37, + [pbr::OriginalName("ParameterLabel")] ParameterLabel = 38, + /// + /// For Haskell's PatternSynonyms + /// + [pbr::OriginalName("Pattern")] Pattern = 39, + /// + /// For Alloy + /// + [pbr::OriginalName("Predicate")] Predicate = 40, + [pbr::OriginalName("Property")] Property = 41, + /// + /// Analogous to 'Trait' and 'TypeClass', for Swift and Objective-C + /// + [pbr::OriginalName("Protocol")] Protocol = 42, + /// + /// Analogous to 'AbstractMethod', for Swift and Objective-C. + /// + [pbr::OriginalName("ProtocolMethod")] ProtocolMethod = 68, + /// + /// Analogous to 'AbstractMethod', for C++. + /// + [pbr::OriginalName("PureVirtualMethod")] PureVirtualMethod = 69, + /// + /// For Haskell + /// + [pbr::OriginalName("Quasiquoter")] Quasiquoter = 43, + /// + /// 'self' in Python, Rust, Swift etc. + /// + [pbr::OriginalName("SelfParameter")] SelfParameter = 44, + /// + /// For 'set' in Swift, 'attr_writer' in Ruby + /// + [pbr::OriginalName("Setter")] Setter = 45, + /// + /// For Alloy, analogous to 'Struct'. + /// + [pbr::OriginalName("Signature")] Signature = 46, + /// + /// For Ruby + /// + [pbr::OriginalName("SingletonClass")] SingletonClass = 75, + /// + /// Analogous to 'StaticMethod', for Ruby. + /// + [pbr::OriginalName("SingletonMethod")] SingletonMethod = 76, + /// + /// Analogous to 'StaticField', for C++ + /// + [pbr::OriginalName("StaticDataMember")] StaticDataMember = 77, + /// + /// For C# + /// + [pbr::OriginalName("StaticEvent")] StaticEvent = 78, + /// + /// For C# + /// + [pbr::OriginalName("StaticField")] StaticField = 79, + /// + /// For Java, C#, C++ etc. + /// + [pbr::OriginalName("StaticMethod")] StaticMethod = 80, + /// + /// For C#, TypeScript etc. + /// + [pbr::OriginalName("StaticProperty")] StaticProperty = 81, + /// + /// For C, C++ + /// + [pbr::OriginalName("StaticVariable")] StaticVariable = 82, + [pbr::OriginalName("String")] String = 48, + [pbr::OriginalName("Struct")] Struct = 49, + /// + /// For Swift + /// + [pbr::OriginalName("Subscript")] Subscript = 47, + /// + /// For Lean + /// + [pbr::OriginalName("Tactic")] Tactic = 50, + /// + /// For Lean + /// + [pbr::OriginalName("Theorem")] Theorem = 51, + /// + /// Method receiver for languages + /// 'this' in JavaScript, C++, Java etc. + /// + [pbr::OriginalName("ThisParameter")] ThisParameter = 52, + /// + /// Analogous to 'Protocol' and 'TypeClass', for Rust, Scala etc. + /// + [pbr::OriginalName("Trait")] Trait = 53, + /// + /// Analogous to 'AbstractMethod', for Rust, Scala etc. + /// + [pbr::OriginalName("TraitMethod")] TraitMethod = 70, + /// + /// Data type definition for languages like OCaml which use `type` + /// rather than separate keywords like `struct` and `enum`. + /// + [pbr::OriginalName("Type")] Type = 54, + [pbr::OriginalName("TypeAlias")] TypeAlias = 55, + /// + /// Analogous to 'Trait' and 'Protocol', for Haskell, Purescript etc. + /// + [pbr::OriginalName("TypeClass")] TypeClass = 56, + /// + /// Analogous to 'AbstractMethod', for Haskell, Purescript etc. + /// + [pbr::OriginalName("TypeClassMethod")] TypeClassMethod = 71, + /// + /// For Haskell + /// + [pbr::OriginalName("TypeFamily")] TypeFamily = 57, + [pbr::OriginalName("TypeParameter")] TypeParameter = 58, + /// + /// For C, C++, Capn Proto + /// + [pbr::OriginalName("Union")] Union = 59, + [pbr::OriginalName("Value")] Value = 60, + /// + /// Next = 87; + /// Feel free to open a PR proposing new language-specific kinds. + /// + [pbr::OriginalName("Variable")] Variable = 61, + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Relationship : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Relationship()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Relationship() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Relationship(Relationship other) : this() { + symbol_ = other.symbol_; + isReference_ = other.isReference_; + isImplementation_ = other.isImplementation_; + isTypeDefinition_ = other.isTypeDefinition_; + isDefinition_ = other.isDefinition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Relationship Clone() { + return new Relationship(this); + } + + /// Field number for the "symbol" field. + public const int SymbolFieldNumber = 1; + private string symbol_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Symbol { + get { return symbol_; } + set { + symbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "is_reference" field. + public const int IsReferenceFieldNumber = 2; + private bool isReference_; + /// + /// When resolving "Find references", this field documents what other symbols + /// should be included together with this symbol. For example, consider the + /// following TypeScript code that defines two symbols `Animal#sound()` and + /// `Dog#sound()`: + /// ```ts + /// interface Animal { + /// ^^^^^^ definition Animal# + /// sound(): string + /// ^^^^^ definition Animal#sound() + /// } + /// class Dog implements Animal { + /// ^^^ definition Dog#, relationships = [{symbol: "Animal#", is_implementation: true}] + /// public sound(): string { return "woof" } + /// ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), relationships = [{symbol: "Animal#sound()", is_implementation:true, is_reference: true}] + /// } + /// const animal: Animal = new Dog() + /// ^^^^^^ reference Animal# + /// console.log(animal.sound()) + /// ^^^^^ reference Animal#sound() + /// ``` + /// Doing "Find references" on the symbol `Animal#sound()` should return + /// references to the `Dog#sound()` method as well. Vice-versa, doing "Find + /// references" on the `Dog#sound()` method should include references to the + /// `Animal#sound()` method as well. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsReference { + get { return isReference_; } + set { + isReference_ = value; + } + } + + /// Field number for the "is_implementation" field. + public const int IsImplementationFieldNumber = 3; + private bool isImplementation_; + /// + /// Similar to `is_reference` but for "Find implementations". + /// It's common for `is_implementation` and `is_reference` to both be true but + /// it's not always the case. + /// In the TypeScript example above, observe that `Dog#` has an + /// `is_implementation` relationship with `"Animal#"` but not `is_reference`. + /// This is because "Find references" on the "Animal#" symbol should not return + /// "Dog#". We only want "Dog#" to return as a result for "Find + /// implementations" on the "Animal#" symbol. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsImplementation { + get { return isImplementation_; } + set { + isImplementation_ = value; + } + } + + /// Field number for the "is_type_definition" field. + public const int IsTypeDefinitionFieldNumber = 4; + private bool isTypeDefinition_; + /// + /// Similar to `references_symbols` but for "Go to type definition". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsTypeDefinition { + get { return isTypeDefinition_; } + set { + isTypeDefinition_ = value; + } + } + + /// Field number for the "is_definition" field. + public const int IsDefinitionFieldNumber = 5; + private bool isDefinition_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsDefinition { + get { return isDefinition_; } + set { + isDefinition_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Relationship); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Relationship other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Symbol != other.Symbol) return false; + if (IsReference != other.IsReference) return false; + if (IsImplementation != other.IsImplementation) return false; + if (IsTypeDefinition != other.IsTypeDefinition) return false; + if (IsDefinition != other.IsDefinition) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Symbol.Length != 0) hash ^= Symbol.GetHashCode(); + if (IsReference != false) hash ^= IsReference.GetHashCode(); + if (IsImplementation != false) hash ^= IsImplementation.GetHashCode(); + if (IsTypeDefinition != false) hash ^= IsTypeDefinition.GetHashCode(); + if (IsDefinition != false) hash ^= IsDefinition.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Symbol.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Symbol); + } + if (IsReference != false) { + output.WriteRawTag(16); + output.WriteBool(IsReference); + } + if (IsImplementation != false) { + output.WriteRawTag(24); + output.WriteBool(IsImplementation); + } + if (IsTypeDefinition != false) { + output.WriteRawTag(32); + output.WriteBool(IsTypeDefinition); + } + if (IsDefinition != false) { + output.WriteRawTag(40); + output.WriteBool(IsDefinition); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Symbol.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Symbol); + } + if (IsReference != false) { + output.WriteRawTag(16); + output.WriteBool(IsReference); + } + if (IsImplementation != false) { + output.WriteRawTag(24); + output.WriteBool(IsImplementation); + } + if (IsTypeDefinition != false) { + output.WriteRawTag(32); + output.WriteBool(IsTypeDefinition); + } + if (IsDefinition != false) { + output.WriteRawTag(40); + output.WriteBool(IsDefinition); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Symbol.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Symbol); + } + if (IsReference != false) { + size += 1 + 1; + } + if (IsImplementation != false) { + size += 1 + 1; + } + if (IsTypeDefinition != false) { + size += 1 + 1; + } + if (IsDefinition != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Relationship other) { + if (other == null) { + return; + } + if (other.Symbol.Length != 0) { + Symbol = other.Symbol; + } + if (other.IsReference != false) { + IsReference = other.IsReference; + } + if (other.IsImplementation != false) { + IsImplementation = other.IsImplementation; + } + if (other.IsTypeDefinition != false) { + IsTypeDefinition = other.IsTypeDefinition; + } + if (other.IsDefinition != false) { + IsDefinition = other.IsDefinition; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Symbol = input.ReadString(); + break; + } + case 16: { + IsReference = input.ReadBool(); + break; + } + case 24: { + IsImplementation = input.ReadBool(); + break; + } + case 32: { + IsTypeDefinition = input.ReadBool(); + break; + } + case 40: { + IsDefinition = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Symbol = input.ReadString(); + break; + } + case 16: { + IsReference = input.ReadBool(); + break; + } + case 24: { + IsImplementation = input.ReadBool(); + break; + } + case 32: { + IsTypeDefinition = input.ReadBool(); + break; + } + case 40: { + IsDefinition = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// SingleLineRange represents a half-open [start, end) range within a single line. + /// + /// Line numbers and characters are always 0-based. Make sure to increment them + /// before displaying in an editor-like UI because editors conventionally use + /// 1-based numbers. The `character` values are interpreted based on the + /// `PositionEncoding` for the enclosing Document. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SingleLineRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SingleLineRange()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SingleLineRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SingleLineRange(SingleLineRange other) : this() { + line_ = other.line_; + startCharacter_ = other.startCharacter_; + endCharacter_ = other.endCharacter_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SingleLineRange Clone() { + return new SingleLineRange(this); + } + + /// Field number for the "line" field. + public const int LineFieldNumber = 1; + private int line_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Line { + get { return line_; } + set { + line_ = value; + } + } + + /// Field number for the "start_character" field. + public const int StartCharacterFieldNumber = 2; + private int startCharacter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int StartCharacter { + get { return startCharacter_; } + set { + startCharacter_ = value; + } + } + + /// Field number for the "end_character" field. + public const int EndCharacterFieldNumber = 3; + private int endCharacter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EndCharacter { + get { return endCharacter_; } + set { + endCharacter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SingleLineRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SingleLineRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Line != other.Line) return false; + if (StartCharacter != other.StartCharacter) return false; + if (EndCharacter != other.EndCharacter) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Line != 0) hash ^= Line.GetHashCode(); + if (StartCharacter != 0) hash ^= StartCharacter.GetHashCode(); + if (EndCharacter != 0) hash ^= EndCharacter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Line != 0) { + output.WriteRawTag(8); + output.WriteInt32(Line); + } + if (StartCharacter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartCharacter); + } + if (EndCharacter != 0) { + output.WriteRawTag(24); + output.WriteInt32(EndCharacter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Line != 0) { + output.WriteRawTag(8); + output.WriteInt32(Line); + } + if (StartCharacter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartCharacter); + } + if (EndCharacter != 0) { + output.WriteRawTag(24); + output.WriteInt32(EndCharacter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Line != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Line); + } + if (StartCharacter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartCharacter); + } + if (EndCharacter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EndCharacter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SingleLineRange other) { + if (other == null) { + return; + } + if (other.Line != 0) { + Line = other.Line; + } + if (other.StartCharacter != 0) { + StartCharacter = other.StartCharacter; + } + if (other.EndCharacter != 0) { + EndCharacter = other.EndCharacter; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Line = input.ReadInt32(); + break; + } + case 16: { + StartCharacter = input.ReadInt32(); + break; + } + case 24: { + EndCharacter = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Line = input.ReadInt32(); + break; + } + case 16: { + StartCharacter = input.ReadInt32(); + break; + } + case 24: { + EndCharacter = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// MultiLineRange represents a half-open [start, end) range spanning multiple lines. + /// + /// Line numbers and characters are always 0-based. Make sure to increment them + /// before displaying in an editor-like UI because editors conventionally use + /// 1-based numbers. The `character` values are interpreted based on the + /// `PositionEncoding` for the enclosing Document. + /// + /// Producers SHOULD use `SingleLineRange` when `start_line == end_line` to keep + /// indexes compact, but consumers MUST accept multi-line encoding even when the + /// range happens to fit on a single line. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MultiLineRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MultiLineRange()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiLineRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiLineRange(MultiLineRange other) : this() { + startLine_ = other.startLine_; + startCharacter_ = other.startCharacter_; + endLine_ = other.endLine_; + endCharacter_ = other.endCharacter_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiLineRange Clone() { + return new MultiLineRange(this); + } + + /// Field number for the "start_line" field. + public const int StartLineFieldNumber = 1; + private int startLine_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int StartLine { + get { return startLine_; } + set { + startLine_ = value; + } + } + + /// Field number for the "start_character" field. + public const int StartCharacterFieldNumber = 2; + private int startCharacter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int StartCharacter { + get { return startCharacter_; } + set { + startCharacter_ = value; + } + } + + /// Field number for the "end_line" field. + public const int EndLineFieldNumber = 3; + private int endLine_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EndLine { + get { return endLine_; } + set { + endLine_ = value; + } + } + + /// Field number for the "end_character" field. + public const int EndCharacterFieldNumber = 4; + private int endCharacter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EndCharacter { + get { return endCharacter_; } + set { + endCharacter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MultiLineRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MultiLineRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (StartLine != other.StartLine) return false; + if (StartCharacter != other.StartCharacter) return false; + if (EndLine != other.EndLine) return false; + if (EndCharacter != other.EndCharacter) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (StartLine != 0) hash ^= StartLine.GetHashCode(); + if (StartCharacter != 0) hash ^= StartCharacter.GetHashCode(); + if (EndLine != 0) hash ^= EndLine.GetHashCode(); + if (EndCharacter != 0) hash ^= EndCharacter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (StartLine != 0) { + output.WriteRawTag(8); + output.WriteInt32(StartLine); + } + if (StartCharacter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartCharacter); + } + if (EndLine != 0) { + output.WriteRawTag(24); + output.WriteInt32(EndLine); + } + if (EndCharacter != 0) { + output.WriteRawTag(32); + output.WriteInt32(EndCharacter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (StartLine != 0) { + output.WriteRawTag(8); + output.WriteInt32(StartLine); + } + if (StartCharacter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartCharacter); + } + if (EndLine != 0) { + output.WriteRawTag(24); + output.WriteInt32(EndLine); + } + if (EndCharacter != 0) { + output.WriteRawTag(32); + output.WriteInt32(EndCharacter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (StartLine != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartLine); + } + if (StartCharacter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartCharacter); + } + if (EndLine != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EndLine); + } + if (EndCharacter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EndCharacter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MultiLineRange other) { + if (other == null) { + return; + } + if (other.StartLine != 0) { + StartLine = other.StartLine; + } + if (other.StartCharacter != 0) { + StartCharacter = other.StartCharacter; + } + if (other.EndLine != 0) { + EndLine = other.EndLine; + } + if (other.EndCharacter != 0) { + EndCharacter = other.EndCharacter; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + StartLine = input.ReadInt32(); + break; + } + case 16: { + StartCharacter = input.ReadInt32(); + break; + } + case 24: { + EndLine = input.ReadInt32(); + break; + } + case 32: { + EndCharacter = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + StartLine = input.ReadInt32(); + break; + } + case 16: { + StartCharacter = input.ReadInt32(); + break; + } + case 24: { + EndLine = input.ReadInt32(); + break; + } + case 32: { + EndCharacter = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// 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. + /// + /// Range encoding: + /// + /// An Occurrence carries its source range in one of two ways: the deprecated + /// `range` field (a `repeated int32` packed encoding kept for backward + /// compatibility), or one of the typed alternatives in the `typed_range` + /// oneof. New producers SHOULD set `typed_range` and SHOULD NOT set the + /// deprecated `range` field. The same rule applies to `enclosing_range` and + /// `typed_enclosing_range`. + /// + /// When both encodings are present on the same Occurrence, `typed_range` takes + /// precedence over `range` (likewise `typed_enclosing_range` over + /// `enclosing_range`). Producers that set both forms MUST keep them + /// semantically equivalent. Consumers SHOULD prefer the typed form when + /// available and fall back to the `repeated int32` form otherwise. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Occurrence : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Occurrence()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Occurrence() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Occurrence(Occurrence other) : this() { + range_ = other.range_.Clone(); + symbol_ = other.symbol_; + symbolRoles_ = other.symbolRoles_; + overrideDocumentation_ = other.overrideDocumentation_.Clone(); + syntaxKind_ = other.syntaxKind_; + diagnostics_ = other.diagnostics_.Clone(); + enclosingRange_ = other.enclosingRange_.Clone(); + switch (other.TypedRangeCase) { + case TypedRangeOneofCase.SingleLineRange: + SingleLineRange = other.SingleLineRange.Clone(); + break; + case TypedRangeOneofCase.MultiLineRange: + MultiLineRange = other.MultiLineRange.Clone(); + break; + } + + switch (other.TypedEnclosingRangeCase) { + case TypedEnclosingRangeOneofCase.SingleLineEnclosingRange: + SingleLineEnclosingRange = other.SingleLineEnclosingRange.Clone(); + break; + case TypedEnclosingRangeOneofCase.MultiLineEnclosingRange: + MultiLineEnclosingRange = other.MultiLineEnclosingRange.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Occurrence Clone() { + return new Occurrence(this); + } + + /// Field number for the "range" field. + public const int RangeFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_range_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField range_ = new pbc::RepeatedField(); + /// + /// Deprecated: Use `single_line_range` or `multi_line_range` instead. + /// + /// Half-open [start, end) range. Must be exactly three or four elements: + /// - Three elements: `[startLine, startCharacter, endCharacter]` (single-line) + /// - Four elements: `[startLine, startCharacter, endLine, endCharacter]` + /// + /// The end line of a three-element range is inferred to equal the start line. + /// + /// 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. However, the lack of type safety led to the introduction of + /// `single_line_range` and `multi_line_range` as typed alternatives; the + /// typed encoding's per-index size overhead is small (single-digit percent) + /// because ranges are only a fraction of a typical index payload. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Range { + get { return range_; } + } + + /// Field number for the "single_line_range" field. + public const int SingleLineRangeFieldNumber = 8; + /// + /// Range spanning a single line. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.SingleLineRange SingleLineRange { + get { return typedRangeCase_ == TypedRangeOneofCase.SingleLineRange ? (global::Scip.SingleLineRange) typedRange_ : null; } + set { + typedRange_ = value; + typedRangeCase_ = value == null ? TypedRangeOneofCase.None : TypedRangeOneofCase.SingleLineRange; + } + } + + /// Field number for the "multi_line_range" field. + public const int MultiLineRangeFieldNumber = 9; + /// + /// Range spanning multiple lines. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.MultiLineRange MultiLineRange { + get { return typedRangeCase_ == TypedRangeOneofCase.MultiLineRange ? (global::Scip.MultiLineRange) typedRange_ : null; } + set { + typedRange_ = value; + typedRangeCase_ = value == null ? TypedRangeOneofCase.None : TypedRangeOneofCase.MultiLineRange; + } + } + + /// Field number for the "symbol" field. + public const int SymbolFieldNumber = 2; + private string symbol_ = ""; + /// + /// (optional) The symbol that appears at this position. See + /// `SymbolInformation.symbol` for how to format symbols as strings. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Symbol { + get { return symbol_; } + set { + symbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "symbol_roles" field. + public const int SymbolRolesFieldNumber = 3; + private int symbolRoles_; + /// + /// (optional) Bitset containing `SymbolRole`s in this occurrence. + /// See `SymbolRole`'s documentation for how to read and write this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SymbolRoles { + get { return symbolRoles_; } + set { + symbolRoles_ = value; + } + } + + /// Field number for the "override_documentation" field. + public const int OverrideDocumentationFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_overrideDocumentation_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField overrideDocumentation_ = new pbc::RepeatedField(); + /// + /// (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<T>`) and at this + /// occurrence we know the exact values (such as `List<String>`). + /// + /// This field can also be used for dynamically or gradually typed languages, + /// which commonly allow for type-changing assignment. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField OverrideDocumentation { + get { return overrideDocumentation_; } + } + + /// Field number for the "syntax_kind" field. + public const int SyntaxKindFieldNumber = 5; + private global::Scip.SyntaxKind syntaxKind_ = global::Scip.SyntaxKind.UnspecifiedSyntaxKind; + /// + /// (optional) What syntax highlighting class should be used for this range? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.SyntaxKind SyntaxKind { + get { return syntaxKind_; } + set { + syntaxKind_ = value; + } + } + + /// Field number for the "diagnostics" field. + public const int DiagnosticsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_diagnostics_codec + = pb::FieldCodec.ForMessage(50, global::Scip.Diagnostic.Parser); + private readonly pbc::RepeatedField diagnostics_ = new pbc::RepeatedField(); + /// + /// (optional) Diagnostics that have been reported for this specific range. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Diagnostics { + get { return diagnostics_; } + } + + /// Field number for the "enclosing_range" field. + public const int EnclosingRangeFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_enclosingRange_codec + = pb::FieldCodec.ForInt32(58); + private readonly pbc::RepeatedField enclosingRange_ = new pbc::RepeatedField(); + /// + /// Deprecated: Use `typed_enclosing_range` instead. + /// + /// Uses the same `repeated int32` encoding as the deprecated `range` field. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnclosingRange { + get { return enclosingRange_; } + } + + /// Field number for the "single_line_enclosing_range" field. + public const int SingleLineEnclosingRangeFieldNumber = 10; + /// + /// Enclosing range spanning a single line. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.SingleLineRange SingleLineEnclosingRange { + get { return typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange ? (global::Scip.SingleLineRange) typedEnclosingRange_ : null; } + set { + typedEnclosingRange_ = value; + typedEnclosingRangeCase_ = value == null ? TypedEnclosingRangeOneofCase.None : TypedEnclosingRangeOneofCase.SingleLineEnclosingRange; + } + } + + /// Field number for the "multi_line_enclosing_range" field. + public const int MultiLineEnclosingRangeFieldNumber = 11; + /// + /// Enclosing range spanning multiple lines. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.MultiLineRange MultiLineEnclosingRange { + get { return typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange ? (global::Scip.MultiLineRange) typedEnclosingRange_ : null; } + set { + typedEnclosingRange_ = value; + typedEnclosingRangeCase_ = value == null ? TypedEnclosingRangeOneofCase.None : TypedEnclosingRangeOneofCase.MultiLineEnclosingRange; + } + } + + private object typedRange_; + /// Enum of possible cases for the "typed_range" oneof. + public enum TypedRangeOneofCase { + None = 0, + SingleLineRange = 8, + MultiLineRange = 9, + } + private TypedRangeOneofCase typedRangeCase_ = TypedRangeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypedRangeOneofCase TypedRangeCase { + get { return typedRangeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTypedRange() { + typedRangeCase_ = TypedRangeOneofCase.None; + typedRange_ = null; + } + + private object typedEnclosingRange_; + /// Enum of possible cases for the "typed_enclosing_range" oneof. + public enum TypedEnclosingRangeOneofCase { + None = 0, + SingleLineEnclosingRange = 10, + MultiLineEnclosingRange = 11, + } + private TypedEnclosingRangeOneofCase typedEnclosingRangeCase_ = TypedEnclosingRangeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypedEnclosingRangeOneofCase TypedEnclosingRangeCase { + get { return typedEnclosingRangeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTypedEnclosingRange() { + typedEnclosingRangeCase_ = TypedEnclosingRangeOneofCase.None; + typedEnclosingRange_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Occurrence); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Occurrence other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!range_.Equals(other.range_)) return false; + if (!object.Equals(SingleLineRange, other.SingleLineRange)) return false; + if (!object.Equals(MultiLineRange, other.MultiLineRange)) return false; + if (Symbol != other.Symbol) return false; + if (SymbolRoles != other.SymbolRoles) return false; + if(!overrideDocumentation_.Equals(other.overrideDocumentation_)) return false; + if (SyntaxKind != other.SyntaxKind) return false; + if(!diagnostics_.Equals(other.diagnostics_)) return false; + if(!enclosingRange_.Equals(other.enclosingRange_)) return false; + if (!object.Equals(SingleLineEnclosingRange, other.SingleLineEnclosingRange)) return false; + if (!object.Equals(MultiLineEnclosingRange, other.MultiLineEnclosingRange)) return false; + if (TypedRangeCase != other.TypedRangeCase) return false; + if (TypedEnclosingRangeCase != other.TypedEnclosingRangeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= range_.GetHashCode(); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) hash ^= SingleLineRange.GetHashCode(); + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) hash ^= MultiLineRange.GetHashCode(); + if (Symbol.Length != 0) hash ^= Symbol.GetHashCode(); + if (SymbolRoles != 0) hash ^= SymbolRoles.GetHashCode(); + hash ^= overrideDocumentation_.GetHashCode(); + if (SyntaxKind != global::Scip.SyntaxKind.UnspecifiedSyntaxKind) hash ^= SyntaxKind.GetHashCode(); + hash ^= diagnostics_.GetHashCode(); + hash ^= enclosingRange_.GetHashCode(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) hash ^= SingleLineEnclosingRange.GetHashCode(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) hash ^= MultiLineEnclosingRange.GetHashCode(); + hash ^= (int) typedRangeCase_; + hash ^= (int) typedEnclosingRangeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + range_.WriteTo(output, _repeated_range_codec); + if (Symbol.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Symbol); + } + if (SymbolRoles != 0) { + output.WriteRawTag(24); + output.WriteInt32(SymbolRoles); + } + overrideDocumentation_.WriteTo(output, _repeated_overrideDocumentation_codec); + if (SyntaxKind != global::Scip.SyntaxKind.UnspecifiedSyntaxKind) { + output.WriteRawTag(40); + output.WriteEnum((int) SyntaxKind); + } + diagnostics_.WriteTo(output, _repeated_diagnostics_codec); + enclosingRange_.WriteTo(output, _repeated_enclosingRange_codec); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) { + output.WriteRawTag(66); + output.WriteMessage(SingleLineRange); + } + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) { + output.WriteRawTag(74); + output.WriteMessage(MultiLineRange); + } + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) { + output.WriteRawTag(82); + output.WriteMessage(SingleLineEnclosingRange); + } + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) { + output.WriteRawTag(90); + output.WriteMessage(MultiLineEnclosingRange); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + range_.WriteTo(ref output, _repeated_range_codec); + if (Symbol.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Symbol); + } + if (SymbolRoles != 0) { + output.WriteRawTag(24); + output.WriteInt32(SymbolRoles); + } + overrideDocumentation_.WriteTo(ref output, _repeated_overrideDocumentation_codec); + if (SyntaxKind != global::Scip.SyntaxKind.UnspecifiedSyntaxKind) { + output.WriteRawTag(40); + output.WriteEnum((int) SyntaxKind); + } + diagnostics_.WriteTo(ref output, _repeated_diagnostics_codec); + enclosingRange_.WriteTo(ref output, _repeated_enclosingRange_codec); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) { + output.WriteRawTag(66); + output.WriteMessage(SingleLineRange); + } + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) { + output.WriteRawTag(74); + output.WriteMessage(MultiLineRange); + } + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) { + output.WriteRawTag(82); + output.WriteMessage(SingleLineEnclosingRange); + } + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) { + output.WriteRawTag(90); + output.WriteMessage(MultiLineEnclosingRange); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += range_.CalculateSize(_repeated_range_codec); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SingleLineRange); + } + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MultiLineRange); + } + if (Symbol.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Symbol); + } + if (SymbolRoles != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SymbolRoles); + } + size += overrideDocumentation_.CalculateSize(_repeated_overrideDocumentation_codec); + if (SyntaxKind != global::Scip.SyntaxKind.UnspecifiedSyntaxKind) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SyntaxKind); + } + size += diagnostics_.CalculateSize(_repeated_diagnostics_codec); + size += enclosingRange_.CalculateSize(_repeated_enclosingRange_codec); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SingleLineEnclosingRange); + } + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MultiLineEnclosingRange); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Occurrence other) { + if (other == null) { + return; + } + range_.Add(other.range_); + if (other.Symbol.Length != 0) { + Symbol = other.Symbol; + } + if (other.SymbolRoles != 0) { + SymbolRoles = other.SymbolRoles; + } + overrideDocumentation_.Add(other.overrideDocumentation_); + if (other.SyntaxKind != global::Scip.SyntaxKind.UnspecifiedSyntaxKind) { + SyntaxKind = other.SyntaxKind; + } + diagnostics_.Add(other.diagnostics_); + enclosingRange_.Add(other.enclosingRange_); + switch (other.TypedRangeCase) { + case TypedRangeOneofCase.SingleLineRange: + if (SingleLineRange == null) { + SingleLineRange = new global::Scip.SingleLineRange(); + } + SingleLineRange.MergeFrom(other.SingleLineRange); + break; + case TypedRangeOneofCase.MultiLineRange: + if (MultiLineRange == null) { + MultiLineRange = new global::Scip.MultiLineRange(); + } + MultiLineRange.MergeFrom(other.MultiLineRange); + break; + } + + switch (other.TypedEnclosingRangeCase) { + case TypedEnclosingRangeOneofCase.SingleLineEnclosingRange: + if (SingleLineEnclosingRange == null) { + SingleLineEnclosingRange = new global::Scip.SingleLineRange(); + } + SingleLineEnclosingRange.MergeFrom(other.SingleLineEnclosingRange); + break; + case TypedEnclosingRangeOneofCase.MultiLineEnclosingRange: + if (MultiLineEnclosingRange == null) { + MultiLineEnclosingRange = new global::Scip.MultiLineRange(); + } + MultiLineEnclosingRange.MergeFrom(other.MultiLineEnclosingRange); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + range_.AddEntriesFrom(input, _repeated_range_codec); + break; + } + case 18: { + Symbol = input.ReadString(); + break; + } + case 24: { + SymbolRoles = input.ReadInt32(); + break; + } + case 34: { + overrideDocumentation_.AddEntriesFrom(input, _repeated_overrideDocumentation_codec); + break; + } + case 40: { + SyntaxKind = (global::Scip.SyntaxKind) input.ReadEnum(); + break; + } + case 50: { + diagnostics_.AddEntriesFrom(input, _repeated_diagnostics_codec); + break; + } + case 58: + case 56: { + enclosingRange_.AddEntriesFrom(input, _repeated_enclosingRange_codec); + break; + } + case 66: { + global::Scip.SingleLineRange subBuilder = new global::Scip.SingleLineRange(); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) { + subBuilder.MergeFrom(SingleLineRange); + } + input.ReadMessage(subBuilder); + SingleLineRange = subBuilder; + break; + } + case 74: { + global::Scip.MultiLineRange subBuilder = new global::Scip.MultiLineRange(); + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) { + subBuilder.MergeFrom(MultiLineRange); + } + input.ReadMessage(subBuilder); + MultiLineRange = subBuilder; + break; + } + case 82: { + global::Scip.SingleLineRange subBuilder = new global::Scip.SingleLineRange(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) { + subBuilder.MergeFrom(SingleLineEnclosingRange); + } + input.ReadMessage(subBuilder); + SingleLineEnclosingRange = subBuilder; + break; + } + case 90: { + global::Scip.MultiLineRange subBuilder = new global::Scip.MultiLineRange(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) { + subBuilder.MergeFrom(MultiLineEnclosingRange); + } + input.ReadMessage(subBuilder); + MultiLineEnclosingRange = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + range_.AddEntriesFrom(ref input, _repeated_range_codec); + break; + } + case 18: { + Symbol = input.ReadString(); + break; + } + case 24: { + SymbolRoles = input.ReadInt32(); + break; + } + case 34: { + overrideDocumentation_.AddEntriesFrom(ref input, _repeated_overrideDocumentation_codec); + break; + } + case 40: { + SyntaxKind = (global::Scip.SyntaxKind) input.ReadEnum(); + break; + } + case 50: { + diagnostics_.AddEntriesFrom(ref input, _repeated_diagnostics_codec); + break; + } + case 58: + case 56: { + enclosingRange_.AddEntriesFrom(ref input, _repeated_enclosingRange_codec); + break; + } + case 66: { + global::Scip.SingleLineRange subBuilder = new global::Scip.SingleLineRange(); + if (typedRangeCase_ == TypedRangeOneofCase.SingleLineRange) { + subBuilder.MergeFrom(SingleLineRange); + } + input.ReadMessage(subBuilder); + SingleLineRange = subBuilder; + break; + } + case 74: { + global::Scip.MultiLineRange subBuilder = new global::Scip.MultiLineRange(); + if (typedRangeCase_ == TypedRangeOneofCase.MultiLineRange) { + subBuilder.MergeFrom(MultiLineRange); + } + input.ReadMessage(subBuilder); + MultiLineRange = subBuilder; + break; + } + case 82: { + global::Scip.SingleLineRange subBuilder = new global::Scip.SingleLineRange(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.SingleLineEnclosingRange) { + subBuilder.MergeFrom(SingleLineEnclosingRange); + } + input.ReadMessage(subBuilder); + SingleLineEnclosingRange = subBuilder; + break; + } + case 90: { + global::Scip.MultiLineRange subBuilder = new global::Scip.MultiLineRange(); + if (typedEnclosingRangeCase_ == TypedEnclosingRangeOneofCase.MultiLineEnclosingRange) { + subBuilder.MergeFrom(MultiLineEnclosingRange); + } + input.ReadMessage(subBuilder); + MultiLineEnclosingRange = subBuilder; + break; + } + } + } + } + #endif + + } + + /// + /// Represents a diagnostic, such as a compiler error or warning, which should be + /// reported for a document. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Diagnostic : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Diagnostic()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Scip.ScipReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Diagnostic() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Diagnostic(Diagnostic other) : this() { + severity_ = other.severity_; + code_ = other.code_; + message_ = other.message_; + source_ = other.source_; + tags_ = other.tags_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Diagnostic Clone() { + return new Diagnostic(this); + } + + /// Field number for the "severity" field. + public const int SeverityFieldNumber = 1; + private global::Scip.Severity severity_ = global::Scip.Severity.UnspecifiedSeverity; + /// + /// Should this diagnostic be reported as an error, warning, info, or hint? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Scip.Severity Severity { + get { return severity_; } + set { + severity_ = value; + } + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 2; + private string code_ = ""; + /// + /// (optional) Code of this diagnostic, which might appear in the user interface. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Code { + get { return code_; } + set { + code_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + /// + /// Message of this diagnostic. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "source" field. + public const int SourceFieldNumber = 4; + private string source_ = ""; + /// + /// (optional) Human-readable string describing the source of this diagnostic, e.g. + /// 'typescript' or 'super lint'. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Source { + get { return source_; } + set { + source_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "tags" field. + public const int TagsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_tags_codec + = pb::FieldCodec.ForEnum(42, x => (int) x, x => (global::Scip.DiagnosticTag) x); + private readonly pbc::RepeatedField tags_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Tags { + get { return tags_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Diagnostic); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Diagnostic other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Severity != other.Severity) return false; + if (Code != other.Code) return false; + if (Message != other.Message) return false; + if (Source != other.Source) return false; + if(!tags_.Equals(other.tags_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Severity != global::Scip.Severity.UnspecifiedSeverity) hash ^= Severity.GetHashCode(); + if (Code.Length != 0) hash ^= Code.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (Source.Length != 0) hash ^= Source.GetHashCode(); + hash ^= tags_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Severity != global::Scip.Severity.UnspecifiedSeverity) { + output.WriteRawTag(8); + output.WriteEnum((int) Severity); + } + if (Code.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (Source.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Source); + } + tags_.WriteTo(output, _repeated_tags_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Severity != global::Scip.Severity.UnspecifiedSeverity) { + output.WriteRawTag(8); + output.WriteEnum((int) Severity); + } + if (Code.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (Source.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Source); + } + tags_.WriteTo(ref output, _repeated_tags_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Severity != global::Scip.Severity.UnspecifiedSeverity) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Severity); + } + if (Code.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Code); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (Source.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Source); + } + size += tags_.CalculateSize(_repeated_tags_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Diagnostic other) { + if (other == null) { + return; + } + if (other.Severity != global::Scip.Severity.UnspecifiedSeverity) { + Severity = other.Severity; + } + if (other.Code.Length != 0) { + Code = other.Code; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.Source.Length != 0) { + Source = other.Source; + } + tags_.Add(other.tags_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Severity = (global::Scip.Severity) input.ReadEnum(); + break; + } + case 18: { + Code = input.ReadString(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + Source = input.ReadString(); + break; + } + case 42: + case 40: { + tags_.AddEntriesFrom(input, _repeated_tags_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Severity = (global::Scip.Severity) input.ReadEnum(); + break; + } + case 18: { + Code = input.ReadString(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + Source = input.ReadString(); + break; + } + case 42: + case 40: { + tags_.AddEntriesFrom(ref input, _repeated_tags_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/buf.gen.yaml b/buf.gen.yaml index 26e26703..2e2bdbdd 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -17,6 +17,8 @@ plugins: out: ./bindings/rust/src/generated/ - local: proto-lens-protoc out: ./bindings/haskell/src + - protoc_builtin: csharp + out: ./bindings/dotnet/src/ - protoc_builtin: java out: ./bindings/java/src/main/java/ - protoc_builtin: kotlin diff --git a/checks.nix b/checks.nix index 922526e2..c70ff130 100644 --- a/checks.nix +++ b/checks.nix @@ -44,6 +44,35 @@ installPhase = "touch $out"; }; + dotnet-bindings = + let + csprojVersion = builtins.head ( + builtins.match ".*([^<]+).*" (builtins.readFile ./bindings/dotnet/Scip.csproj) + ); + in + assert pkgs.lib.assertMsg ( + csprojVersion == version + ) "Version mismatch in bindings/dotnet/Scip.csproj: expected ${version}, got ${csprojVersion}"; + pkgs.buildDotnetModule { + pname = "scip-bindings-dotnet"; + inherit version; + src = ./bindings/dotnet; + projectFile = "Scip.csproj"; + # Regenerate with: + # nix build .#checks.x86_64-linux.dotnet-bindings.passthru.fetch-deps + # ./result bindings/dotnet/deps.json + nugetDeps = ./bindings/dotnet/deps.json; + dotnet-sdk = pkgs.dotnetCorePackages.sdk_10_0; + # A library has nothing to publish; the nupkg is the artifact. + dontPublish = true; + packNupkg = true; + # LICENSE is a symlink to the repository root (matches + # bindings/{haskell,rust,typescript}) and packing follows it. + prePatch = '' + cp --remove-destination ${./LICENSE} LICENSE + ''; + }; + go-bindings = pkgs.buildGoModule { pname = "scip-bindings-go"; inherit version; diff --git a/docs/Development.md b/docs/Development.md index a4397147..1c2940c4 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -10,7 +10,7 @@ - [bindings/](./bindings/): Contains a mix of generated and hand-written bindings for different languages. - - The TypeScript, Rust and Haskell bindings are auto-generated. + - The TypeScript, Rust, Haskell, JVM and .NET bindings are auto-generated. - The Go bindings include protoc-generated code as well as extra functionality. This is used by the CLI below as well as the [Sourcegraph CLI](https://github.com/sourcegraph/src-cli). @@ -82,17 +82,19 @@ go test ./cmd/scip -update-snapshots Update the version in `cmd/scip/version.txt`, `bindings/rust/Cargo.toml`, `bindings/rust/Cargo.lock`, `bindings/java/pom.xml`, `bindings/kotlin/pom.xml`, -and `docs/CLI.md`, then land a commit with those changes. The -[jvm-bindings workflow](/.github/workflows/jvm-bindings.yaml) fails the PR -if the two `pom.xml` versions don't match `cmd/scip/version.txt`. +`bindings/dotnet/Scip.csproj`, and `docs/CLI.md`, then land a commit with those +changes. The [jvm-bindings workflow](/.github/workflows/jvm-bindings.yaml) +fails the PR if the two `pom.xml` versions don't match `cmd/scip/version.txt`, +and the [dotnet-bindings workflow](/.github/workflows/dotnet-bindings.yaml) +does the same for `Scip.csproj`. After the commit is on `main`, trigger the [release workflow](/.github/workflows/release.yaml) from the Actions tab on GitHub, providing the version number (e.g. `0.7.0`). The workflow will validate version.txt, create and push tags, create a draft GitHub release (with auto-generated notes), publish the Rust crate, publish the -Java/Kotlin bindings to Maven Central, build and upload CLI binaries, and -finally mark the release as non-draft. +Java/Kotlin bindings to Maven Central, publish the .NET bindings to NuGet, +build and upload CLI binaries, and finally mark the release as non-draft. ### JVM bindings publishing @@ -114,3 +116,21 @@ Required GitHub Actions secrets: deploy uses `published` (~10–30 min) before the Kotlin deploy runs. Publications are irreversible — bad releases are fixed by bumping `cmd/scip/version.txt`. + +### .NET bindings publishing + +The .NET bindings are published to [nuget.org](https://www.nuget.org) as the +`Scip` package by the `publish-dotnet-bindings` job in the release workflow, +which packs the project through `nix develop` so the SDK matches the +`dotnet-bindings` check. + +Required GitHub Actions secret: + +| Secret | Source | +| --------------- | ---------------------------------------------------------------------------------------- | +| `NUGET_API_KEY` | An API key scoped to push the `Scip` package, from https://www.nuget.org/account/apikeys | + +The first publication also has to create the package id, so the key needs the +"Push new packages and package versions" scope until `Scip` exists. NuGet +publications are irreversible (versions can be unlisted, not deleted), so bad +releases are fixed by bumping `cmd/scip/version.txt`. diff --git a/flake.nix b/flake.nix index 0e6261cd..06e51e45 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,23 @@ text = '' buf generate goimports -w ./bindings/go/scip/scip.pb.go + # protoc's C# backend emits `class Descriptor` containing a + # static `Descriptor` property, which C# rejects (CS0542: + # member names cannot be the same as their enclosing type). + # Rename the generated class - not the Protobuf message, so + # the descriptor pool still says `scip.Descriptor` - to + # SymbolDescriptor, the name used both by scip.proto's own + # comments and by the existing scip-dotnet bindings. + sed -i -E \ + -e 's/global::Scip\.Descriptor\b/global::Scip.SymbolDescriptor/g' \ + -e 's/\bclass Descriptor\b/class SymbolDescriptor/' \ + -e 's///g' \ + -e 's/\bnew Descriptor\(/new SymbolDescriptor(/g' \ + -e 's/\bpublic Descriptor\b/public SymbolDescriptor/g' \ + -e 's/\bDescriptor other\b/SymbolDescriptor other/g' \ + -e 's/\bas Descriptor\)/as SymbolDescriptor)/' \ + -e 's/\bthe Descriptor message type\b/the SymbolDescriptor message type/' \ + ./bindings/dotnet/src/Scip.cs prettier --write --list-different '**/*.{ts,js(on)?,md,yml}' ''; }; @@ -98,6 +115,7 @@ with pkgs; [ cargo + dotnetCorePackages.sdk_10_0 go nodejs rustc