ast package full godoc
This commit is contained in:
parent
956044cfae
commit
fec3550702
7 changed files with 68 additions and 26 deletions
|
|
@ -19,7 +19,11 @@ package ast
|
|||
|
||||
import "fmt"
|
||||
|
||||
/* token_t is a tag that declares the type of the
|
||||
* datum contained in a token
|
||||
*/
|
||||
type Token_t int
|
||||
|
||||
const (
|
||||
LIST Token_t = iota
|
||||
STRING Token_t = iota
|
||||
|
|
@ -31,6 +35,9 @@ const (
|
|||
FALSE string = "F"
|
||||
)
|
||||
|
||||
/* Contains a parsed lexeme
|
||||
* and a pointer to the next parsed lexeme in the same scope
|
||||
*/
|
||||
type Token struct {
|
||||
Next *Token
|
||||
Tag Token_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue