Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Moatasem-Elsayed opened this issue Feb 19, 2024 · 0 comments

Comments

@Moatasem-Elsayed
Copy link

Description

  • Type: Bug
    Error: line: 1 column: 11: SyntaxError: Expected [ \t], [\n], or [\r\n] but "t" found.
    for cpp

Bug

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant