openlore 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +32 -2
  2. package/dist/cli/commands/analyze.js +36 -23
  3. package/dist/cli/commands/analyze.js.map +1 -1
  4. package/dist/cli/commands/mcp.d.ts.map +1 -1
  5. package/dist/cli/commands/mcp.js +18 -1
  6. package/dist/cli/commands/mcp.js.map +1 -1
  7. package/dist/cli/export/index.d.ts +10 -0
  8. package/dist/cli/export/index.d.ts.map +1 -0
  9. package/dist/cli/export/index.js +27 -0
  10. package/dist/cli/export/index.js.map +1 -0
  11. package/dist/cli/export/scip.d.ts +22 -0
  12. package/dist/cli/export/scip.d.ts.map +1 -0
  13. package/dist/cli/export/scip.js +95 -0
  14. package/dist/cli/export/scip.js.map +1 -0
  15. package/dist/cli/index.js +4 -0
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/manifest/detect/events.d.ts +31 -0
  18. package/dist/cli/manifest/detect/events.d.ts.map +1 -0
  19. package/dist/cli/manifest/detect/events.js +22 -0
  20. package/dist/cli/manifest/detect/events.js.map +1 -0
  21. package/dist/cli/manifest/detect/http-routes.d.ts +22 -0
  22. package/dist/cli/manifest/detect/http-routes.d.ts.map +1 -0
  23. package/dist/cli/manifest/detect/http-routes.js +18 -0
  24. package/dist/cli/manifest/detect/http-routes.js.map +1 -0
  25. package/dist/cli/manifest/detect/public-symbols.d.ts +46 -0
  26. package/dist/cli/manifest/detect/public-symbols.d.ts.map +1 -0
  27. package/dist/cli/manifest/detect/public-symbols.js +144 -0
  28. package/dist/cli/manifest/detect/public-symbols.js.map +1 -0
  29. package/dist/cli/manifest/emit.d.ts +103 -0
  30. package/dist/cli/manifest/emit.d.ts.map +1 -0
  31. package/dist/cli/manifest/emit.js +272 -0
  32. package/dist/cli/manifest/emit.js.map +1 -0
  33. package/dist/cli/manifest/index.d.ts +11 -0
  34. package/dist/cli/manifest/index.d.ts.map +1 -0
  35. package/dist/cli/manifest/index.js +31 -0
  36. package/dist/cli/manifest/index.js.map +1 -0
  37. package/dist/cli/manifest/schema-validator.d.ts +18 -0
  38. package/dist/cli/manifest/schema-validator.d.ts.map +1 -0
  39. package/dist/cli/manifest/schema-validator.js +77 -0
  40. package/dist/cli/manifest/schema-validator.js.map +1 -0
  41. package/dist/cli/manifest/validate.d.ts +15 -0
  42. package/dist/cli/manifest/validate.d.ts.map +1 -0
  43. package/dist/cli/manifest/validate.js +51 -0
  44. package/dist/cli/manifest/validate.js.map +1 -0
  45. package/dist/core/analyzer/artifact-generator.d.ts.map +1 -1
  46. package/dist/core/analyzer/artifact-generator.js +37 -3
  47. package/dist/core/analyzer/artifact-generator.js.map +1 -1
  48. package/dist/core/analyzer/call-graph.d.ts +9 -2
  49. package/dist/core/analyzer/call-graph.d.ts.map +1 -1
  50. package/dist/core/analyzer/call-graph.js +534 -1
  51. package/dist/core/analyzer/call-graph.js.map +1 -1
  52. package/dist/core/analyzer/embedding-service.d.ts +2 -0
  53. package/dist/core/analyzer/embedding-service.d.ts.map +1 -1
  54. package/dist/core/analyzer/embedding-service.js +4 -0
  55. package/dist/core/analyzer/embedding-service.js.map +1 -1
  56. package/dist/core/analyzer/fixtures/regression/sample.d.ts +9 -0
  57. package/dist/core/analyzer/fixtures/regression/sample.d.ts.map +1 -0
  58. package/dist/core/analyzer/fixtures/regression/sample.js +26 -0
  59. package/dist/core/analyzer/fixtures/regression/sample.js.map +1 -0
  60. package/dist/core/analyzer/iac/ansible.d.ts +18 -0
  61. package/dist/core/analyzer/iac/ansible.d.ts.map +1 -0
  62. package/dist/core/analyzer/iac/ansible.js +219 -0
  63. package/dist/core/analyzer/iac/ansible.js.map +1 -0
  64. package/dist/core/analyzer/iac/cdk.d.ts +26 -0
  65. package/dist/core/analyzer/iac/cdk.d.ts.map +1 -0
  66. package/dist/core/analyzer/iac/cdk.js +204 -0
  67. package/dist/core/analyzer/iac/cdk.js.map +1 -0
  68. package/dist/core/analyzer/iac/classify-yaml.d.ts +20 -0
  69. package/dist/core/analyzer/iac/classify-yaml.d.ts.map +1 -0
  70. package/dist/core/analyzer/iac/classify-yaml.js +81 -0
  71. package/dist/core/analyzer/iac/classify-yaml.js.map +1 -0
  72. package/dist/core/analyzer/iac/cloudformation.d.ts +15 -0
  73. package/dist/core/analyzer/iac/cloudformation.d.ts.map +1 -0
  74. package/dist/core/analyzer/iac/cloudformation.js +189 -0
  75. package/dist/core/analyzer/iac/cloudformation.js.map +1 -0
  76. package/dist/core/analyzer/iac/helm.d.ts +20 -0
  77. package/dist/core/analyzer/iac/helm.d.ts.map +1 -0
  78. package/dist/core/analyzer/iac/helm.js +229 -0
  79. package/dist/core/analyzer/iac/helm.js.map +1 -0
  80. package/dist/core/analyzer/iac/index.d.ts +23 -0
  81. package/dist/core/analyzer/iac/index.d.ts.map +1 -0
  82. package/dist/core/analyzer/iac/index.js +40 -0
  83. package/dist/core/analyzer/iac/index.js.map +1 -0
  84. package/dist/core/analyzer/iac/kubernetes.d.ts +14 -0
  85. package/dist/core/analyzer/iac/kubernetes.d.ts.map +1 -0
  86. package/dist/core/analyzer/iac/kubernetes.js +226 -0
  87. package/dist/core/analyzer/iac/kubernetes.js.map +1 -0
  88. package/dist/core/analyzer/iac/project.d.ts +16 -0
  89. package/dist/core/analyzer/iac/project.d.ts.map +1 -0
  90. package/dist/core/analyzer/iac/project.js +97 -0
  91. package/dist/core/analyzer/iac/project.js.map +1 -0
  92. package/dist/core/analyzer/iac/pulumi.d.ts +21 -0
  93. package/dist/core/analyzer/iac/pulumi.d.ts.map +1 -0
  94. package/dist/core/analyzer/iac/pulumi.js +190 -0
  95. package/dist/core/analyzer/iac/pulumi.js.map +1 -0
  96. package/dist/core/analyzer/iac/terraform.d.ts +19 -0
  97. package/dist/core/analyzer/iac/terraform.d.ts.map +1 -0
  98. package/dist/core/analyzer/iac/terraform.js +546 -0
  99. package/dist/core/analyzer/iac/terraform.js.map +1 -0
  100. package/dist/core/analyzer/iac/types.d.ts +67 -0
  101. package/dist/core/analyzer/iac/types.d.ts.map +1 -0
  102. package/dist/core/analyzer/iac/types.js +39 -0
  103. package/dist/core/analyzer/iac/types.js.map +1 -0
  104. package/dist/core/analyzer/signature-extractor.d.ts +6 -0
  105. package/dist/core/analyzer/signature-extractor.d.ts.map +1 -1
  106. package/dist/core/analyzer/signature-extractor.js +112 -2
  107. package/dist/core/analyzer/signature-extractor.js.map +1 -1
  108. package/dist/core/analyzer/spec-vector-index.d.ts +9 -2
  109. package/dist/core/analyzer/spec-vector-index.d.ts.map +1 -1
  110. package/dist/core/analyzer/spec-vector-index.js +111 -10
  111. package/dist/core/analyzer/spec-vector-index.js.map +1 -1
  112. package/dist/core/analyzer/vector-index.d.ts +33 -1
  113. package/dist/core/analyzer/vector-index.d.ts.map +1 -1
  114. package/dist/core/analyzer/vector-index.js +99 -10
  115. package/dist/core/analyzer/vector-index.js.map +1 -1
  116. package/dist/core/scip/index.d.ts +51 -0
  117. package/dist/core/scip/index.d.ts.map +1 -0
  118. package/dist/core/scip/index.js +210 -0
  119. package/dist/core/scip/index.js.map +1 -0
  120. package/dist/core/scip/moniker.d.ts +48 -0
  121. package/dist/core/scip/moniker.d.ts.map +1 -0
  122. package/dist/core/scip/moniker.js +109 -0
  123. package/dist/core/scip/moniker.js.map +1 -0
  124. package/dist/core/scip/schema.d.ts +34 -0
  125. package/dist/core/scip/schema.d.ts.map +1 -0
  126. package/dist/core/scip/schema.js +48 -0
  127. package/dist/core/scip/schema.js.map +1 -0
  128. package/dist/core/scip/vendor/scip.proto +910 -0
  129. package/dist/core/services/edge-store.d.ts +6 -0
  130. package/dist/core/services/edge-store.d.ts.map +1 -1
  131. package/dist/core/services/edge-store.js +8 -0
  132. package/dist/core/services/edge-store.js.map +1 -1
  133. package/dist/core/services/mcp-handlers/graph.d.ts.map +1 -1
  134. package/dist/core/services/mcp-handlers/graph.js +12 -0
  135. package/dist/core/services/mcp-handlers/graph.js.map +1 -1
  136. package/dist/core/services/mcp-handlers/orient.js +2 -2
  137. package/dist/core/services/mcp-handlers/orient.js.map +1 -1
  138. package/dist/core/services/mcp-handlers/semantic.d.ts.map +1 -1
  139. package/dist/core/services/mcp-handlers/semantic.js +23 -30
  140. package/dist/core/services/mcp-handlers/semantic.js.map +1 -1
  141. package/dist/core/services/mcp-watcher.d.ts.map +1 -1
  142. package/dist/core/services/mcp-watcher.js +14 -10
  143. package/dist/core/services/mcp-watcher.js.map +1 -1
  144. package/package.json +12 -1
  145. package/schemas/openlore-manifest-v1.json +191 -0
