Enteee / plantuml-parser

Parse PlantUML with JavaScript or TypeScript
https://duckpond.ch/category/plantuml-parser
Apache License 2.0
136 stars 33 forks source link

Supporting entity and struct #102

Open alexshelkov opened 7 months ago

alexshelkov commented 7 months ago
@startuml db
title Database 

entity QuestionType {
}
@enduml

or


@startuml db
title Database 

struct QuestionType {
}
@enduml

So this variation of class diagram throws an error. I am wondering is it possible to support them?

Enteee commented 7 months ago

sure that would be perfectly possible to support. Do you want to create a pull request for this?

alexshelkov commented 7 months ago

Sorry not sure that I know the best approach for this

Enteee commented 6 months ago

@alexshelkov as far as I understood it, those are grouping types. So you probably just need to add the keywords "entity" and "struct" to the possible group types around here: https://github.com/Enteee/plantuml-parser/blob/master/src/plantuml.pegjs#L169

Maybe I would also add a few tests for it.