Documentation
¶
Overview ¶
Package scanner is the lexical parser.
Example ¶
package main
import (
"fmt"
"github.com/NeowayLabs/nash/scanner"
)
func main() {
lex := scanner.Lex("-input-", `echo "hello world"`)
for tok := range lex.Tokens {
fmt.Println(tok)
}
}
Output: IDENT STRING ; EOF
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct {
Tokens chan Token // channel of scanned tokens
// contains filtered or unexported fields
}
Lexer holds the state of the scanner
Click to show internal directories.
Click to hide internal directories.