-
Notifications
You must be signed in to change notification settings - Fork 1
Metas
Note
New in 0.19.0-beta
Metas are a way to use other (or old) functionnalities in Nougaro.
They’re used by adding @meta metaName or @meta metaName value at the beginning of a file or in an interactive shell.
Note that, instead of @, you can use any of those prefixes: #@, %@, @@, -@, $@.
Note
New in 0.20.0-beta
If enabled, this meta forces a break statement to append None to the list returned by the loop.
Note
New in 0.20.0-beta
If enabled, this meta forces a continue statement to append None to the list returned by the loop.
The legacyAbs meta lets you use the old syntax (in the prototype-1 version) for absolute value, which is |...|. However, this meta disables the bitwise or operation.
Example:
@meta legacyAbs
print(|-1|) # 1
var a = 12
print(|-a|) # 12
The nbspBetweenFrenchGuillemets meta requires you, if you use the french string quotes («»), to put a no-break space (or a narrow no-break space) after the « and before the ».
Example:
@meta nbspBetweenFrenchGuillemets
print(« hello, world ») /* hello, world
* note that the quotes aren’t regular spaces
*/
- Sets
__the_test_value__to the str value given in the meta value - If no value is given, it sets it to
None.