– Typee Documentation –

3 – Typee Language Description

3.8 – Empty Statements

Empty statements… How could a statement be empty? in Typee, empty statements are comments and newlines. They are statements, they are translated in targeted languages but they are not processed statements – while compound and simple ones are.

Their formal EBFN specification is:

<empty statement>      ::= <comment>  |  <NEWLINE>

<comment>              ::= '//' ((<any non newline char>)* | <line end>) |
                           '/*' <multi lines comment>

<multi lines comment>  ::= (<any non star char> | <NEWLINE>)*  |
                           '*' ('/' | <multi lines comment>)

<NEWLINE>              ::= '\n'  |  '\r'  |  '\f'

So, Typee comments are exactly the same as in C, C++ and Java. Python programmers will have to forget the ‘#‘ token, which gets another meaning in Typee (this is the hashing operator), as well as the multi-lines strings which are commonly used for documenting code in Python.

 
Next section formerly explains <declarations and assignments>.

< previous (3.7 statements blocks) | (3.9 declarations and assignments) next >