From 4364174de7c2de38947f7108858aa47ffb3b296b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 1 Jan 2024 11:06:25 +0100 Subject: Logisim: Add new project for chip. Cpp: remove support for /* */ Signed-off-by: Amlal El Mahrouss --- CompilerDriver/cpp.cxx | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'CompilerDriver') 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) { -- cgit v1.2.3