goscanner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package goscanner have a bundle of code for lexical analysis and syntaxical analysis using the core go/scanner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoScanner

func NewGoScanner() tokenizer.Tokenizer

NewGoScanner generate a GoScanner object and force to check implementation the tokenizer.Tokenizer interface

Types

type GoScanner

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

GoScanner implement the tokenizer.Tokenizer interface with the 'go/scanner' pkg : https://godoc.org/go/scanner

func (*GoScanner) Init

func (s *GoScanner) Init(input string)

Init init a scanner.Scanner of the go/scanner package

func (*GoScanner) Scan

func (s *GoScanner) Scan() (string, token.Token, error)

Scan forward in the token list and return the token literal, the token type and an error if it occur end of list is notify by token.EOF token type

Jump to

Keyboard shortcuts

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