diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-01 11:06:25 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-01 11:06:25 +0100 |
| commit | 4364174de7c2de38947f7108858aa47ffb3b296b (patch) | |
| tree | 64b1096bc7eb902df33d15af32a016f687e3fd8f /CompilerDriver | |
| parent | 686787e25c152b811816806d1a9aa38730b74bf3 (diff) | |
Logisim: Add new project for chip.
Cpp: remove support for /* */
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'CompilerDriver')
| -rw-r--r-- | CompilerDriver/cpp.cxx | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/CompilerDriver/cpp.cxx b/CompilerDriver/cpp.cxx index 0595b1c..d8d32bd 100644 --- a/CompilerDriver/cpp.cxx +++ b/CompilerDriver/cpp.cxx @@ -291,40 +291,12 @@ void cpp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) { while (std::getline(hdr_file, hdr_line)) { + // make cc, ccplus life easier if (hdr_line.find("//") != std::string::npos) { hdr_line.erase(hdr_line.find("//")); } - if (hdr_line.find("/*") != std::string::npos) - { - comment = true; - } - - if (comment) - { - /* - * first case - */ - if (hdr_line.find("*/") != std::string::npos) - { - if (hdr_line.find("/*") != std::string::npos) - { - hdr_line.erase(hdr_line.find("/*"), hdr_line.find("*/")); - comment = false; - } - else - { - comment = false; - } - - hdr_line.erase(hdr_line.find("*/"), strlen("*/")); - } - - if (comment) - continue; - } - if (hdr_line[0] == '#' && hdr_line.find("endif") != std::string::npos) { |
