stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.33k stars 221 forks source link

Does it support C for-loop or swift for-loop syntax? #264

Closed diuming closed 5 years ago

diuming commented 5 years ago

Does it support C for-loop or swift for-loop syntax? thx!

C
for (i = 0; i < 10; i++) {
    for j = 0; j < 10; j++) {
        value = array[i*j]
    }
}

Swift
for i in 0..<10 {
    for j in 0..<10 {
         value = array[i*j]
    }
}
diuming commented 5 years ago

sorry! about that