scip

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProtocolVersion_name = map[int32]string{
		0: "UnspecifiedProtocolVersion",
	}
	ProtocolVersion_value = map[string]int32{
		"UnspecifiedProtocolVersion": 0,
	}
)

Enum value maps for ProtocolVersion.

View Source
var (
	TextEncoding_name = map[int32]string{
		0: "UnspecifiedTextEncoding",
		1: "UTF8",
		2: "UTF16",
	}
	TextEncoding_value = map[string]int32{
		"UnspecifiedTextEncoding": 0,
		"UTF8":                    1,
		"UTF16":                   2,
	}
)

Enum value maps for TextEncoding.

View Source
var (
	SymbolRole_name = map[int32]string{
		0:  "UnspecifiedSymbolRole",
		1:  "Definition",
		2:  "Import",
		4:  "WriteAccess",
		8:  "ReadAccess",
		16: "Generated",
		32: "Test",
	}
	SymbolRole_value = map[string]int32{
		"UnspecifiedSymbolRole": 0,
		"Definition":            1,
		"Import":                2,
		"WriteAccess":           4,
		"ReadAccess":            8,
		"Generated":             16,
		"Test":                  32,
	}
)

Enum value maps for SymbolRole.

View Source
var (
	SyntaxKind_name = map[int32]string{
		0: "UnspecifiedSyntaxKind",
		1: "Comment",
		2: "PunctuationDelimiter",
		3: "PunctuationBracket",
		4: "Keyword",

		5:  "IdentifierOperator",
		6:  "Identifier",
		7:  "IdentifierBuiltin",
		8:  "IdentifierNull",
		9:  "IdentifierConstant",
		10: "IdentifierMutableGlobal",
		11: "IdentifierParameter",
		12: "IdentifierLocal",
		13: "IdentifierShadowed",
		14: "IdentifierNamespace",

		15: "IdentifierFunction",
		16: "IdentifierFunctionDefinition",
		17: "IdentifierMacro",
		18: "IdentifierMacroDefinition",
		19: "IdentifierType",
		20: "IdentifierBuiltinType",
		21: "IdentifierAttribute",
		22: "RegexEscape",
		23: "RegexRepeated",
		24: "RegexWildcard",
		25: "RegexDelimiter",
		26: "RegexJoin",
		27: "StringLiteral",
		28: "StringLiteralEscape",
		29: "StringLiteralSpecial",
		30: "StringLiteralKey",
		31: "CharacterLiteral",
		32: "NumericLiteral",
		33: "BooleanLiteral",
		34: "Tag",
		35: "TagAttribute",
		36: "TagDelimiter",
	}
	SyntaxKind_value = map[string]int32{
		"UnspecifiedSyntaxKind":        0,
		"Comment":                      1,
		"PunctuationDelimiter":         2,
		"PunctuationBracket":           3,
		"Keyword":                      4,
		"IdentifierKeyword":            4,
		"IdentifierOperator":           5,
		"Identifier":                   6,
		"IdentifierBuiltin":            7,
		"IdentifierNull":               8,
		"IdentifierConstant":           9,
		"IdentifierMutableGlobal":      10,
		"IdentifierParameter":          11,
		"IdentifierLocal":              12,
		"IdentifierShadowed":           13,
		"IdentifierNamespace":          14,
		"IdentifierModule":             14,
		"IdentifierFunction":           15,
		"IdentifierFunctionDefinition": 16,
		"IdentifierMacro":              17,
		"IdentifierMacroDefinition":    18,
		"IdentifierType":               19,
		"IdentifierBuiltinType":        20,
		"IdentifierAttribute":          21,
		"RegexEscape":                  22,
		"RegexRepeated":                23,
		"RegexWildcard":                24,
		"RegexDelimiter":               25,
		"RegexJoin":                    26,
		"StringLiteral":                27,
		"StringLiteralEscape":          28,
		"StringLiteralSpecial":         29,
		"StringLiteralKey":             30,
		"CharacterLiteral":             31,
		"NumericLiteral":               32,
		"BooleanLiteral":               33,
		"Tag":                          34,
		"TagAttribute":                 35,
		"TagDelimiter":                 36,
	}
)

Enum value maps for SyntaxKind.

View Source
var (
	Severity_name = map[int32]string{
		0: "UnspecifiedSeverity",
		1: "Error",
		2: "Warning",
		3: "Information",
		4: "Hint",
	}
	Severity_value = map[string]int32{
		"UnspecifiedSeverity": 0,
		"Error":               1,
		"Warning":             2,
		"Information":         3,
		"Hint":                4,
	}
)

Enum value maps for Severity.

View Source
var (
	DiagnosticTag_name = map[int32]string{
		0: "UnspecifiedDiagnosticTag",
		1: "Unnecessary",
		2: "Deprecated",
	}
	DiagnosticTag_value = map[string]int32{
		"UnspecifiedDiagnosticTag": 0,
		"Unnecessary":              1,
		"Deprecated":               2,
	}
)

Enum value maps for DiagnosticTag.

