lexer

package
v0.0.0-...-bf9f4d5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package lexer contains the definition of the lexer element of the glif interpreter

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 the representation of the glif lexer It contains the following:

  • An input string (the program)
  • Positions indicators
  • A byte representing the current character under examination

func New

func New(input string) *Lexer

New creates a new lexer from an input string (program/code)

func (*Lexer) NextToken

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

NextToken reads the next gitoken.Token by parsing the next one (or two) bytes

Jump to

Keyboard shortcuts

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