bafolts / plantcode

Provides a javascript utility to generate code in various languages given a plantuml class diagram.

Home Page:https://segmentationfaults.com/plantcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class relations not fully supported

arwenvaughan opened this issue · comments

It appears some less commonly used class relationship syntax is not fully supported and returns an error of "Error parsing input file: ". I don't know node.js well but it appears the error object does not display a detailed error message about the problem that was thrown in the parser routine. Should more verbose error messaging be concatenated to the right of the colon? Onc example case is the use of -down-, -up-, -left-, and -right- in relationship text...like...

class Dwelling {
+Int Windows()
+void LockTheDoor()
}
class Apartment
Dwelling <|-down- Apartment: Inheritance

This is a good addition. Since the PlantUML language is lacking a real grammar of the language we will just have to guess and add what we find is missing. The better error messages will help us track down what is missing as we go. If you find more syntax missing lets make separate issues for them. We will most likely run into a few since I initially just pieced together as much as I could find from examples when I wrote the tool.

Will add support for -up-, -down-, -right-, -left- in the extension.

https://github.com/bafolts/plantuml-code-generator/blob/master/tests/car.pegjs#L36-L39

Support added for directional descriptions inside arrows added.