lexer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package lexer provides types and functions for lexing graphene code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LexErr

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

Represents an individual Lex error

func (*LexErr) Error

func (l *LexErr) Error() string

type LexErrs

type LexErrs []LexErr

A wrapper type arround multiple LexErr's

func (*LexErrs) Error

func (l *LexErrs) Error() string

type Lexer

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

Represents a graphene lexer

func NewLexer

func NewLexer(source string, fname string) Lexer

constructs a new lexer from source code and file name

func (*Lexer) Lex

func (l *Lexer) Lex() ([]token.Token, []string, LexErrs)

Lexes and returns any tokens, the source split at every newline and any errors

Jump to

Keyboard shortcuts

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