Documentation ¶
Overview ¶
Package schema defines constants used in the Kythe schema.
Index ¶
Constants ¶
const ( NodeKindFact = "/kythe/node/kind" SubkindFact = "/kythe/subkind" AnchorStartFact = "/kythe/loc/start" AnchorEndFact = "/kythe/loc/end" TextFact = "/kythe/text" TextEncodingFact = "/kythe/text/encoding" )
Kythe node fact labels
const ( AnchorKind = "anchor" FileKind = "file" NameKind = "name" EnumKind = "enum" FunctionKind = "function" PackageKind = "package" RecordKind = "record" VariableKind = "variable" )
Kythe node kinds
const ( ClassSubkind = "class" EnumClassSubkind = "enumClass" )
Kythe node subkinds
const ( ChildOfEdge = EdgePrefix + "childof" DefinesEdge = EdgePrefix + "defines" NamedEdge = EdgePrefix + "named" ParamEdge = EdgePrefix + "param" RefEdge = EdgePrefix + "ref" )
Kythe edge kinds
const AnchorLocFilter = "/kythe/loc/*"
Fact filter for anchor locations
const EdgePrefix = "/kythe/edge/"
EdgePrefix is the standard Kythe prefix for all edge kinds.
Variables ¶
This section is empty.
Functions ¶
func Canonicalize ¶
Canonicalize will return the canonical, forward version of an edge kind.
func MirrorEdge ¶
MirrorEdge returns the reverse edge kind for a given forward edge kind and returns the forward edge kind for a given reverse edge kind.
Types ¶
type EdgeDir ¶
type EdgeDir bool
EdgeDir represents the inherent direction of an edge kind.
Forward edges are generally depedency edges and ensure that each node has a small out-degree in the Kythe graph. Reverse edges are the opposite.
func EdgeDirection ¶
EdgeDirection returns the edge direction of the given edge kind