Implemented an abstract syntax tree

This commit is contained in:
Eduard Urbach 2024-06-30 22:54:59 +02:00
parent 3b29d4cdee
commit 8453273d73
Signed by: eduard
GPG key ID: 49226B848C78F6C8
28 changed files with 422 additions and 315 deletions

View file

@ -6,9 +6,9 @@ import "fmt"
// The characters that make up an identifier are grouped into a single token.
// This makes parsing easier and allows us to do better syntax checks.
type Token struct {
Kind Kind
Position int
Bytes []byte
Position int
Kind Kind
}
// End returns the position after the token.