interpreter

package
v0.0.0-...-1bf21ad Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoPreprocessing

func DoPreprocessing(str, dir string) (code string, ttl uint32)

Types

type Entry

type Entry struct {
	Type       fields.RecordType
	TimeToLive uint32
	Recursive  bool
	Native     bool
	Name       string
	Value      []byte
}

type KV

type KV struct {
	Name       string
	Value      string
	Native     bool
	Recursive  bool
	IP         bool
	TimeToLive uint32
}

type Token

type Token struct {
	Type  TokenType
	Value string
	Line  int
}

func LexConfig

func LexConfig(config string) []Token

type TokenType

type TokenType uint8
const (
	IDENTIFIER  TokenType = 0
	STRING      TokenType = 1
	NUMBER      TokenType = 2
	IN          TokenType = 3
	NATIVE      TokenType = 4
	ZONE        TokenType = 5
	ARROW       TokenType = 6
	OPEN_BRACE  TokenType = 7
	CLOSE_BRACE TokenType = 8
)

type Zone

type Zone struct {
	FQDN    string
	Entries []Entry
	Zones   []Zone
}

func ParseConfig

func ParseConfig(tokens []Token, ttl uint32) []Zone

type Zones

type Zones []Zone

Jump to

Keyboard shortcuts

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