new syntax to get items from collection: collection[index]. Supported collections are string, list and dict

This commit is contained in:
2024-05-24 22:51:01 +02:00
parent e5f63c3d9d
commit 03d4c192c2
9 changed files with 126 additions and 30 deletions
+8
View File
@@ -74,6 +74,14 @@ func (self *scanner) unreadChar() (err error) {
return
}
func (self *scanner) lastPos() (r, c int) {
if self.prev != nil {
r = self.prev.row
c = self.prev.col
}
return
}
func (self *scanner) Previous() *Token {
return self.prev
}