lexer

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

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

Go to latest
Published: Nov 15, 2023 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lexer contains a simple lexer for reading an input-string and converting it into a series of tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

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

Lexer is used as the lexer for our deployr "language".

func New

func New(input string) *Lexer

New a Lexer instance from string input.

func (*Lexer) Dump

func (l *Lexer) Dump()

Dump outputs the complete stream of tokens from the lexer, consuming all input as it does so.

func (*Lexer) NextToken

func (l *Lexer) NextToken() token.Token

NextToken to read next token, skipping the white space.

Jump to

Keyboard shortcuts

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