@@ -0,0 +1,910 @@
1
+ // ============================================================================
2
+ // VENDORED SCIP PROTOBUF SCHEMA
3
+ //
4
+ // Source: https://github.com/sourcegraph/scip/blob/main/scip.proto
5
+ // Fetched: 2026-05-27 from refs/heads/main
6
+ // License: Apache-2.0 (Sourcegraph SCIP)
7
+ //
8
+ // SCIP (Source Code Intelligence Protocol) is Sourcegraph's open successor to
9
+ // LSIF. OpenLore vendors this schema verbatim to serialize `index.scip` exports
10
+ // (see src/core/scip/index.ts). Do NOT hand-edit the message definitions below;
11
+ // re-fetch from the URL above to update, and bump the "Fetched" date.
12
+ // ============================================================================
13
+
14
+ // An index contains one or more pieces of information about a given piece of
15
+ // source code or software artifact. Complementary information can be merged
16
+ // together from multiple sources to provide a unified code intelligence
17
+ // experience.
18
+ //
19
+ // Programs producing a file of this format is an "indexer" and may operate
20
+ // somewhere on the spectrum between precision, such as indexes produced by
21
+ // compiler-backed indexers, and heurstics, such as indexes produced by local
22
+ // syntax-directed analysis for scope rules.
23
+
24
+ syntax = "proto3";
25
+
26
+ package scip;
27
+
28
+ option go_package = "github.com/scip-code/scip/bindings/go/scip/";
29
+
30
+ // Index represents a complete SCIP index for a workspace this is rooted at a
31
+ // single directory. An Index message payload can have a large memory footprint
32
+ // and it's therefore recommended to emit and consume an Index payload one field
33
+ // value at a time. To permit streaming consumption of an Index payload, the
34
+ // `metadata` field must appear at the start of the stream and must only appear
35
+ // once in the stream. Other field values may appear in any order.
36
+ message Index {
37
+ // Metadata about this index.
38
+ Metadata metadata = 1;
39
+ // Documents that belong to this index.
40
+ repeated Document documents = 2;
41
+ // (optional) Symbols that are referenced from this index but are defined in
42
+ // an external package (a separate `Index` message). Leave this field empty
43
+ // if you assume the external package will get indexed separately. If the
44
+ // external package won't get indexed for some reason then you can use this
45
+ // field to provide hover documentation for those external symbols.
46
+ repeated SymbolInformation external_symbols = 3;
47
+ // IMPORTANT: When adding a new field to `Index` here, add a matching
48
+ // function in `IndexVisitor` and update `ParseStreaming`.
49
+ }
50
+
51
+ message Metadata {
52
+ // Which version of this protocol was used to generate this index?
53
+ ProtocolVersion version = 1;
54
+ // Information about the tool that produced this index.
55
+ ToolInfo tool_info = 2;
56
+ // URI-encoded absolute path to the root directory of this index. All
57
+ // documents in this index must appear in a subdirectory of this root
58
+ // directory.
59
+ string project_root = 3;
60
+ // Text encoding of the source files on disk that are referenced from
61
+ // `Document.relative_path`. This value is unrelated to the `Document.text`
62
+ // field, which is a Protobuf string and hence must be UTF-8 encoded.
63
+ TextEncoding text_document_encoding = 4;
64
+ }
65
+
66
+ enum ProtocolVersion {
67
+ UnspecifiedProtocolVersion = 0;
68
+ }
69
+
70
+ enum TextEncoding {
71
+ UnspecifiedTextEncoding = 0;
72
+ UTF8 = 1;
73
+ UTF16 = 2;
74
+ }
75
+
76
+ message ToolInfo {
77
+ // Name of the indexer that produced this index.
78
+ string name = 1;
79
+ // Version of the indexer that produced this index.
80
+ string version = 2;
81
+ // Command-line arguments that were used to invoke this indexer.
82
+ repeated string arguments = 3;
83
+ }
84
+
85
+ // Document defines the metadata about a source file on disk.
86
+ message Document {
87
+ // The string ID for the programming language this file is written in.
88
+ // The `Language` enum contains the names of most common programming languages.
89
+ // This field is typed as a string to permit any programming language, including
90
+ // ones that are not specified by the `Language` enum.
91
+ string language = 4;
92
+ // (Required) Unique path to the text document.
93
+ //
94
+ // 1. The path must be relative to the directory supplied in the associated
95
+ // `Metadata.project_root`.
96
+ // 2. The path must not begin with a leading '/'.
97
+ // 3. The path must point to a regular file, not a symbolic link.
98
+ // 4. The path must use '/' as the separator, including on Windows.
99
+ // 5. The path must be canonical; it cannot include empty components ('//'),
100
+ // or '.' or '..'.
101
+ string relative_path = 1;
102
+ // Occurrences that appear in this file.
103
+ repeated Occurrence occurrences = 2;
104
+ // Symbols that are "defined" within this document.
105
+ //
106
+ // This should include symbols which technically do not have any definition,
107
+ // but have a reference and are defined by some other symbol (see
108
+ // Relationship.is_definition).
109
+ repeated SymbolInformation symbols = 3;
110
+
111
+ // (optional) Text contents of this document. Indexers are not expected to
112
+ // include the text by default. It's preferable that clients read the text
113
+ // contents from the file system by resolving the absolute path from joining
114
+ // `Index.metadata.project_root` and `Document.relative_path`. This field
115
+ // can be useful for testing or when working with virtual/in-memory documents.
116
+ string text = 5;
117
+
118
+ // Specifies the encoding used for source ranges in this Document.
119
+ //
120
+ // Usually, this will match the type used to index the string type
121
+ // in the indexer's implementation language in O(1) time.
122
+ // - For an indexer implemented in JVM/.NET language or JavaScript/TypeScript,
123
+ // use UTF16CodeUnitOffsetFromLineStart.
124
+ // - For an indexer implemented in Python,
125
+ // use UTF32CodeUnitOffsetFromLineStart.
126
+ // - For an indexer implemented in Go, Rust or C++,
127
+ // use UTF8ByteOffsetFromLineStart.
128
+ PositionEncoding position_encoding = 6;
129
+ }
130
+
131
+ // Encoding used to interpret the 'character' value in source ranges.
132
+ enum PositionEncoding {
133
+ // Default value. This value should not be used by new SCIP indexers
134
+ // so that a consumer can process the SCIP index without ambiguity.
135
+ UnspecifiedPositionEncoding = 0;
136
+ // The 'character' value is interpreted as an offset in terms
137
+ // of UTF-8 code units (i.e. bytes).
138
+ //
139
+ // Example: For the string "🚀 Woo" in UTF-8, the bytes are
140
+ // [240, 159, 154, 128, 32, 87, 111, 111], so the offset for 'W'
141
+ // would be 5.
142
+ UTF8CodeUnitOffsetFromLineStart = 1;
143
+ // The 'character' value is interpreted as an offset in terms
144
+ // of UTF-16 code units (each is 2 bytes).
145
+ //
146
+ // Example: For the string "🚀 Woo", the UTF-16 code units are
147
+ // ['\ud83d', '\ude80', ' ', 'W', 'o', 'o'], so the offset for 'W'
148
+ // would be 3.
149
+ UTF16CodeUnitOffsetFromLineStart = 2;
150
+ // The 'character' value is interpreted as an offset in terms
151
+ // of UTF-32 code units (each is 4 bytes).
152
+ //
153
+ // Example: For the string "🚀 Woo", the UTF-32 code units are
154
+ // ['🚀', ' ', 'W', 'o', 'o'], so the offset for 'W' would be 2.
155
+ UTF32CodeUnitOffsetFromLineStart = 3;
156
+ }
157
+
158
+ // Symbol is similar to a URI, it identifies a class, method, or a local
159
+ // variable. `SymbolInformation` contains rich metadata about symbols such as
160
+ // the docstring.
161
+ //
162
+ // Symbol has a standardized string representation, which can be used
163
+ // interchangeably with `Symbol`. The syntax for Symbol is the following:
164
+ // ```
165
+ // # (<x>)+ stands for one or more repetitions of <x>
166
+ // # (<x>)? stands for zero or one occurrence of <x>
167
+ // <symbol> ::= <scheme> ' ' <package> ' ' (<descriptor>)+ | 'local ' <local-id>
168
+ // <package> ::= <manager> ' ' <package-name> ' ' <version>
169
+ // <scheme> ::= any UTF-8, escape spaces with double space. Must not be empty nor start with 'local'
170
+ // <manager> ::= any UTF-8, escape spaces with double space. Use the placeholder '.' to indicate an empty value
171
+ // <package-name> ::= same as above
172
+ // <version> ::= same as above
173
+ // <descriptor> ::= <namespace> | <type> | <term> | <method> | <type-parameter> | <parameter> | <meta> | <macro>
174
+ // <namespace> ::= <name> '/'
175
+ // <type> ::= <name> '#'
176
+ // <term> ::= <name> '.'
177
+ // <meta> ::= <name> ':'
178
+ // <macro> ::= <name> '!'
179
+ // <method> ::= <name> '(' (<method-disambiguator>)? ').'
180
+ // <type-parameter> ::= '[' <name> ']'
181
+ // <parameter> ::= '(' <name> ')'
182
+ // <name> ::= <identifier>
183
+ // <method-disambiguator> ::= <simple-identifier>
184
+ // <identifier> ::= <simple-identifier> | <escaped-identifier>
185
+ // <simple-identifier> ::= (<identifier-character>)+
186
+ // <identifier-character> ::= '_' | '+' | '-' | '$' | ASCII letter or digit
187
+ // <escaped-identifier> ::= '`' (<escaped-character>)+ '`', must contain at least one non-<identifier-character>
188
+ // <escaped-characters> ::= any UTF-8, escape backticks with double backtick.
189
+ // <local-id> ::= <simple-identifier>
190
+ // ```
191
+ //
192
+ // The list of descriptors for a symbol should together form a fully
193
+ // qualified name for the symbol. That is, it should serve as a unique
194
+ // identifier across the package. Typically, it will include one descriptor
195
+ // for every node in the AST (along the ancestry path) between the root of
196
+ // the file and the node corresponding to the symbol.
197
+ //
198
+ // Local symbols MUST only be used for entities which are local to a Document,
199
+ // and cannot be accessed from outside the Document.
200
+ message Symbol {
201
+ string scheme = 1;
202
+ Package package = 2;
203
+ repeated Descriptor descriptors = 3;
204
+ }
205
+
206
+ // Unit of packaging and distribution.
207
+ //
208
+ // NOTE: This corresponds to a module in Go and JVM languages.
209
+ message Package {
210
+ string manager = 1;
211
+ string name = 2;
212
+ string version = 3;
213
+ }
214
+
215
+ message Descriptor {
216
+ enum Suffix {
217
+ option allow_alias = true;
218
+ UnspecifiedSuffix = 0;
219
+ // Unit of code abstraction and/or namespacing.
220
+ //
221
+ // NOTE: This corresponds to a package in Go and JVM languages.
222
+ Namespace = 1;
223
+ // Use Namespace instead.
224
+ Package = 1 [deprecated = true];
225
+ Type = 2;
226
+ Term = 3;
227
+ Method = 4;
228
+ TypeParameter = 5;
229
+ Parameter = 6;
230
+ // Can be used for any purpose.
231
+ Meta = 7;
232
+ Local = 8;
233
+ Macro = 9;
234
+ }
235
+ string name = 1;
236
+ string disambiguator = 2;
237
+ Suffix suffix = 3;
238
+ // NOTE: If you add new fields here, make sure to update the prepareSlot()
239
+ // function responsible for parsing symbols.
240
+ }
241
+
242
+ // Signature represents the signature of a symbol as it's displayed in API
243
+ // documentation or hover tooltips. It uses a subset of Document's fields with
244
+ // the same field numbers for wire compatibility with older indexes that encoded
245
+ // signatures using the Document message type.
246
+ message Signature {
247
+ // The language of the signature, e.g. "java", "go", "python".
248
+ string language = 4;
249
+ // The text content of the signature, e.g. "void add(int a, int b)".
250
+ string text = 5;
251
+ // (optional) Occurrences within the signature text that reference other
252
+ // symbols, enabling hyperlinking of types in the signature. Ranges are
253
+ // relative to the `text` field.
254
+ repeated Occurrence occurrences = 2;
255
+
256
+ // Reserved field numbers from the Document message to prevent accidental
257
+ // reuse, which would break wire compatibility with older indexes.
258
+ reserved 1, 3, 6;
259
+ }
260
+
261
+ // SymbolInformation defines metadata about a symbol, such as the symbol's
262
+ // docstring or what package it's defined it.
263
+ message SymbolInformation {
264
+ // Identifier of this symbol, which can be referenced from `Occurence.symbol`.
265
+ // The string must be formatted according to the grammar in `Symbol`.
266
+ string symbol = 1;
267
+ // (optional, but strongly recommended) The markdown-formatted documentation
268
+ // for this symbol. Use `SymbolInformation.signature_documentation` to
269
+ // document the method/class/type signature of this symbol.
270
+ // Due to historical reasons, indexers may include signature documentation in
271
+ // this field by rendering markdown code blocks. New indexers should only
272
+ // include non-code documentation in this field, for example docstrings.
273
+ repeated string documentation = 3;
274
+ // (optional) Relationships to other symbols (e.g., implements, type definition).
275
+ repeated Relationship relationships = 4;
276
+ // The kind of this symbol. Use this field instead of
277
+ // `SymbolDescriptor.Suffix` to determine whether something is, for example, a
278
+ // class or a method.
279
+ Kind kind = 5;
280
+ // (optional) Kind represents the fine-grained category of a symbol, suitable for presenting
281
+ // information about the symbol's meaning in the language.
282
+ //
283
+ // For example:
284
+ // - A Java method would have the kind `Method` while a Go function would
285
+ // have the kind `Function`, even if the symbols for these use the same
286
+ // syntax for the descriptor `SymbolDescriptor.Suffix.Method`.
287
+ // - A Go struct has the symbol kind `Struct` while a Java class has
288
+ // the symbol kind `Class` even if they both have the same descriptor:
289
+ // `SymbolDescriptor.Suffix.Type`.
290
+ //
291
+ // Since Kind is more fine-grained than Suffix:
292
+ // - If two symbols have the same Kind, they should share the same Suffix.
293
+ // - If two symbols have different Suffixes, they should have different Kinds.
294
+ enum Kind {
295
+ UnspecifiedKind = 0;
296
+ // A method which may or may not have a body. For Java, Kotlin etc.
297
+ AbstractMethod = 66;
298
+ // For Ruby's attr_accessor
299
+ Accessor = 72;
300
+ Array = 1;
301
+ // For Alloy
302
+ Assertion = 2;
303
+ AssociatedType = 3;
304
+ // For C++
305
+ Attribute = 4;
306
+ // For Lean
307
+ Axiom = 5;
308
+ Boolean = 6;
309
+ Class = 7;
310
+ // For C++
311
+ Concept = 86;
312
+ Constant = 8;
313
+ Constructor = 9;
314
+ // For Solidity
315
+ Contract = 62;
316
+ // For Haskell
317
+ DataFamily = 10;
318
+ // For C# and F#
319
+ Delegate = 73;
320
+ Enum = 11;
321
+ EnumMember = 12;
322
+ Error = 63;
323
+ Event = 13;
324
+ // For Dart
325
+ Extension = 84;
326
+ // For Alloy
327
+ Fact = 14;
328
+ Field = 15;
329
+ File = 16;
330
+ Function = 17;
331
+ // For 'get' in Swift, 'attr_reader' in Ruby
332
+ Getter = 18;
333
+ // For Raku
334
+ Grammar = 19;
335
+ // For Purescript and Lean
336
+ Instance = 20;
337
+ Interface = 21;
338
+ Key = 22;
339
+ // For Racket
340
+ Lang = 23;
341
+ // For Lean
342
+ Lemma = 24;
343
+ // For solidity
344
+ Library = 64;
345
+ Macro = 25;
346
+ Method = 26;
347
+ // For Ruby
348
+ MethodAlias = 74;
349
+ // Analogous to 'ThisParameter' and 'SelfParameter', but for languages
350
+ // like Go where the receiver doesn't have a conventional name.
351
+ MethodReceiver = 27;
352
+ // Analogous to 'AbstractMethod', for Go.
353
+ MethodSpecification = 67;
354
+ // For Protobuf
355
+ Message = 28;
356
+ // For Dart
357
+ Mixin = 85;
358
+ // For Solidity
359
+ Modifier = 65;
360
+ Module = 29;
361
+ Namespace = 30;
362
+ Null = 31;
363
+ Number = 32;
364
+ Object = 33;
365
+ Operator = 34;
366
+ Package = 35;
367
+ PackageObject = 36;
368
+ Parameter = 37;
369
+ ParameterLabel = 38;
370
+ // For Haskell's PatternSynonyms
371
+ Pattern = 39;
372
+ // For Alloy
373
+ Predicate = 40;
374
+ Property = 41;
375
+ // Analogous to 'Trait' and 'TypeClass', for Swift and Objective-C
376
+ Protocol = 42;
377
+ // Analogous to 'AbstractMethod', for Swift and Objective-C.
378
+ ProtocolMethod = 68;
379
+ // Analogous to 'AbstractMethod', for C++.
380
+ PureVirtualMethod = 69;
381
+ // For Haskell
382
+ Quasiquoter = 43;
383
+ // 'self' in Python, Rust, Swift etc.
384
+ SelfParameter = 44;
385
+ // For 'set' in Swift, 'attr_writer' in Ruby
386
+ Setter = 45;
387
+ // For Alloy, analogous to 'Struct'.
388
+ Signature = 46;
389
+ // For Ruby
390
+ SingletonClass = 75;
391
+ // Analogous to 'StaticMethod', for Ruby.
392
+ SingletonMethod = 76;
393
+ // Analogous to 'StaticField', for C++
394
+ StaticDataMember = 77;
395
+ // For C#
396
+ StaticEvent = 78;
397
+ // For C#
398
+ StaticField = 79;
399
+ // For Java, C#, C++ etc.
400
+ StaticMethod = 80;
401
+ // For C#, TypeScript etc.
402
+ StaticProperty = 81;
403
+ // For C, C++
404
+ StaticVariable = 82;
405
+ String = 48;
406
+ Struct = 49;
407
+ // For Swift
408
+ Subscript = 47;
409
+ // For Lean
410
+ Tactic = 50;
411
+ // For Lean
412
+ Theorem = 51;
413
+ // Method receiver for languages
414
+ // 'this' in JavaScript, C++, Java etc.
415
+ ThisParameter = 52;
416
+ // Analogous to 'Protocol' and 'TypeClass', for Rust, Scala etc.
417
+ Trait = 53;
418
+ // Analogous to 'AbstractMethod', for Rust, Scala etc.
419
+ TraitMethod = 70;
420
+ // Data type definition for languages like OCaml which use `type`
421
+ // rather than separate keywords like `struct` and `enum`.
422
+ Type = 54;
423
+ TypeAlias = 55;
424
+ // Analogous to 'Trait' and 'Protocol', for Haskell, Purescript etc.
425
+ TypeClass = 56;
426
+ // Analogous to 'AbstractMethod', for Haskell, Purescript etc.
427
+ TypeClassMethod = 71;
428
+ // For Haskell
429
+ TypeFamily = 57;
430
+ TypeParameter = 58;
431
+ // For C, C++, Capn Proto
432
+ Union = 59;
433
+ Value = 60;
434
+ Variable = 61;
435
+ // Next = 87;
436
+ // Feel free to open a PR proposing new language-specific kinds.
437
+ }
438
+ // (optional) The name of this symbol as it should be displayed to the user.
439
+ // For example, the symbol "com/example/MyClass#myMethod(+1)." should have the
440
+ // display name "myMethod". The `symbol` field is not a reliable source of
441
+ // the display name for several reasons:
442
+ //
443
+ // - Local symbols don't encode the name.
444
+ // - Some languages have case-insensitive names, so the symbol is all-lowercase.
445
+ // - The symbol may encode names with special characters that should not be
446
+ // displayed to the user.
447
+ string display_name = 6;
448
+ // (optional) The signature of this symbol as it's displayed in API
449
+ // documentation or in hover tooltips. For example, a Java method that adds
450
+ // two numbers would have `Signature.language = "java"` and
451
+ // `Signature.text = "void add(int a, int b)"`. The `language` and `text`
452
+ // fields are required while `occurrences` can be optionally included to
453
+ // support hyperlinking referenced symbols in the signature.
454
+ Signature signature_documentation = 7;
455
+ // (optional) The enclosing symbol if this is a local symbol. For non-local
456
+ // symbols, the enclosing symbol should be parsed from the `symbol` field
457
+ // using the `Descriptor` grammar.
458
+ //
459
+ // The primary use-case for this field is to allow local symbol to be displayed
460
+ // in a symbol hierarchy for API documentation. It's OK to leave this field
461
+ // empty for local variables since local variables usually don't belong in API
462
+ // documentation. However, in the situation that you wish to include a local
463
+ // symbol in the hierarchy, then you can use `enclosing_symbol` to locate the
464
+ // "parent" or "owner" of this local symbol. For example, a Java indexer may
465
+ // choose to use local symbols for private class fields while providing an
466
+ // `enclosing_symbol` to reference the enclosing class to allow the field to
467
+ // be part of the class documentation hierarchy. From the perspective of an
468
+ // author of an indexer, the decision to use a local symbol or global symbol
469
+ // should exclusively be determined whether the local symbol is accessible
470
+ // outside the document, not by the capability to find the enclosing
471
+ // symbol.
472
+ string enclosing_symbol = 8;
473
+ }
474
+
475
+ message Relationship {
476
+ string symbol = 1;
477
+ // When resolving "Find references", this field documents what other symbols
478
+ // should be included together with this symbol. For example, consider the
479
+ // following TypeScript code that defines two symbols `Animal#sound()` and
480
+ // `Dog#sound()`:
481
+ // ```ts
482
+ // interface Animal {
483
+ // ^^^^^^ definition Animal#
484
+ // sound(): string
485
+ // ^^^^^ definition Animal#sound()
486
+ // }
487
+ // class Dog implements Animal {
488
+ // ^^^ definition Dog#, relationships = [{symbol: "Animal#", is_implementation: true}]
489
+ // public sound(): string { return "woof" }
490
+ // ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), relationships = [{symbol: "Animal#sound()", is_implementation:true, is_reference: true}]
491
+ // }
492
+ // const animal: Animal = new Dog()
493
+ // ^^^^^^ reference Animal#
494
+ // console.log(animal.sound())
495
+ // ^^^^^ reference Animal#sound()
496
+ // ```
497
+ // Doing "Find references" on the symbol `Animal#sound()` should return
498
+ // references to the `Dog#sound()` method as well. Vice-versa, doing "Find
499
+ // references" on the `Dog#sound()` method should include references to the
500
+ // `Animal#sound()` method as well.
501
+ bool is_reference = 2;
502
+ // Similar to `is_reference` but for "Find implementations".
503
+ // It's common for `is_implementation` and `is_reference` to both be true but
504
+ // it's not always the case.
505
+ // In the TypeScript example above, observe that `Dog#` has an
506
+ // `is_implementation` relationship with `"Animal#"` but not `is_reference`.
507
+ // This is because "Find references" on the "Animal#" symbol should not return
508
+ // "Dog#". We only want "Dog#" to return as a result for "Find
509
+ // implementations" on the "Animal#" symbol.
510
+ bool is_implementation = 3;
511
+ // Similar to `references_symbols` but for "Go to type definition".
512
+ bool is_type_definition = 4;
513
+ // Allows overriding the behavior of "Go to definition" and "Find references"
514
+ // for symbols which do not have a definition of their own or could
515
+ // potentially have multiple definitions.
516
+ //
517
+ // For example, in a language with single inheritance and no field overriding,
518
+ // inherited fields can reuse the same symbol as the ancestor which declares
519
+ // the field. In such a situation, is_definition is not needed.
520
+ //
521
+ // On the other hand, in languages with single inheritance and some form
522
+ // of mixins, you can use is_definition to relate the symbol to the
523
+ // matching symbol in ancestor classes, and is_reference to relate the
524
+ // symbol to the matching symbol in mixins.
525
+ bool is_definition = 5;
526
+ // Update registerInverseRelationships on adding a new field here.
527
+ }
528
+
529
+ // SymbolRole declares what "role" a symbol has in an occurrence. A role is
530
+ // encoded as a bitset where each bit represents a different role. For example,
531
+ // to determine if the `Import` role is set, test whether the second bit of the
532
+ // enum value is defined. In pseudocode, this can be implemented with the
533
+ // logic: `const isImportRole = (role.value & SymbolRole.Import.value) > 0`.
534
+ enum SymbolRole {
535
+ // This case is not meant to be used; it only exists to avoid an error
536
+ // from the Protobuf code generator.
537
+ UnspecifiedSymbolRole = 0;
538
+ // Is the symbol defined here? If not, then this is a symbol reference.
539
+ Definition = 0x1;
540
+ // Is the symbol imported here?
541
+ Import = 0x2;
542
+ // Is the symbol written here?
543
+ WriteAccess = 0x4;
544
+ // Is the symbol read here?
545
+ ReadAccess = 0x8;
546
+ // Is the symbol in generated code?
547
+ Generated = 0x10;
548
+ // Is the symbol in test code?
549
+ Test = 0x20;
550
+ // Is this a signature for a symbol that is defined elsewhere?
551
+ //
552
+ // Applies to forward declarations for languages like C, C++
553
+ // and Objective-C, as well as `val` declarations in interface
554
+ // files in languages like SML and OCaml.
555
+ ForwardDefinition = 0x40;
556
+ }
557
+
558
+ enum SyntaxKind {
559
+ option allow_alias = true;
560
+
561
+ UnspecifiedSyntaxKind = 0;
562
+
563
+ // Comment, including comment markers and text
564
+ Comment = 1;
565
+
566
+ // `;` `.` `,`
567
+ PunctuationDelimiter = 2;
568
+ // (), {}, [] when used syntactically
569
+ PunctuationBracket = 3;
570
+
571
+ // `if`, `else`, `return`, `class`, etc.
572
+ Keyword = 4;
573
+ IdentifierKeyword = 4 [deprecated = true];
574
+
575
+ // `+`, `*`, etc.
576
+ IdentifierOperator = 5;
577
+
578
+ // non-specific catch-all for any identifier not better described elsewhere
579
+ Identifier = 6;
580
+ // Identifiers builtin to the language: `min`, `print` in Python.
581
+ IdentifierBuiltin = 7;
582
+ // Identifiers representing `null`-like values: `None` in Python, `nil` in Go.
583
+ IdentifierNull = 8;
584
+ // `xyz` in `const xyz = "hello"`
585
+ IdentifierConstant = 9;
586
+ // `var X = "hello"` in Go
587
+ IdentifierMutableGlobal = 10;
588
+ // Parameter definition and references
589
+ IdentifierParameter = 11;
590
+ // Identifiers for variable definitions and references within a local scope
591
+ IdentifierLocal = 12;
592
+ // Identifiers that shadow other identifiers in an outer scope
593
+ IdentifierShadowed = 13;
594
+ // Identifier representing a unit of code abstraction and/or namespacing.
595
+ //
596
+ // NOTE: This corresponds to a package in Go and JVM languages,
597
+ // and a module in languages like Python and JavaScript.
598
+ IdentifierNamespace = 14;
599
+ IdentifierModule = 14 [deprecated = true];
600
+
601
+ // Function references, including calls
602
+ IdentifierFunction = 15;
603
+ // Function definition only
604
+ IdentifierFunctionDefinition = 16;
605
+
606
+ // Macro references, including invocations
607
+ IdentifierMacro = 17;
608
+ // Macro definition only
609
+ IdentifierMacroDefinition = 18;
610
+
611
+ // non-builtin types
612
+ IdentifierType = 19;
613
+ // builtin types only, such as `str` for Python or `int` in Go
614
+ IdentifierBuiltinType = 20;
615
+
616
+ // Python decorators, c-like __attribute__
617
+ IdentifierAttribute = 21;
618
+
619
+ // `\b`
620
+ RegexEscape = 22;
621
+ // `*`, `+`
622
+ RegexRepeated = 23;
623
+ // `.`
624
+ RegexWildcard = 24;
625
+ // `(`, `)`, `[`, `]`
626
+ RegexDelimiter = 25;
627
+ // `|`, `-`
628
+ RegexJoin = 26;
629
+
630
+ // Literal strings: "Hello, world!"
631
+ StringLiteral = 27;
632
+ // non-regex escapes: "\t", "\n"
633
+ StringLiteralEscape = 28;
634
+ // datetimes within strings, special words within a string, `{}` in format strings
635
+ StringLiteralSpecial = 29;
636
+ // "key" in { "key": "value" }, useful for example in JSON
637
+ StringLiteralKey = 30;
638
+ // 'c' or similar, in languages that differentiate strings and characters
639
+ CharacterLiteral = 31;
640
+ // Literal numbers, both floats and integers
641
+ NumericLiteral = 32;
642
+ // `true`, `false`
643
+ BooleanLiteral = 33;
644
+
645
+ // Used for XML-like tags
646
+ Tag = 34;
647
+ // Attribute name in XML-like tags
648
+ TagAttribute = 35;
649
+ // Delimiters for XML-like tags
650
+ TagDelimiter = 36;
651
+ }
652
+
653
+ // Occurrence associates a source position with a symbol and/or highlighting
654
+ // information.
655
+ //
656
+ // If possible, indexers should try to bundle logically related information
657
+ // across occurrences into a single occurrence to reduce payload sizes.
658
+ message Occurrence {
659
+ // Half-open [start, end) range of this occurrence. Must be exactly three or four
660
+ // elements:
661
+ //
662
+ // - Four elements: `[startLine, startCharacter, endLine, endCharacter]`
663
+ // - Three elements: `[startLine, startCharacter, endCharacter]`. The end line
664
+ // is inferred to have the same value as the start line.
665
+ //
666
+ // It is allowed for the range to be empty (i.e. start==end).
667
+ //
668
+ // Line numbers and characters are always 0-based. Make sure to increment the
669
+ // line/character values before displaying them in an editor-like UI because
670
+ // editors conventionally use 1-based numbers.
671
+ //
672
+ // The 'character' value is interpreted based on the PositionEncoding for
673
+ // the Document.
674
+ //
675
+ // Historical note: the original draft of this schema had a `Range` message
676
+ // type with `start` and `end` fields of type `Position`, mirroring LSP.
677
+ // Benchmarks revealed that this encoding was inefficient and that we could
678
+ // reduce the total payload size of an index by 50% by using `repeated int32`
679
+ // instead. The `repeated int32` encoding is admittedly more embarrassing to
680
+ // work with in some programming languages but we hope the performance
681
+ // improvements make up for it.
682
+ repeated int32 range = 1;
683
+ // (optional) The symbol that appears at this position. See
684
+ // `SymbolInformation.symbol` for how to format symbols as strings.
685
+ string symbol = 2;
686
+ // (optional) Bitset containing `SymbolRole`s in this occurrence.
687
+ // See `SymbolRole`'s documentation for how to read and write this field.
688
+ int32 symbol_roles = 3;
689
+ // (optional) CommonMark-formatted documentation for this specific range. If
690
+ // empty, the `Symbol.documentation` field is used instead. One example
691
+ // where this field might be useful is when the symbol represents a generic
692
+ // function (with abstract type parameters such as `List<T>`) and at this
693
+ // occurrence we know the exact values (such as `List<String>`).
694
+ //
695
+ // This field can also be used for dynamically or gradually typed languages,
696
+ // which commonly allow for type-changing assignment.
697
+ repeated string override_documentation = 4;
698
+ // (optional) What syntax highlighting class should be used for this range?
699
+ SyntaxKind syntax_kind = 5;
700
+ // (optional) Diagnostics that have been reported for this specific range.
701
+ repeated Diagnostic diagnostics = 6;
702
+ // (optional) Using the same encoding as the sibling `range` field, half-open
703
+ // source range of the nearest non-trivial enclosing AST node. This range must
704
+ // enclose the `range` field. Example applications that make use of the
705
+ // enclosing_range field:
706
+ //
707
+ // - Call hierarchies: to determine what symbols are references from the body
708
+ // of a function
709
+ // - Symbol outline: to display breadcrumbs from the cursor position to the
710
+ // root of the file
711
+ // - Expand selection: to select the nearest enclosing AST node.
712
+ // - Highlight range: to indicate the AST expression that is associated with a
713
+ // hover popover
714
+ //
715
+ // For definition occurrences, the enclosing range should indicate the
716
+ // start/end bounds of the entire definition AST node, including
717
+ // documentation.
718
+ // ```
719
+ // const n = 3
720
+ // ^ range
721
+ // ^^^^^^^^^^^ enclosing_range
722
+ //
723
+ // /** Parses the string into something */
724
+ // ^ enclosing_range start --------------------------------------|
725
+ // function parse(input string): string { |
726
+ // ^^^^^ range |
727
+ // return input.slice(n) |
728
+ // } |
729
+ // ^ enclosing_range end <---------------------------------------|
730
+ // ```
731
+ //
732
+ // Any attributes/decorators/attached macros should also be part of the
733
+ // enclosing range.
734
+ //
735
+ // ```python
736
+ // @cache
737
+ // ^ enclosing_range start---------------------|
738
+ // def factorial(n): |
739
+ // return n * factorial(n-1) if n else 1 |
740
+ // < enclosing_range end-----------------------|
741
+ //
742
+ // ```
743
+ //
744
+ // For reference occurrences, the enclosing range should indicate the start/end
745
+ // bounds of the parent expression.
746
+ // ```
747
+ // const a = a.b
748
+ // ^ range
749
+ // ^^^ enclosing_range
750
+ // const b = a.b(41).f(42).g(43)
751
+ // ^ range
752
+ // ^^^^^^^^^^^^^ enclosing_range
753
+ // ```
754
+ repeated int32 enclosing_range = 7;
755
+ }
756
+
757
+ // Represents a diagnostic, such as a compiler error or warning, which should be
758
+ // reported for a document.
759
+ message Diagnostic {
760
+ // Should this diagnostic be reported as an error, warning, info, or hint?
761
+ Severity severity = 1;
762
+ // (optional) Code of this diagnostic, which might appear in the user interface.
763
+ string code = 2;
764
+ // Message of this diagnostic.
765
+ string message = 3;
766
+ // (optional) Human-readable string describing the source of this diagnostic, e.g.
767
+ // 'typescript' or 'super lint'.
768
+ string source = 4;
769
+ repeated DiagnosticTag tags = 5;
770
+ }
771
+
772
+ enum Severity {
773
+ UnspecifiedSeverity = 0;
774
+ Error = 1;
775
+ Warning = 2;
776
+ Information = 3;
777
+ Hint = 4;
778
+ }
779
+
780
+ enum DiagnosticTag {
781
+ UnspecifiedDiagnosticTag = 0;
782
+ Unnecessary = 1;
783
+ Deprecated = 2;
784
+ }
785
+
786
+ // Language standardises names of common programming languages that can be used
787
+ // for the `Document.language` field. The primary purpose of this enum is to
788
+ // prevent a situation where we have a single programming language ends up with
789
+ // multiple string representations. For example, the C++ language uses the name
790
+ // "CPP" in this enum and other names such as "cpp" are incompatible.
791
+ // Feel free to send a pull-request to add missing programming languages.
792
+ enum Language {
793
+ UnspecifiedLanguage = 0;
794
+ ABAP = 60;
795
+ Apex = 96;
796
+ APL = 49;
797
+ Ada = 39;
798
+ Agda = 45;
799
+ AsciiDoc = 86;
800
+ Assembly = 58;
801
+ Awk = 66;
802
+ Bat = 68;
803
+ BibTeX = 81;
804
+ C = 34;
805
+ COBOL = 59;
806
+ CPP = 35; // C++ (the name "CPP" was chosen for consistency with LSP)
807
+ CSS = 26;
808
+ CSharp = 1;
809
+ Clojure = 8;
810
+ Coffeescript = 21;
811
+ CommonLisp = 9;
812
+ Coq = 47;
813
+ CUDA = 97;
814
+ Dart = 3;
815
+ Delphi = 57;
816
+ Diff = 88;
817
+ Dockerfile = 80;
818
+ Dyalog = 50;
819
+ Elixir = 17;
820
+ Erlang = 18;
821
+ FSharp = 42;
822
+ Fish = 65;
823
+ Flow = 24;
824
+ Fortran = 56;
825
+ Git_Commit = 91;
826
+ Git_Config = 89;
827
+ Git_Rebase = 92;
828
+ Go = 33;
829
+ GraphQL = 98;
830
+ Groovy = 7;
831
+ HTML = 30;
832
+ Hack = 20;
833
+ Handlebars = 90;
834
+ Haskell = 44;
835
+ Idris = 46;
836
+ Ini = 72;
837
+ J = 51;
838
+ JSON = 75;
839
+ Java = 6;
840
+ JavaScript = 22;
841
+ JavaScriptReact = 93;
842
+ Jsonnet = 76;
843
+ Julia = 55;
844
+ Justfile = 109;
845
+ Kotlin = 4;
846
+ LaTeX = 83;
847
+ Lean = 48;
848
+ Less = 27;
849
+ Lua = 12;
850
+ Luau = 108;
851
+ Makefile = 79;
852
+ Markdown = 84;
853
+ Matlab = 52;
854
+ Nickel = 110; // https://nickel-lang.org/
855
+ Nix = 77;
856
+ OCaml = 41;
857
+ Objective_C = 36;
858
+ Objective_CPP = 37;
859
+ Pascal = 99;
860
+ PHP = 19;
861
+ PLSQL = 70;
862
+ Perl = 13;
863
+ PowerShell = 67;
864
+ Prolog = 71;
865
+ Protobuf = 100;
866
+ Python = 15;
867
+ R = 54;
868
+ Racket = 11;
869
+ Raku = 14;
870
+ Razor = 62;
871
+ Repro = 102; // Internal language for testing SCIP
872
+ ReST = 85;
873
+ Ruby = 16;
874
+ Rust = 40;
875
+ SAS = 61;
876
+ SCSS = 29;
877
+ SML = 43;
878
+ SQL = 69;
879
+ Sass = 28;
880
+ Scala = 5;
881
+ Scheme = 10;
882
+ ShellScript = 64; // Bash
883
+ Skylark = 78;
884
+ Slang = 107;
885
+ Solidity = 95;
886
+ Svelte = 106;
887
+ Swift = 2;
888
+ Tcl = 101;
889
+ TOML = 73;
890
+ TeX = 82;
891
+ Thrift = 103;
892
+ TypeScript = 23;
893
+ TypeScriptReact = 94;
894
+ Verilog = 104;
895
+ VHDL = 105;
896
+ VisualBasic = 63;
897
+ Vue = 25;
898
+ Wolfram = 53;
899
+ XML = 31;
900
+ XSL = 32;
901
+ YAML = 74;
902
+ Zig = 38;
903
+ // NextLanguage = 111;
904
+ // Steps add a new language:
905
+ // 1. Copy-paste the "NextLanguage = N" line above
906
+ // 2. Increment "NextLanguage = N" to "NextLanguage = N+1"
907
+ // 3. Replace "NextLanguage = N" with the name of the new language.
908
+ // 4. Move the new language to the correct line above using alphabetical order
909
+ // 5. (optional) Add a brief comment behind the language if the name is not self-explanatory
910
+ }