stencilproject / Stencil

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

Added support for brackets in boolean expressions #165

Closed ilyapuchka closed 5 years ago

ilyapuchka commented 6 years ago

Currently there is no way to alter operations precedence in boolean expression, so it can force users to use cascades of ifs. With this it should become simpler.

Expression in brackets is parsed recursively as special case of IfToken that represents sub-expression which is evaluated similar to variable token.

ilyapuchka commented 6 years ago

@AliSoftware better now?

djbe commented 6 years ago

Before I forget: This PR should document the changes in the docs.

ilyapuchka commented 6 years ago

@djbe comments addressed, can you look again?

ilyapuchka commented 5 years ago

@djbe @kylef @yonaskolb can we move this forward?

ilyapuchka commented 5 years ago

@djbe fixed docs, good catch with brackets vs parentheses 👍

djbe commented 5 years ago

Does this still need a rebase? (github says it needs an update)

ilyapuchka commented 5 years ago

@djbe I'll update and squash