View Source
var (
	Language_name = map[int32]string{
		0:  "UnspecifiedLanguage",
		60: "ABAP",
		49: "APL",
		39: "Ada",
		45: "Agda",
		86: "AsciiDoc",
		58: "Assembly",
		66: "Awk",
		68: "Bat",
		81: "BibTeX",
		34: "C",
		59: "COBOL",
		35: "CPP",
		26: "CSS",
		1:  "CSharp",
		8:  "Clojure",
		21: "Coffeescript",
		9:  "CommonLisp",
		47: "Coq",
		3:  "Dart",
		57: "Delphi",
		88: "Diff",
		80: "Dockerfile",
		50: "Dyalog",
		17: "Elixir",
		18: "Erlang",
		42: "FSharp",
		65: "Fish",
		24: "Flow",
		56: "Fortran",
		91: "Git_Commit",
		89: "Git_Config",
		92: "Git_Rebase",
		33: "Go",
		7:  "Groovy",
		30: "HTML",
		20: "Hack",
		90: "Handlebars",
		44: "Haskell",
		46: "Idris",
		72: "Ini",
		51: "J",
		75: "JSON",
		6:  "Java",
		22: "JavaScript",
		93: "JavaScriptReact",
		76: "Jsonnet",
		55: "Julia",
		4:  "Kotlin",
		83: "LaTeX",
		48: "Lean",
		27: "Less",
		12: "Lua",
		79: "Makefile",
		84: "Markdown",
		52: "Matlab",
		77: "Nix",
		41: "OCaml",
		36: "Objective_C",
		37: "Objective_CPP",
		19: "PHP",
		70: "PLSQL",
		13: "Perl",
		67: "PowerShell",
		71: "Prolog",
		15: "Python",
		54: "R",
		11: "Racket",
		14: "Raku",
		62: "Razor",
		85: "ReST",
		16: "Ruby",
		40: "Rust",
		61: "SAS",
		29: "SCSS",
		43: "SML",
		69: "SQL",
		28: "Sass",
		5:  "Scala",
		10: "Scheme",
		64: "ShellScript",
		78: "Skylark",
		2:  "Swift",
		73: "TOML",
		82: "TeX",
		23: "TypeScript",
		94: "TypeScriptReact",
		63: "VisualBasic",
		25: "Vue",
		53: "Wolfram",
		31: "XML",
		32: "XSL",
		74: "YAML",
		38: "Zig",
	}
	Language_value = map[string]int32{
		"UnspecifiedLanguage": 0,
		"ABAP":                60,
		"APL":                 49,
		"Ada":                 39,
		"Agda":                45,
		"AsciiDoc":            86,
		"Assembly":            58,
		"Awk":                 66,
		"Bat":                 68,
		"BibTeX":              81,
		"C":                   34,
		"COBOL":               59,
		"CPP":                 35,
		"CSS":                 26,
		"CSharp":              1,
		"Clojure":             8,
		"Coffeescript":        21,
		"CommonLisp":          9,
		"Coq":                 47,
		"Dart":                3,
		"Delphi":              57,
		"Diff":                88,
		"Dockerfile":          80,
		"Dyalog":              50,
		"Elixir":              17,
		"Erlang":              18,
		"FSharp":              42,
		"Fish":                65,
		"Flow":                24,
		"Fortran":             56,
		"Git_Commit":          91,
		"Git_Config":          89,
		"Git_Rebase":          92,
		"Go":                  33,
		"Groovy":              7,
		"HTML":                30,
		"Hack":                20,
		"Handlebars":          90,
		"Haskell":             44,
		"Idris":               46,
		"Ini":                 72,
		"J":                   51,
		"JSON":                75,
		"Java":                6,
		"JavaScript":          22,
		"JavaScriptReact":     93,
		"Jsonnet":             76,
		"Julia":               55,
		"Kotlin":              4,
		"LaTeX":               83,
		"Lean":                48,
		"Less":                27,
		"Lua":                 12,
		"Makefile":            79,
		"Markdown":            84,
		"Matlab":              52,
		"Nix":                 77,
		"OCaml":               41,
		"Objective_C":         36,
		"Objective_CPP":       37,
		"PHP":                 19,
		"PLSQL":               70,
		"Perl":                13,
		"PowerShell":          67,
		"Prolog":              71,
		"Python":              15,
		"R":                   54,
		"Racket":              11,
		"Raku":                14,
		"Razor":               62,
		"ReST":                85,
		"Ruby":                16,
		"Rust":                40,
		"SAS":                 61,
		"SCSS":                29,
		"SML":                 43,
		"SQL":                 69,
		"Sass":                28,
		"Scala":               5,
		"Scheme":              10,
		"ShellScript":         64,
		"Skylark":             78,
		"Swift":               2,
		"TOML":                73,
		"TeX":                 82,
		"TypeScript":          23,
		"TypeScriptReact":     94,
		"VisualBasic":         63,
		"Vue":                 25,
		"Wolfram":             53,
		"XML":                 31,
		"XSL":                 32,
		"YAML":                74,
		"Zig":                 38,
	}
)

Enum value maps for Language.

View Source
var (
	Descriptor_Suffix_name = map[int32]string{
		0: "UnspecifiedSuffix",
		1: "Namespace",

		2: "Type",
		3: "Term",
		4: "Method",
		5: "TypeParameter",
		6: "Parameter",
		9: "Macro",
		7: "Meta",
		8: "Local",
	}
	Descriptor_Suffix_value = map[string]int32{
		"UnspecifiedSuffix": 0,
		"Namespace":         1,
		"Package":           1,
		"Type":              2,
		"Term":              3,
		"Method":            4,
		"TypeParameter":     5,
		"Parameter":         6,
		"Macro":             9,
		"Meta":              7,
		"Local":             8,
	}
)

Enum value maps for Descriptor_Suffix.

View Source
var DescriptorOnlyFormatter = SymbolFormatter{
	IncludeScheme:         func(scheme string) bool { return scheme == "local" },
	IncludePackageManager: func(_ string) bool { return false },
	IncludePackageName:    func(_ string) bool { return false },
	IncludePackageVersion: func(_ string) bool { return false },
	IncludeDescriptor:     func(_ string) bool { return true },
}

DescriptorOnlyFormatter formats only the descriptor part of the symbol.

View Source
var VerboseSymbolFormatter = SymbolFormatter{
	IncludeScheme:         func(_ string) bool { return true },
	IncludePackageManager: func(_ string) bool { return true },
	IncludePackageName:    func(_ string) bool { return true },
	IncludePackageVersion: func(_ string) bool { return true },
	IncludeDescriptor:     func(_ string) bool { return true },
}

VerboseSymbolFormatter formats all parts of the symbol.

Functions

func ConvertSCIPToLSIF

func ConvertSCIPToLSIF(index *Index) ([]reader.Element, error)

ConvertSCIPToLSIF takes a SCIP index and returns the equivalent LSIF index. There doesn't exist a reliable bijection between SCIP and LSIF.

This conversion is lossy because SCIP includes metadata that has no equivalent encoding in LSIF, such as scip.SymbolRole beyond the definition role.

