token

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Overview

Package token handles tokenization of the raw API documentation lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser interface {
	// Parse the raw extracted blocks into tokens
	Parse(b extract.Block) ([]Token, error)
}

Parser of the tokens

func NewParser

func NewParser(verbose bool) Parser

NewParser instance

type Token

type Token struct {
	Type Type
	Key  string
	Meta map[string]string
}

Token produced by the tokenization process.

Meta is a collection of all found and expected token meta properties defined by token dictionary.

type Type

type Type uint8

Type of the token from parsing perspective, i.e. shared dictionires

const (
	Value Type = iota
	Param
	Server
	ReqResp
	Router
	Ref
	Wrap
)

Token types

Jump to

Keyboard shortcuts

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