Switch cases are parsed now

This commit is contained in:
2022-09-03 15:38:57 -04:00
parent bcd44828dc
commit 7bde082f36
4 changed files with 36 additions and 14 deletions

View File

@@ -75,6 +75,14 @@ type Token struct {
value any
}
// NewToken provides a way for a new token to be created by other modules for
// comparison purposes.
func NewToken (kind TokenKind, value any) (token Token) {
token.kind = kind
token.value = value
return
}
// Kind returns the semantic role of the token.
func (token Token) Kind () (kind TokenKind) {
return token.kind