mirror of
https://github.com/bearlanguageorg/bear.git
synced 2026-08-26 16:07:01 +00:00
more
This commit is contained in:
+7
-1
@@ -13,6 +13,8 @@ pub enum TokKind {
|
||||
lbracket
|
||||
rbracket
|
||||
comma
|
||||
dot
|
||||
colon
|
||||
plus
|
||||
minus
|
||||
star
|
||||
@@ -154,12 +156,16 @@ fn (mut l Lexer) next() !Tok {
|
||||
}
|
||||
return Tok{ kind: .dotdot, lit: '..', line: line }
|
||||
}
|
||||
return error('unexpected character "." at line ${line}')
|
||||
return Tok{ kind: .dot, lit: '.', line: line }
|
||||
}
|
||||
`,` {
|
||||
l.advance()
|
||||
return Tok{ kind: .comma, lit: ',', line: line }
|
||||
}
|
||||
`:` {
|
||||
l.advance()
|
||||
return Tok{ kind: .colon, lit: ':', line: line }
|
||||
}
|
||||
`+` {
|
||||
l.advance()
|
||||
return Tok{ kind: .plus, lit: '+', line: line }
|
||||
|
||||
Reference in New Issue
Block a user