basic for loop + examples -> era3
This commit is contained in:
parent
dd7af341a3
commit
0bc8b2ef55
24 changed files with 222 additions and 201 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue