ast package full godoc

This commit is contained in:
Aidan 2020-07-18 14:40:35 -07:00
parent 956044cfae
commit fec3550702
No known key found for this signature in database
GPG key ID: 327711E983899316
7 changed files with 68 additions and 26 deletions

View file

@ -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