thriftrw: go.uber.org/thriftrw/idl/internal Index | Files

package internal

import "go.uber.org/thriftrw/idl/internal"

Copyright (c) 2020 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Package Files

docstring.go error.go lex.go parser.go quote.go y.go

Constants

const BINARY = 57361
const BOOL = 57353
const BYTE = 57354
const CONST = 57374
const DOUBLE = 57359
const DUBCONSTANT = 57349
const ENUM = 57373
const EXCEPTION = 57369
const EXTENDS = 57370
const FALSE = 57378
const I16 = 57356
const I32 = 57357
const I64 = 57358
const I8 = 57355
const IDENTIFIER = 57346
const INCLUDE = 57351
const INTCONSTANT = 57348
const LIST = 57363
const LITERAL = 57347
const MAP = 57362
const NAMESPACE = 57350
const ONEWAY = 57365
const OPTIONAL = 57376
const REQUIRED = 57375
const SERVICE = 57372
const SET = 57364
const STRING = 57360
const STRUCT = 57367
const THROWS = 57371
const TRUE = 57377
const TYPEDEF = 57366
const UNION = 57368
const VOID = 57352

func Parse Uses

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

Parse parses the given Thrift document.

func ParseDocstring Uses

func ParseDocstring(s string) string

ParseDocstring takes a docstring in the form,

/**
 * foo bar
 */

And returns,

foo bar

func UnquoteSingleQuoted Uses

func UnquoteSingleQuoted(in []byte) (string, error)

UnquoteSingleQuoted unquotes a slice of bytes representing a single quoted string.

UnquoteSingleQuoted([]byte("'foo'")) == "foo"

Package internal imports 6 packages (graph) and is imported by 4 packages. Updated 2020-01-24. Refresh now. Tools for package owners.