feat(for loop): added property for loop length (#171)

This commit is contained in:
Ilya Puchka
2018-04-05 01:23:02 +01:00
committed by Kyle Fuller
parent 6b02fccf84
commit f457cddd3f
3 changed files with 8 additions and 0 deletions

View File

@@ -132,6 +132,7 @@ class ForNode : NodeType {
"last": index == (count - 1),
"counter": index + 1,
"counter0": index,
"length": count
]
return try context.push(dictionary: ["forloop": forContext]) {