Closed anliec closed 4 years ago
Look like the parser, does not handle coma in type name.
Trying to parse:
@startuml abstract Car { + map<int, int> keyValueMap } @enduml
Will raise the following error:
Error: line: 3 column: 11: SyntaxError: Expected [ \t], [A-Za-z_*], or [^ ,\n\r\t(){}] but "," found. at PlantUmlToCode.generate (puml2code/src/index.js:86:15)
This parser was designed for JS and so does not handle this very C++ specific feature.
Make the parser match < and > in the same way it can match ( and ).
<
>
(
)
I will take a look into src/parser/plantuml.pegjs and try to fix this issue and open a PR
src/parser/plantuml.pegjs
Look like the parser, does not handle coma in type name.
Example
Trying to parse:
Will raise the following error:
Possible explanation
This parser was designed for JS and so does not handle this very C++ specific feature.
Possible solution
Make the parser match
<
and>
in the same way it can match(
and)
.I will take a look into
src/parser/plantuml.pegjs
and try to fix this issue and open a PR