Added new tokens to test case

This commit is contained in:
Sasha Koshka 2022-08-25 00:01:28 -04:00
parent 8175a9d4c5
commit b536b01eeb
3 changed files with 13 additions and 3 deletions

View File

@ -153,9 +153,13 @@ func TestTokenizeAll (test *testing.T) {
quickToken(1, TokenKindExclamation, nil),
quickToken(1, TokenKindPercent, nil),
quickToken(1, TokenKindTilde, nil),
quickToken(1, TokenKindEqualTo, nil),
quickToken(1, TokenKindNotEqualTo, nil),
quickToken(1, TokenKindLessThan, nil),
quickToken(1, TokenKindLessThanEqualTo, nil),
quickToken(2, TokenKindLShift, nil),
quickToken(1, TokenKindGreaterThan, nil),
quickToken(1, TokenKindGreaterThanEqualTo, nil),
quickToken(2, TokenKindRShift, nil),
quickToken(1, TokenKindBinaryOr, nil),
quickToken(2, TokenKindLogicalOr, nil),

View File

@ -45,8 +45,6 @@ const (
TokenKindPercent
TokenKindTilde
// TODO: add equal to, less than or equal to, greater than or equal to,
// not equal to
TokenKindEqualTo
TokenKindNotEqualTo
TokenKindLessThanEqualTo
@ -179,12 +177,20 @@ func (tokenKind TokenKind) Describe () (description string) {
description = "Percent"
case TokenKindTilde:
description = "Tilde"
case TokenKindEqualTo:
description = "EqualTo"
case TokenKindNotEqualTo:
description = "NotEqualTo"
case TokenKindLessThan:
description = "LessThan"
case TokenKindLessThanEqualTo:
description = "LessThanEqualTo"
case TokenKindLShift:
description = "LShift"
case TokenKindGreaterThan:
description = "GreaterThan"
case TokenKindGreaterThanEqualTo:
description = "GreaterThanEqualTo"
case TokenKindRShift:
description = "RShift"
case TokenKindBinaryOr:

View File

@ -1,3 +1,3 @@
:arf
--- rw -> -349820394 932748397 239485.37520 "hello world!\n" 'E' helloWorld:.,..[]{}
+ - ++ -- * / @ ! % ~ < << > >> | || & &&
+ - ++ -- * / @ ! % ~ = != < <= << > => >> | || & &&