idl

package
Version: v1.29.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 4 Imported by: 8

Documentation

Overview

Package idl provides a parser for Thrift IDL files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(s []byte) (*ast.Program, error)

Parse parses a Thrift document. If there is an error, it will be of type *ParseError.

Types

type Config added in v1.28.0

type Config struct {
	// If Info is non-nil, it will be populated with information about the
	// parsed nodes.
	Info *Info
}

Config configures the Thrift IDL parser.

func (*Config) Parse added in v1.28.0

func (c *Config) Parse(s []byte) (*ast.Program, error)

Parse parses the given Thrift document.

type Error added in v1.28.0

type Error struct {
	Pos ast.Position
	Err error
}

Error holds an error and the position that caused it.

type Info added in v1.28.0

type Info struct {
	// contains filtered or unexported fields
}

Info contains additional information about the parsed document.

func (*Info) Pos added in v1.28.0

func (i *Info) Pos(n ast.Node) ast.Position

Pos returns a Node's position in the parsed document.

type ParseError added in v1.28.0

type ParseError struct{ Errors []Error }

ParseError is an error type listing parse errors and the positions that caused them.

func (*ParseError) Error added in v1.28.0

func (pe *ParseError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL