MSON Named Types - parsed as variable
klokane opened this issue · 5 comments
klokane commented
Following MSON Named type
## *User (object)*
- m1
is parsed as variable:
...
"element": "dataStructure",
"name": {
"literal": "User (object)",
"variable": true
},
...
according to discussion with @zdne it is bug
zdne commented
Yes, this is actually incorrect and meaningless syntax. The parser should ignore any variable settings in this case and report the superfluous asterisks.
zdne commented
@pksunkara that would work, however, if possible and to too complex it may be better to nudge user that he probably wanted to say something else. ...
pksunkara commented
Expected is:
...
"element": "dataStructure",
"name": {
"literal": "User (object)",
"variable": false
},
...
pksunkara commented
Actually, the following MSON is valid:
## *User*
- m1
and it should give the following refract:
"name": {
"literal": "User",
"variable": true
},
The issue with the given blueprint is that (
and other reserved characters are not allowed in named type names. Therefore we should provide a warning along with setting variable: true
.