scanner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package scanner. Contains some common data types, methods, and functions for all scanner implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuoteChar

func QuoteChar(c byte) string

QuoteChar formats char as a quoted character literal.

Types

type LexemesStack

type LexemesStack []lexeme.LexEvent

LexemesStack a stack of lexemes.

func NewLexemesStack

func NewLexemesStack() LexemesStack

NewLexemesStack creates a stack of lexemes.

func (*LexemesStack) Get

func (stack *LexemesStack) Get(i int) lexeme.LexEvent

Get returns lexeme of the stack, without removing.

func (*LexemesStack) Len

func (stack *LexemesStack) Len() int

Len returns length of the stack.

func (*LexemesStack) Peek

func (stack *LexemesStack) Peek() lexeme.LexEvent

Peek returns lexeme of the stack from the end, without removing.

func (*LexemesStack) Pop

func (stack *LexemesStack) Pop() lexeme.LexEvent

Pop pops a lexeme from the stack.

func (*LexemesStack) Push

func (stack *LexemesStack) Push(lex lexeme.LexEvent)

Push pushes a lexeme onto the stack.

Jump to

Keyboard shortcuts

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