Skip to content

Commit

Permalink
feat: adds colon token lexing
Browse files Browse the repository at this point in the history
Signed-off-by: maxwellgithinji <[email protected]>
  • Loading branch information
maxwellgithinji committed Feb 5, 2024
1 parent 5c8ac0a commit 6ca18e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/lexer/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ func (l *Lexer) NextToken() token.Token {
case '}':
tok = newToken(token.RBRACE, l.ch)

case ':':
tok = newToken(token.COLON, l.ch)

case '"':
tok.Type = token.STRING
tok.Literal = l.readString()
Expand Down

0 comments on commit 6ca18e4

Please sign in to comment.