View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004383 | Composr | core | public | 2020-09-26 16:00 | 2020-09-26 16:07 |
Reporter | Chris Graham | Assigned To | |||
Severity | Feature-request | ||||
Status | non-assigned | Resolution | open | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0004383: Tempcode ELSE functionality | ||||
Description | Currently every Tempcode directive is self-contained. This is nice and simple, and reflects that Tempcode is implemented as a clean markup language, not a regular programming language. However, it does mean that: 1) There's a small performance loss calculating negated conditions 2) It's a bit more code 3) The Tempcode parse tree is bigger than needed (Tempcode parse tree size is a perf headache for us sometimes) 4) There'll be extra white-space in the outputted HTML For an IF directive, allow ELSEIF and ELSE directives to follow directly (with tolerance for white-space, which would be ignored)... {+START,IF,...}...{+END} {+START,ELSEIF,...}...{+END} {+START,ELSE}...{+END} For an IF_EMPTY or IF_NON_EMPTY directive, allow ELSE directives to follow directly (with tolerance for white-space, which would be ignored)... {+START,IF_EMPTY,...}...{+END} {+START,ELSE}...{+END} For an IF_PASSED or IF_NON_PASSED directive, allow ELSE directives to follow directly (with tolerance for white-space, which would be ignored)... {+START,IF_PASSED,...}...{+END} {+START,ELSE}...{+END} The Tempcode parser would need to be made smart enough to recognise these situations with look-ahead parsing. Alter all the default templates to make use of the new syntax. | ||||
Tags | Type: Performance | ||||
Time estimation (hours) | 18 | ||||
Sponsorship open | |||||
|
Or we could consider something like... {+START,IF,...} ... {+START,ELSEIF,...} .... {+START,ELSE} ... {+END} {+END} {+END} Or we could consider something like... {+START,IF,...} ... {+ELSEIF,...} ... {+ELSE} ... {+END} I might actually like the last syntax here. It's simpler, and also easier to parse. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-09-26 16:00 | Chris Graham | New Issue | |
2020-09-26 16:00 | Chris Graham | Tag Attached: Type: Performance | |
2020-09-26 16:06 | Chris Graham | Note Added: 0006710 | |
2020-09-26 16:07 | Chris Graham | Description Updated | View Revisions |