lsputils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASTNodeToRange

func ASTNodeToRange(node parser.Node) protocol.Range

func GetIncludeName

func GetIncludeName(file uri.URI) string

GetIncludeName return include name by file uri for example: file uri is file:///base.thrift, then `base` is include name

func GetIncludePath

func GetIncludePath(ast *parser.Document, includeName string) string

includeName: base.User. `base` is the includeName. returns ../../base.thrift if doesn't match, return empty string

func IncludeNames added in v0.1.3

func IncludeNames(cur uri.URI, includes []*parser.Include) (includeNames []string)

IncludeNames returns include names from include ast nodes

func IncludeURI

func IncludeURI(cur uri.URI, includePath string) uri.URI

cur is current file uri. for example file:///tmp/user.thrift includePath is include name used in code. for example: base.thrift

func ParseIdent added in v0.1.3

func ParseIdent(cur uri.URI, includes []*parser.Include, identifier string) (include, ident string)

ParseIdent parse an identifier. identifier format:

  1. identifier
  2. include.identifier

it returns include, ident

Types

This section is empty.

Jump to

Keyboard shortcuts

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