schema

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2015 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Overview

Package schema defines constants used in the Kythe schema.

Index

Constants

View Source
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

View Source
const (
	AnchorKind = "anchor"
	FileKind   = "file"
	NameKind   = "name"

	EnumKind     = "enum"
	FunctionKind = "function"
	PackageKind  = "package"
	RecordKind   = "record"
	VariableKind = "variable"
)

Kythe node kinds

View Source
const (
	ClassSubkind     = "class"
	EnumClassSubkind = "enumClass"
)

Kythe node subkinds

View Source
const (
	ChildOfEdge = EdgePrefix + "childof"
	DefinesEdge = EdgePrefix + "defines"
	NamedEdge   = EdgePrefix + "named"
	ParamEdge   = EdgePrefix + "param"
	RefEdge     = EdgePrefix + "ref"
	TypedEdge   = EdgePrefix + "typed"
)

Kythe edge kinds

View Source
const AnchorLocFilter = "/kythe/loc/*"

Fact filter for anchor locations

View Source
const EdgePrefix = "/kythe/edge/"

EdgePrefix is the standard Kythe prefix for all edge kinds.

Variables

This section is empty.

Functions

func Canonicalize

func Canonicalize(kind string) string

Canonicalize will return the canonical, forward version of an edge kind.

func MirrorEdge

func MirrorEdge(kind string) string

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.

const (
	Forward EdgeDir = true
	Reverse EdgeDir = false
)

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

func EdgeDirection(kind string) EdgeDir

EdgeDirection returns the edge direction of the given edge kind

Jump to

Keyboard shortcuts

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