Also, LSIF allows encoding certain behaviors that SCIP current doesn't support, such as asymmetric references/definitions.

This conversion functionality is used by src-cli.

func ElementsToJsonElements

func ElementsToJsonElements(els []reader.Element) []jsonElement

func IsGlobalSymbol

func IsGlobalSymbol(symbol string) bool

func IsLocalSymbol

func IsLocalSymbol(symbol string) bool

func WriteNDJSON

func WriteNDJSON(elements []jsonElement, out io.Writer) error

Types

type Descriptor

type Descriptor struct {
	Name          string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Disambiguator string            `protobuf:"bytes,2,opt,name=disambiguator,proto3" json:"disambiguator,omitempty"`
	Suffix        Descriptor_Suffix `protobuf:"varint,3,opt,name=suffix,proto3,enum=scip.Descriptor_Suffix" json:"suffix,omitempty"`
	// contains filtered or unexported fields
}

func (*Descriptor) Descriptor deprecated

func (*Descriptor) Descriptor() ([]byte, []int)

Deprecated: Use Descriptor.ProtoReflect.Descriptor instead.

func (*Descriptor) GetDisambiguator

func (x *Descriptor) GetDisambiguator() string

func (*Descriptor) GetName

func (x *Descriptor) GetName() string

func (*Descriptor) GetSuffix

func (x *Descriptor) GetSuffix() Descriptor_Suffix

func (*Descriptor) ProtoMessage

func (*Descriptor) ProtoMessage()

func (*Descriptor) ProtoReflect

func (x *Descriptor) ProtoReflect() protoreflect.Message

func (*Descriptor) Reset

func (x *Descriptor) Reset()

func (*Descriptor) String

func (x *Descriptor) String() string

type Descriptor_Suffix

type Descriptor_Suffix int32
const (
	Descriptor_UnspecifiedSuffix Descriptor_Suffix = 0
	// Unit of code abstraction and/or namespacing.
	//
	// NOTE: This corresponds to a package in Go and JVM languages.
	Descriptor_Namespace Descriptor_Suffix = 1
	// Use Namespace instead.
	//
	// Deprecated: Do not use.
	Descriptor_Package       Descriptor_Suffix = 1
	Descriptor_Type          Descriptor_Suffix = 2
	Descriptor_Term          Descriptor_Suffix = 3
	Descriptor_Method        Descriptor_Suffix = 4
	Descriptor_TypeParameter Descriptor_Suffix = 5
	Descriptor_Parameter     Descriptor_Suffix = 6
	Descriptor_Macro         Descriptor_Suffix = 9
	// Can be used for any purpose.
	Descriptor_Meta  Descriptor_Suffix = 7
	Descriptor_Local Descriptor_Suffix = 8
)

func (Descriptor_Suffix) Descriptor

func (Descriptor_Suffix) Enum

func (Descriptor_Suffix) EnumDescriptor deprecated

func (Descriptor_Suffix) EnumDescriptor() ([]byte, []int)

Deprecated: Use Descriptor_Suffix.Descriptor instead.

func (Descriptor_Suffix) Number

func (Descriptor_Suffix) String

func (x Descriptor_Suffix) String() string

func (Descriptor_Suffix) Type

type Diagnostic

type Diagnostic struct {

	// Should this diagnostic be reported as an error, warning, info, or hint?
	Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=scip.Severity" json:"severity,omitempty"`
	// (optional) Code of this diagnostic, which might appear in the user interface.
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// Message of this diagnostic.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// (optional) Human-readable string describing the source of this diagnostic, e.g.
	// 'typescript' or 'super lint'.
	Source string          `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
	Tags   []DiagnosticTag `protobuf:"varint,5,rep,packed,name=tags,proto3,enum=scip.DiagnosticTag" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Represents a diagnostic, such as a compiler error or warning, which should be reported for a document.

func (*Diagnostic) Descriptor deprecated

func (*Diagnostic) Descriptor() ([]byte, []int)

Deprecated: Use Diagnostic.ProtoReflect.Descriptor instead.

func (*Diagnostic) GetCode

func (x *Diagnostic) GetCode() string

func (*Diagnostic) GetMessage

func (x *Diagnostic) GetMessage() string

func (*Diagnostic) GetSeverity

func (x *Diagnostic) GetSeverity() Severity

func (*Diagnostic) GetSource

func (x *Diagnostic) GetSource() string

func (*Diagnostic) GetTags

func (x *Diagnostic) GetTags() []DiagnosticTag

func (*Diagnostic) ProtoMessage

func (*Diagnostic) ProtoMessage()

func (*Diagnostic) ProtoReflect

func (x *Diagnostic) ProtoReflect() protoreflect.Message

func (*Diagnostic) Reset

func (x *Diagnostic) Reset()

func (*Diagnostic) String

func (x *Diagnostic) String() string

type DiagnosticTag

type DiagnosticTag int32
const (
	DiagnosticTag_UnspecifiedDiagnosticTag DiagnosticTag = 0
	DiagnosticTag_Unnecessary              DiagnosticTag = 1
	DiagnosticTag_Deprecated               DiagnosticTag = 2
)

func (DiagnosticTag) Descriptor

func (DiagnosticTag) Enum

func (x DiagnosticTag) Enum() *DiagnosticTag

func (DiagnosticTag) EnumDescriptor deprecated

func (DiagnosticTag) EnumDescriptor() ([]byte, []int)

Deprecated: Use DiagnosticTag.Descriptor instead.

func (DiagnosticTag) Number

func (DiagnosticTag) String

func (x DiagnosticTag) String() string

func (DiagnosticTag) Type

type Document

type Document struct {

	// The string ID for the programming language this file is written in.
	// The `Language` enum contains the names of most common programming languages.
	// This field is typed as a string to permit any programming langauge, including
	// ones that are not specified by the `Language` enum.
	Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
	// (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 '..'.
	RelativePath string `protobuf:"bytes,1,opt,name=relative_path,json=relativePath,proto3" json:"relative_path,omitempty"`
	// Occurrences that appear in this file.
	Occurrences []*Occurrence `protobuf:"bytes,2,rep,name=occurrences,proto3" json:"occurrences,omitempty"`
	// 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).
	Symbols []*SymbolInformation `protobuf:"bytes,3,rep,name=symbols,proto3" json:"symbols,omitempty"`
	// contains filtered or unexported fields
}

Document defines the metadata about a source file on disk.

func (*Document) Descriptor deprecated

func (*Document) Descriptor() ([]byte, []int)

Deprecated: Use Document.ProtoReflect.Descriptor instead.

func (*Document) GetLanguage added in v0.2.0

func (x *Document) GetLanguage() string

func (*Document) GetOccurrences

func (x *Document) GetOccurrences() []*Occurrence

func (*Document) GetRelativePath

func (x *Document) GetRelativePath() string

func (*Document) GetSymbols

func (x *Document) GetSymbols() []*SymbolInformation

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) ProtoReflect

