PLDB
Languages Features Calendar CSV Lists Blog About Donate Add Language
GitHub icon

Closure Templates

< >

Closure Templates is a template language created in 2009.

#440on PLDB 14Years Old 1.3kUsers
0Books 0Papers 424kRepos

A client- and server-side templating system that helps you dynamically build reusable HTML and UI elements


Example from the web:
/** * Says hello to the world. */ {template .helloWorld} Hello world! {/template}
Example from Linguist:
{namespace Exmaple} /** * Example */ {template .foo} {@param count: string} {@param? name: int} {if isNonnull($name)} <h1>{$name}</h1> {/if} <div class="content"> {switch count} {case 0} {call Empty.view} {param count: $count /} {/call} {default} <h2>Wow, so many!</h2> {/switch} </div> {/template}

Language features

Feature Supported Token Example
Comments
/* A comment
*/
MultiLine Comments /* */
/* A comment
*/
Semantic Indentation X
dogescript.html · closure-templates.html · sourcepawn.html

View source

PLDB - Build the next great programming language · v2023 · Day 153 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com