mirror of
https://github.com/Smaug123/WoofWare.PrattParser
synced 2025-10-05 09:28:41 +00:00
Add array indexing
This commit is contained in:
@@ -28,6 +28,9 @@ module Lexer =
|
||||
|
||||
yield Token.standalone TokenType.ConstInt startI (i - startI)
|
||||
| _, ' ' -> i <- i + 1
|
||||
| _, '.' when i < s.Length - 1 && s.[i + 1] = '[' ->
|
||||
yield Token.standalone TokenType.ArrayIndex i 2
|
||||
i <- i + 2
|
||||
| _, 'i' when i < s.Length - 1 && s.[i + 1] = 'f' ->
|
||||
yield Token.standalone TokenType.If i 2
|
||||
i <- i + 2
|
||||
|
Reference in New Issue
Block a user