Loop labels
This commit is contained in:
committed by
David Jennes
parent
a7448b74cf
commit
91df84b1a5
@@ -54,8 +54,13 @@ public class TokenParser {
|
||||
return nodes
|
||||
}
|
||||
|
||||
if let tag = token.components.first {
|
||||
if var tag = token.components.first {
|
||||
do {
|
||||
// special case for labeled tags (such as for loops)
|
||||
if tag.hasSuffix(":") && token.components.count >= 2 {
|
||||
tag = token.components[1]
|
||||
}
|
||||
|
||||
let parser = try environment.findTag(name: tag)
|
||||
let node = try parser(self, token)
|
||||
nodes.append(node)
|
||||
|
||||
Reference in New Issue
Block a user