basic for loop + examples -> era3

This commit is contained in:
Neemek 2026-07-13 10:01:13 +02:00
parent dd7af341a3
commit 0bc8b2ef55
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
24 changed files with 222 additions and 201 deletions

View file

@ -57,6 +57,8 @@ const (
TokenElse
TokenImport
TokenType
TokenFor
TokenIn
TokenComma
TokenDot
@ -178,6 +180,10 @@ func (t TokenKind) String() string {
return "newline"
case TokenType:
return "type"
case TokenFor:
return "for"
case TokenIn:
return "in"
}
panic("UNDEFINED TOKENTYPE STRING CONVERSION")
@ -196,6 +202,8 @@ var Keywords = map[string]TokenKind{
"while": TokenWhile,
"breakpoint": TokenBreakpoint,
"type": TokenType,
"for": TokenFor,
"in": TokenIn,
}
type Lexer struct {