Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

Mask

Mask - Template language

< >

Mask is a template language created in 2012.

#716on PLDB 11Years Old 315Users
0Books 0Papers 306Repos

Markup | Template | HMVC


Example from Linguist:
// HTML Elements header { img .logo src='/images/~[currentLogo].png' alt=logo; h4 > 'Bar View' if (currentUser) { .account > a href='/acount' > 'Hello, ~[currentUser.username]' } } .view { ul { // Iteration for ((user, index) of users) { li.user data-id='~[user.id]' { // interpolation .name > '~[ user.username ]' // expression .count > '~[: user.level.toFixed(2) ]' // util /* Localization sample * lastActivity: "Am {0:dd. MM} war der letzte Eintrag" */ .date > '~[ L: "lastActivity", user.date]' } } } // Component :countdownComponent { input type = text > :dualbind value='number'; button x-signal='click: countdownStart' > 'Start'; h5 { '~[bind: number]' :animation x-slot='countdownStart' { @model > 'transition | scale(0) > scale(1) | 500ms' @next > 'background-color | red > blue | 2s linear' } } } } footer > :bazCompo { 'Component generated at ~[: $u.format($c.date, "HH-mm") ]' }

Language features

Feature Supported Token Example
MultiLine Comments /* */
/* A comment
*/
Comments
// A comment
Line Comments //
// A comment
Semantic Indentation X
mathlab.html · maskjs.html · euclidean-geometry.html

View source

- Build the next great programming language · Search · Day 209 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com