Mascara: Next Generation JavaScript compiler

Try it Download Buy About Documentation Blog Contact

Syntax help

ECMAScript syntax is described in this documentation using a special notation ("meta syntax").

[] brackets indicates that a syntax part is optional.

[]* brackets followed by a star indicates that a syntax part can appear zero or more times.

(a|b) means that one of the options should be chosen.

bold indicates a character or keyword which should be written literally.

italic indicates something which should be replaced with real code of your own choise.

As an example, this is the syntax for variable declarations:

Syntax definition [Help]
( var | const ) variablename [ : type ] [ = value ]
It declares that either var or const should be used. The type and value clauses are both optional.

X Try!
Mascara JavaScript Generated JavaScript

Translating...
Show compiler settings