jupe / puml2code

PlantUML code generator
MIT License
105 stars 22 forks source link

Error: line: 1 column: 11: SyntaxError: Expected [ \t], [\n], or [\r\n] but "t" found #127

Open Moatasem-Elsayed opened 9 months ago

Moatasem-Elsayed commented 9 months ago

Description

puml2code version

0.1.0

plantuml file that reproduce issue puml2code -i simple.puml -l cpp @startuml test

class FileHandler { -std::string m_filepath; +FileHandler(std::string filepath); ~FileHandler(); +std::string read(); +bool isfileActive(); } note right:intarct with sensor file

class Temperature #YellowGreen{

+Temperature(); ~Temperature(); +bool enable() override; +bool disable() override; +bool isactive() override; +double readvalue() override;

-bool m_activation; -std::unique_ptr m_filehandler; -double m_lastValue; }

interface Isensor #AliceBlue { Isensor() = default; {abstract} ~ Isensor() = default; {abstract} bool enable() = 0; {abstract} bool disable() = 0; {abstract} bool isactive() = 0; {abstract} T readvalue() = 0; } class Server #SeaGreen { uint16_t port; std::string ip; std::thread t; bool start_thread = false; int serverSocket = 0;

+start():bool
+stop():bool
+reload():bool
+add_endpoint(callback)

} note left: socket->bind->listen->accept class Manager #red { -server:Server -temp:Temperature +mainloop() }

Temperature -up-|> Isensor Temperature -right- FileHandler Manager -right- Temperature Manager -down- Server

@enduml


**Actual Behavior**

Error: line: 1 column: 11: SyntaxError: Expected [ \t], [\n], or [\r\n] but "t" found.
    at PlantUmlToCode.generate (/home/moatsem/.nvm/versions/node/v18.15.0/lib/node_modules/puml2code/src/index.js:86:15)
    at async execute (/home/moatsem/.nvm/versions/node/v18.15.0/lib/node_modules/puml2code/src/cli.js:53:20)
moatsem@moatsem-IdeaPad-Gaming-3-15IAH7:~/temppoky/src/project$ puml2code -V