Work on potantiel next preprocessor evolution for PlantUML
Blaise must be compatible with actual PlantUML preprocessor. It should provide new capabilities.
The following basic type are supported:
- boolean
- integer (with no limit, like in Python)
- double precision floating point
- String (with full unicode support)
- JSON Data
- Tuples using
<
and>
as delimiter - Zero based indexing array
- Dictionnary
A boolean can by either true
or false
.
!$my_var = true
You can use _
as separator for long number.
!$my_var = 3_000_000_000_000_000
!$my_var = 3.14159
String separator could be simple quote or double quote.
!$my_var1 = 'with simple quote'
!$my_var2 = """
This is a very
long string on several
lines"""
!$my_var = {
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 27,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
}
],
"children": [
"Catherine",
"Thomas",
"Trevor"
],
"spouse": null
}
A tuple is immutable.
!$my_var = <42, "Some String", {
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 27 } >
Elements of the array don't have to be the same type. Arrays are mutable.
!$my_array = ["Some string", "another string", 42]
In dictionnary, keys could be either String or Integer.
!$my_dict = ["key1": 3, "key2": 40, "key3": "foo"]