func (x *Document) ProtoReflect() protoreflect.Message

func (*Document) Reset

func (x *Document) Reset()

func (*Document) String

func (x *Document) String() string

func (*Document) SymbolTable

func (x *Document) SymbolTable() map[string]*SymbolInformation

SymbolTable returns a map of SymbolInformation values keyed by the symbol field.

type Index

type Index struct {

	// Metadata about this index.
	Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Documents that belong to this index.
	Documents []*Document `protobuf:"bytes,2,rep,name=documents,proto3" json:"documents,omitempty"`
	// (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.
	ExternalSymbols []*SymbolInformation `protobuf:"bytes,3,rep,name=external_symbols,json=externalSymbols,proto3" json:"external_symbols,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*Index) Descriptor deprecated

func (*Index) Descriptor() ([]byte, []int)

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetDocuments

func (x *Index) GetDocuments() []*Document

func (*Index) GetExternalSymbols

func (x *Index) GetExternalSymbols() []*SymbolInformation

func (*Index) GetMetadata

func (x *Index) GetMetadata() *Metadata

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) ProtoReflect

func (x *Index) ProtoReflect() protoreflect.Message

func (*Index) Reset

func (x *Index) Reset()

func (*Index) String

func (x *Index) String() string

type Language added in v0.2.0

type Language int32

Language standardises names of common programming languages that can be used for the `Document.language` field. The primary purpose of this enum is to prevent a situation where we have a single programming language ends up with multiple string representations. For example, the C++ language uses the name "CPlusPlus" in this enum and other names such as "cpp" are incompatible. Feel free to send a pull-request to add missing programming languages.

const (
	Language_UnspecifiedLanguage Language = 0
	Language_ABAP                Language = 60
	Language_APL                 Language = 49
	Language_Ada                 Language = 39
	Language_Agda                Language = 45
	Language_AsciiDoc            Language = 86
	Language_Assembly            Language = 58
	Language_Awk                 Language = 66
	Language_Bat                 Language = 68
	Language_BibTeX              Language = 81
	Language_C                   Language = 34
	Language_COBOL               Language = 59
	Language_CPP                 Language = 35 // C++ (the name "CPP" was chosen for consistency with LSP)
	Language_CSS                 Language = 26
	Language_CSharp              Language = 1
	Language_Clojure             Language = 8
	Language_Coffeescript        Language = 21
	Language_CommonLisp          Language = 9
	Language_Coq                 Language = 47
	Language_Dart                Language = 3
	Language_Delphi              Language = 57
	Language_Diff                Language = 88
	Language_Dockerfile          Language = 80
	Language_Dyalog              Language = 50
	Language_Elixir              Language = 17
	Language_Erlang              Language = 18
	Language_FSharp              Language = 42
	Language_Fish                Language = 65
	Language_Flow                Language = 24
	Language_Fortran             Language = 56
	Language_Git_Commit          Language = 91
	Language_Git_Config          Language = 89
	Language_Git_Rebase          Language = 92
	Language_Go                  Language = 33
	Language_Groovy              Language = 7
	Language_HTML                Language = 30
	Language_Hack                Language = 20
	Language_Handlebars          Language = 90
	Language_Haskell             Language = 44
	Language_Idris               Language = 46
	Language_Ini                 Language = 72
	Language_J                   Language = 51
	Language_JSON                Language = 75
	Language_Java                Language = 6
	Language_JavaScript          Language = 22
	Language_JavaScriptReact     Language = 93
	Language_Jsonnet             Language = 76
	Language_Julia               Language = 55
	Language_Kotlin              Language = 4
	Language_LaTeX               Language = 83
	Language_Lean                Language = 48
	Language_Less                Language = 27
	Language_Lua                 Language = 12
	Language_Makefile            Language = 79
	Language_Markdown            Language = 84
	Language_Matlab              Language = 52
	Language_Nix                 Language = 77
	Language_OCaml               Language = 41
	Language_Objective_C         Language = 36
	Language_Objective_CPP       Language = 37
	Language_PHP                 Language = 19
	Language_PLSQL               Language = 70
	Language_Perl                Language = 13
	Language_PowerShell          Language = 67
	Language_Prolog              Language = 71
	Language_Python              Language = 15
	Language_R                   Language = 54
	Language_Racket              Language = 11
	Language_Raku                Language = 14
	Language_Razor               Language = 62
	Language_ReST                Language = 85
	Language_Ruby                Language = 16
	Language_Rust                Language = 40
	Language_SAS                 Language = 61
	Language_SCSS                Language = 29
	Language_SML                 Language = 43
	Language_SQL                 Language = 69
	Language_Sass                Language = 28
	Language_Scala               Language = 5
	Language_Scheme              Language = 10
	Language_ShellScript         Language = 64 // Bash
	Language_Skylark             Language = 78
	Language_Swift               Language = 2
	Language_TOML                Language = 73
	Language_TeX                 Language = 82
	Language_TypeScript          Language = 23
	Language_TypeScriptReact     Language = 94
	Language_VisualBasic         Language = 63
	Language_Vue                 Language = 25
	Language_Wolfram             Language = 53
	Language_XML                 Language = 31
	Language_XSL                 Language = 32
	Language_YAML                Language = 74
	Language_Zig                 Language = 38
)

func (Language) Descriptor added in v0.2.0

func (Language) Descriptor() protoreflect.EnumDescriptor

func (Language) Enum added in v0.2.0

func (x Language) Enum() *Language

func (Language) EnumDescriptor deprecated added in v0.2.0

func (Language) EnumDescriptor() ([]byte, []int)

Deprecated: Use Language.Descriptor instead.

func (Language) Number added in v0.2.0

func (x Language) Number() protoreflect.EnumNumber

func (Language) String added in v0.2.0

func (x Language) String() string

func (Language) Type added in v0.2.0

type Metadata

type Metadata struct {

	// Which version of this protocol was used to generate this index?
	Version ProtocolVersion `protobuf:"varint,1,opt,name=version,proto3,enum=scip.ProtocolVersion" json:"version,omitempty"`
	// Information about the tool that produced this index.
	ToolInfo *ToolInfo `protobuf:"bytes,2,opt,name=tool_info,json=toolInfo,proto3" json:"tool_info,omitempty"`
	// 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.
	ProjectRoot string `protobuf:"bytes,3,opt,name=project_root,json=projectRoot,proto3" json:"project_root,omitempty"`
	// Text encoding of the source files on disk that are referenced from
	// `Document.relative_path`.
	TextDocumentEncoding TextEncoding `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetProjectRoot

func (x *Metadata) GetProjectRoot() string

func (*Metadata) GetTextDocumentEncoding

func (x *Metadata) GetTextDocumentEncoding() TextEncoding

func (*Metadata) GetToolInfo

func (x *Metadata) GetToolInfo() *ToolInfo

func (*Metadata) GetVersion

func (x *Metadata) GetVersion() ProtocolVersion

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Occurrence

type Occurrence struct {

	// Source position of this occurrence. Must be exactly three or four
	// elements:
	//
	// - Four elements: `[startLine, startCharacter, endLine, endCharacter]`
	// - Three elements: `[startLine, startCharacter, endCharacter]`. The end line
	//   is inferred to have the same value as the start line.
	//
	// Line numbers and characters are always 0-based. Make sure to increment the
	// line/character values before displaying them in an editor-like UI because
	// editors conventionally use 1-based numbers.
	//
	// Historical note: the original draft of this schema had a `Range` message
	// type with `start` and `end` fields of type `Position`, mirroring LSP.
	// Benchmarks revealed that this encoding was inefficient and that we could
	// reduce the total payload size of an index by 50% by using `repeated int32`
	// instead.  The `repeated int32` encoding is admittedly more embarrassing to
	// work with in some programming languages but we hope the performance
	// improvements make up for it.
	Range []int32 `protobuf:"varint,1,rep,packed,name=range,proto3" json:"range,omitempty"`
	// (optional) The symbol that appears at this position. See
	// `SymbolInformation.symbol` for how to format symbols as strings.
	Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// (optional) Bitset containing `SymbolRole`s in this occurrence.
	// See `SymbolRole`'s documentation for how to read and write this field.
	SymbolRoles int32 `protobuf:"varint,3,opt,name=symbol_roles,json=symbolRoles,proto3" json:"symbol_roles,omitempty"`
	// (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.
	OverrideDocumentation []string `protobuf:"bytes,4,rep,name=override_documentation,json=overrideDocumentation,proto3" json:"override_documentation,omitempty"`
	// (optional) What syntax highlighting class should be used for this range?
	SyntaxKind SyntaxKind `protobuf:"varint,5,opt,name=syntax_kind,json=syntaxKind,proto3,enum=scip.SyntaxKind" json:"syntax_kind,omitempty"`
	// (optional) Diagnostics that have been reported for this specific range.
	Diagnostics []*Diagnostic `protobuf:"bytes,6,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*Occurrence) Descriptor deprecated

func (*Occurrence) Descriptor() ([]byte, []int)

Deprecated: Use Occurrence.ProtoReflect.Descriptor instead.

func (*Occurrence) GetDiagnostics

func (x *Occurrence) GetDiagnostics() []*Diagnostic

func (*Occurrence) GetOverrideDocumentation

func (x *Occurrence) GetOverrideDocumentation() []string

func (*Occurrence) GetRange

func (x *Occurrence) GetRange() []int32

func (*Occurrence) GetSymbol

func (x *Occurrence) GetSymbol() string

func (*Occurrence) GetSymbolRoles

func (x *Occurrence) GetSymbolRoles() int32

func (*Occurrence) GetSyntaxKind

func (x *Occurrence) GetSyntaxKind() SyntaxKind

func (*Occurrence) ProtoMessage

func (*Occurrence) ProtoMessage()

func (*Occurrence) ProtoReflect

func (x *Occurrence) ProtoReflect() protoreflect.Message

func (*Occurrence) Reset

func (x *Occurrence) Reset()

func (*Occurrence) String

func (x *Occurrence) String() string

type Package

type Package struct {
	Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

Unit of packaging and distribution.

NOTE: This corresponds to a module in Go and JVM languages.

func (*Package) Descriptor deprecated

func (*Package) Descriptor() ([]byte, []int)

Deprecated: Use Package.ProtoReflect.Descriptor instead.

func (*Package) GetManager

func (x *Package) GetManager() string

func (*Package) GetName

func (x *Package) GetName() string

func (*Package) GetVersion

func (x *Package) GetVersion() string

func (*Package) ID

func (x *Package) ID() string

func (*Package) ProtoMessage

func (*Package) ProtoMessage()

func (*Package) ProtoReflect

func (x *Package) ProtoReflect() protoreflect.Message

func (*Package) Reset

func (x *Package) Reset()

func (*Package) String

func (x *Package) String() string

type Position

type Position struct {
	Line      int32
	Character int32
}

Position represents an offset position.

type ProtocolVersion

type ProtocolVersion int32
const (
	ProtocolVersion_UnspecifiedProtocolVersion ProtocolVersion = 0
)

func (ProtocolVersion) Descriptor

func (ProtocolVersion) Enum

func (x ProtocolVersion) Enum() *ProtocolVersion

func (ProtocolVersion) EnumDescriptor deprecated

func (ProtocolVersion) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProtocolVersion.Descriptor instead.

func (ProtocolVersion) Number

func (ProtocolVersion) String

func (x ProtocolVersion) String() string

func (ProtocolVersion) Type

type Range

type Range struct {
	Start Position
	End   Position
}

Range represents a range between two offset positions. NOTE: the github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol package contains similarly shaped structs but this one exists primarily to make it easier to work with SCIP encoded positions, which have the type []int32 in Protobuf payloads.

func NewRange

func NewRange(scipRange []int32) *Range

NewRange converts an SCIP range into `Range`

func (Range) IsSingleLine

func (r Range) IsSingleLine() bool

func (Range) SCIPRange

func (r Range) SCIPRange() []int32

type Relationship

type Relationship struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// When resolving "Find references", this field documents what other symbols
	// should be included together with this symbol. For example, consider the
	// following TypeScript code that defines two symbols `Animal#sound()` and
	// `Dog#sound()`:
	// “`ts
	// interface Animal {
	//           ^^^^^^ definition Animal#
	//   sound(): string
	//   ^^^^^ definition Animal#sound()
	// }
	// class Dog implements Animal {
	//       ^^^ definition Dog#, implementation_symbols = Animal#
	//   public sound(): string { return "woof" }
	//          ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), implementation_symbols = Animal#sound()
	// }
	// const animal: Animal = new Dog()
	//               ^^^^^^ reference Animal#
	// console.log(animal.sound())
	//                    ^^^^^ reference Animal#sound()
	// “`
	// Doing "Find references" on the symbol `Animal#sound()` should return
	// references to the `Dog#sound()` method as well. Vice-versa, doing "Find
	// references" on the `Dog#sound()` method should include references to the
	// `Animal#sound()` method as well.
	IsReference bool `protobuf:"varint,2,opt,name=is_reference,json=isReference,proto3" json:"is_reference,omitempty"`
	// Similar to `references_symbols` but for "Go to implementation".
	// It's common for the `implementation_symbols` and `references_symbols` fields
	// have the same values but that's not always the case.
	// In the TypeScript example above, observe that `implementation_symbols` has
	// the value `"Animal#"` for the "Dog#" symbol while `references_symbols` is
	// empty. When requesting "Find references" on the "Animal#" symbol we don't
	// want to include references to "Dog#" even if "Go to implementation" on the
	// "Animal#" symbol should navigate to the "Dog#" symbol.
	IsImplementation bool `protobuf:"varint,3,opt,name=is_implementation,json=isImplementation,proto3" json:"is_implementation,omitempty"`
	// Similar to `references_symbols` but for "Go to type definition".
	IsTypeDefinition bool `protobuf:"varint,4,opt,name=is_type_definition,json=isTypeDefinition,proto3" json:"is_type_definition,omitempty"`
	// 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.
	IsDefinition bool `protobuf:"varint,5,opt,name=is_definition,json=isDefinition,proto3" json:"is_definition,omitempty"`
	// contains filtered or unexported fields
}

func (*Relationship) Descriptor deprecated

func (*Relationship) Descriptor() ([]byte, []int)

Deprecated: Use Relationship.ProtoReflect.Descriptor instead.

func (*Relationship) GetIsDefinition added in v0.2.1

func (x *Relationship) GetIsDefinition() bool

func (*Relationship) GetIsImplementation

func (x *Relationship) GetIsImplementation() bool

func (*Relationship) GetIsReference

func (x *Relationship) GetIsReference() bool

func (*Relationship) GetIsTypeDefinition

func (x *Relationship) GetIsTypeDefinition() bool

func (*Relationship) GetSymbol

func (x *Relationship) GetSymbol() string

func (*Relationship) ProtoMessage

func (*Relationship) ProtoMessage()

func (*Relationship) ProtoReflect

func (x *Relationship) ProtoReflect() protoreflect.Message

func (*Relationship) Reset

func (x *Relationship) Reset()

func (*Relationship) String

func (x *Relationship) String() string

type Severity

type Severity int32
const (
	Severity_UnspecifiedSeverity Severity = 0
	Severity_Error               Severity = 1
	Severity_Warning             Severity = 2
	Severity_Information         Severity = 3
	Severity_Hint                Severity = 4
)

func (Severity) Descriptor

func (Severity) Descriptor() protoreflect.EnumDescriptor

func (Severity) Enum

func (x Severity) Enum() *Severity

func (Severity) EnumDescriptor deprecated

func (Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Severity.Descriptor instead.

func (Severity) Number

func (x Severity) Number() protoreflect.EnumNumber

func (Severity) String

func (x Severity) String() string

func (Severity) Type

type SourceFile

type SourceFile struct {
	AbsolutePath string
	RelativePath string
	Text         string
	Lines        []string
}

SourceFile includes helper methods to deal with source files.

func NewSourceFile

func NewSourceFile(absolutePath, relativePath, code string) *SourceFile

func NewSourceFileFromPath

func NewSourceFileFromPath(absolutePath, relativePath string) (*SourceFile, error)

NewSourceFileFromPath reads the provided absolute path from disk and returns a SourceFile.

func NewSourcesFromDirectory

func NewSourcesFromDirectory(directory string) ([]*SourceFile, error)

NewSourcesFromDirectory recursively walks the provided directory and creates a SourceFile for every regular file.

func (*SourceFile) RangeText

func (d *SourceFile) RangeText(position Range) string

RangeText returns the substring of the source file contents that enclose the provided range.

func (*SourceFile) String

func (d *SourceFile) String() string

type Symbol

type Symbol struct {
	Scheme      string        `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
	Package     *Package      `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	Descriptors []*Descriptor `protobuf:"bytes,3,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
	// contains filtered or unexported fields
}

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>
<symbol>               ::= <scheme> ' ' <package> ' ' (<descriptor>)+ | 'local ' <local-id>
<package>              ::= <manager> ' ' <package-name> ' ' <version>
<scheme>               ::= any UTF-8, escape spaces with double space.
<manager>              ::= same as above, 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>
<namespace>            ::= <name> '/'
<type>                 ::= <name> '#'
<term>                 ::= <name> '.'
<meta>                 ::= <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>)+ '`'
<escaped-characters>   ::= any UTF-8 character, escape backticks with double backtick.

```

The list of descriptors for a symbol should together form a fully qualified name for the symbol. That is, it should serve as a unique identifier across the package. Typically, it will include one descriptor for every node in the AST (along the ancestry path) between the root of the file and the node corresponding to the symbol.

func ParsePartialSymbol

func ParsePartialSymbol(symbol string, includeDescriptors bool) (*Symbol, error)

ParsePartialSymbol parses an SCIP string into the Symbol message with the option to exclude the `.Descriptor` field.

func ParseSymbol

func ParseSymbol(symbol string) (*Symbol, error)

ParseSymbol parses an SCIP string into the Symbol message.

func (*Symbol) Descriptor deprecated

func (*Symbol) Descriptor() ([]byte, []int)

Deprecated: Use Symbol.ProtoReflect.Descriptor instead.

func (*Symbol) GetDescriptors

func (x *Symbol) GetDescriptors() []*Descriptor

func (*Symbol) GetPackage

func (x *Symbol) GetPackage() *Package

func (*Symbol) GetScheme

func (x *Symbol) GetScheme() string

func (*Symbol) ProtoMessage

func (*Symbol) ProtoMessage()

func (*Symbol) ProtoReflect

func (x *Symbol) ProtoReflect() protoreflect.Message

func (*Symbol) Reset

func (x *Symbol) Reset()

func (*Symbol) String

func (x *Symbol) String() string

type SymbolFormatter

type SymbolFormatter struct {
	IncludeScheme         func(scheme string) bool
	IncludePackageManager func(manager string) bool
	IncludePackageName    func(name string) bool
	IncludePackageVersion func(version string) bool
	IncludeDescriptor     func(descriptor string) bool
}

SymbolFormatter configures how to format an SCIP symbol. Excluding parts of the symbol can be helpful for testing purposes. For example, snapshot tests may hardcode the package version number so it's easier to read the snapshot tests if the version is excluded.

func (*SymbolFormatter) Format

func (f *SymbolFormatter) Format(symbol string) (string, error)

func (*SymbolFormatter) FormatSymbol

func (f *SymbolFormatter) FormatSymbol(symbol *Symbol) string

type SymbolInformation

type SymbolInformation struct {

	// Identifier of this symbol, which can be referenced from `Occurence.symbol`.
	// The string must be formatted according to the grammar in `Symbol`.
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// (optional, but strongly recommended) The markdown-formatted documentation
	// for this symbol. This field is repeated to allow different kinds of
	// documentation.  For example, it's nice to include both the signature of a
	// method (parameters and return type) along with the accompanying docstring.
	Documentation []string `protobuf:"bytes,3,rep,name=documentation,proto3" json:"documentation,omitempty"`
	// (optional) Relationships to other symbols (e.g., implements, type definition).
	Relationships []*Relationship `protobuf:"bytes,4,rep,name=relationships,proto3" json:"relationships,omitempty"`
	// contains filtered or unexported fields
}

SymbolInformation defines metadata about a symbol, such as the symbol's docstring or what package it's defined it.

func (*SymbolInformation) Descriptor deprecated

func (*SymbolInformation) Descriptor() ([]byte, []int)

Deprecated: Use SymbolInformation.ProtoReflect.Descriptor instead.

func (*SymbolInformation) GetDocumentation

func (x *SymbolInformation) GetDocumentation() []string

func (*SymbolInformation) GetRelationships

func (x *SymbolInformation) GetRelationships() []*Relationship

func (*SymbolInformation) GetSymbol

func (x *SymbolInformation) GetSymbol() string

func (*SymbolInformation) ProtoMessage

func (*SymbolInformation) ProtoMessage()

func (*SymbolInformation) ProtoReflect

func (x *SymbolInformation) ProtoReflect() protoreflect.Message

func (*SymbolInformation) Reset

func (x *SymbolInformation) Reset()

func (*SymbolInformation) String

func (x *SymbolInformation) String() string

type SymbolRole

type SymbolRole int32

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`.

const (
	// This case is not meant to be used; it only exists to avoid an error
	// from the Protobuf code generator.
	SymbolRole_UnspecifiedSymbolRole SymbolRole = 0
	// Is the symbol defined here? If not, then this is a symbol reference.
	SymbolRole_Definition SymbolRole = 1
	// Is the symbol imported here?
	SymbolRole_Import SymbolRole = 2
	// Is the symbol written here?
	SymbolRole_WriteAccess SymbolRole = 4
	// Is the symbol read here?
	SymbolRole_ReadAccess SymbolRole = 8
	// Is the symbol in generated code?
	SymbolRole_Generated SymbolRole = 16
	// Is the symbol in test code?
	SymbolRole_Test SymbolRole = 32
)

func (SymbolRole) Descriptor

func (SymbolRole) Descriptor() protoreflect.EnumDescriptor

func (SymbolRole) Enum

func (x SymbolRole) Enum() *SymbolRole

func (SymbolRole) EnumDescriptor deprecated

func (SymbolRole) EnumDescriptor() ([]byte, []int)

Deprecated: Use SymbolRole.Descriptor instead.

func (SymbolRole) Matches

func (r SymbolRole) Matches(occ *Occurrence) bool

func (SymbolRole) Number

func (x SymbolRole) Number() protoreflect.EnumNumber

func (SymbolRole) String

func (x SymbolRole) String() string

func (SymbolRole) Type

type SyntaxKind

type SyntaxKind int32
const (
	SyntaxKind_UnspecifiedSyntaxKind SyntaxKind = 0
	// Comment, including comment markers and text
	SyntaxKind_Comment SyntaxKind = 1
	// `;` `.` `,`
	SyntaxKind_PunctuationDelimiter SyntaxKind = 2
	// (), {}, [] when used syntactically
	SyntaxKind_PunctuationBracket SyntaxKind = 3
	// `if`, `else`, `return`, `class`, etc.
	SyntaxKind_Keyword SyntaxKind = 4
	// Deprecated: Do not use.
	SyntaxKind_IdentifierKeyword SyntaxKind = 4
	// `+`, `*`, etc.
	SyntaxKind_IdentifierOperator SyntaxKind = 5
	// non-specific catch-all for any identifier not better described elsewhere
	SyntaxKind_Identifier SyntaxKind = 6
	// Identifiers builtin to the language: `min`, `print` in Python.
	SyntaxKind_IdentifierBuiltin SyntaxKind = 7
	// Identifiers representing `null`-like values: `None` in Python, `nil` in Go.
	SyntaxKind_IdentifierNull SyntaxKind = 8
	// `xyz` in `const xyz = "hello"`
	SyntaxKind_IdentifierConstant SyntaxKind = 9
	// `var X = "hello"` in Go
	SyntaxKind_IdentifierMutableGlobal SyntaxKind = 10
	// Parameter definition and references
	SyntaxKind_IdentifierParameter SyntaxKind = 11
	// Identifiers for variable definitions and references within a local scope
	SyntaxKind_IdentifierLocal SyntaxKind = 12
	// Identifiers that shadow other identifiers in an outer scope
	SyntaxKind_IdentifierShadowed SyntaxKind = 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.
	SyntaxKind_IdentifierNamespace SyntaxKind = 14
	// Deprecated: Do not use.
	SyntaxKind_IdentifierModule SyntaxKind = 14
	// Function references, including calls
	SyntaxKind_IdentifierFunction SyntaxKind = 15
	// Function definition only
	SyntaxKind_IdentifierFunctionDefinition SyntaxKind = 16
	// Macro references, including invocations
	SyntaxKind_IdentifierMacro SyntaxKind = 17
	// Macro definition only
	SyntaxKind_IdentifierMacroDefinition SyntaxKind = 18
	// non-builtin types
	SyntaxKind_IdentifierType SyntaxKind = 19
	// builtin types only, such as `str` for Python or `int` in Go
	SyntaxKind_IdentifierBuiltinType SyntaxKind = 20
	// Python decorators, c-like __attribute__
	SyntaxKind_IdentifierAttribute SyntaxKind = 21
	// `\b`
	SyntaxKind_RegexEscape SyntaxKind = 22
	// `*`, `+`
	SyntaxKind_RegexRepeated SyntaxKind = 23
	// `.`
	SyntaxKind_RegexWildcard SyntaxKind = 24
	// `(`, `)`, `[`, `]`
	SyntaxKind_RegexDelimiter SyntaxKind = 25
	// `|`, `-`
	SyntaxKind_RegexJoin SyntaxKind = 26
	// Literal strings: "Hello, world!"
	SyntaxKind_StringLiteral SyntaxKind = 27
	// non-regex escapes: "\t", "\n"
	SyntaxKind_StringLiteralEscape SyntaxKind = 28
	// datetimes within strings, special words within a string, `{}` in format strings
	SyntaxKind_StringLiteralSpecial SyntaxKind = 29
	// "key" in { "key": "value" }, useful for example in JSON
	SyntaxKind_StringLiteralKey SyntaxKind = 30
	// 'c' or similar, in languages that differentiate strings and characters
	SyntaxKind_CharacterLiteral SyntaxKind = 31
	// Literal numbers, both floats and integers
	SyntaxKind_NumericLiteral SyntaxKind = 32
	// `true`, `false`
	SyntaxKind_BooleanLiteral SyntaxKind = 33
	// Used for XML-like tags
	SyntaxKind_Tag SyntaxKind = 34
	// Attribute name in XML-like tags
	SyntaxKind_TagAttribute SyntaxKind = 35
	// Delimiters for XML-like tags
	SyntaxKind_TagDelimiter SyntaxKind = 36
)

func (SyntaxKind) Descriptor

func (SyntaxKind) Descriptor() protoreflect.EnumDescriptor

func (SyntaxKind) Enum

func (x SyntaxKind) Enum() *SyntaxKind

func (SyntaxKind) EnumDescriptor deprecated

func (SyntaxKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use SyntaxKind.Descriptor instead.

func (SyntaxKind) Number

func (x SyntaxKind) Number() protoreflect.EnumNumber

func (SyntaxKind) String

func (x SyntaxKind) String() string

func (SyntaxKind) Type

type TextEncoding

type TextEncoding int32
const (
	TextEncoding_UnspecifiedTextEncoding TextEncoding = 0
	TextEncoding_UTF8                    TextEncoding = 1
	TextEncoding_UTF16                   TextEncoding = 2
)

func (TextEncoding) Descriptor

func (TextEncoding) Enum

func (x TextEncoding) Enum() *TextEncoding

func (TextEncoding) EnumDescriptor deprecated

func (TextEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use TextEncoding.Descriptor instead.

func (TextEncoding) Number

func (TextEncoding) String

func (x TextEncoding) String() string

func (TextEncoding) Type

type ToolInfo

type ToolInfo struct {

	// Name of the indexer that produced this index.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Version of the indexer that produced this index.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Command-line arguments that were used to invoke this indexer.
	Arguments []string `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

func (*ToolInfo) Descriptor deprecated

func (*ToolInfo) Descriptor() ([]byte, []int)

Deprecated: Use ToolInfo.ProtoReflect.Descriptor instead.

func (*ToolInfo) GetArguments

func (x *ToolInfo) GetArguments() []string

func (*ToolInfo) GetName

func (x *ToolInfo) GetName() string

func (*ToolInfo) GetVersion

func (x *ToolInfo) GetVersion() string

func (*ToolInfo) ProtoMessage

func (*ToolInfo) ProtoMessage()

func (*ToolInfo) ProtoReflect

func (x *ToolInfo) ProtoReflect() protoreflect.Message

func (*ToolInfo) Reset

func (x *ToolInfo) Reset()

func (*ToolInfo) String

func (x *ToolInfo) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL