BIG deep clean

This commit is contained in:
2020-06-10 13:14:16 +03:00
parent f579718e0b
commit c59579d5d5
222 changed files with 2392 additions and 11600 deletions

View File

@@ -207,13 +207,6 @@ bool PICodeParser::parseFileContent(PIString & fc, bool main) {
if (c == '"' && !mlc && pc != '\'') {
if (i > 0) if (fc[i - 1] == '\\') continue;
cc = !cc;
/*if (cc) ccs = i;
if (!cc) {
ccmn = "$" + PIString::fromNumber(cchars.size());
cchars[ccmn] = fc.mid(ccs, i - ccs + 1);
fc.replace(ccs, i - ccs + 1, ccmn);
i = ccs - 1 + ccmn.size_s();
}*/
continue;
}
if (i > 0)
@@ -227,7 +220,6 @@ bool PICodeParser::parseFileContent(PIString & fc, bool main) {
if (fc.mid(i, 2) == "*/" && mlc) {mlc = false; fc.cutMid(mls, i - mls + 2); i = mls - 1; continue;}
if (fc.mid(i, 2) == "//" && !mlc) {ole = fc.find('\n', i); fc.cutMid(i, ole < 0 ? -1 : ole - i); --i; continue;}
}
//PICout(PICoutManipulators::DefaultControls) << fc;
pfc = procMacros(fc);
replaceMeta(pfc);
@@ -374,7 +366,7 @@ PICodeParser::Entity * PICodeParser::parseClassDeclaration(const PIString & fc)
Entity * e = new Entity();
e->meta = meta;
e->name = cur_namespace + cn;
e->type = typename_;//(is_class ? "class" : "struct");
e->type = typename_;
e->has_name = has_name;
e->parents = parents;
e->file = cur_file;
@@ -444,7 +436,7 @@ PIString PICodeParser::parseClass(Entity * parent, PIString & fc) {
parseMember(ce, tmp);
if (def) fc.takeRange("{", "}");
else fc.takeSymbol();
if (ps == fc.size_s()) {/*cur_namespace = prev_namespace;*/ fc.cutLeft(1);/*return false*/;}
if (ps == fc.size_s()) {fc.cutLeft(1);}
ps = fc.size_s();
}
cur_def_vis = prev_vis;
@@ -948,8 +940,8 @@ PIString PICodeParser::procMacros(PIString fc) {
ifcnt = 0;
nfc.clear();
} else {
/*if (!*/parseDirective(line.cutLeft(1).trim())/*)*/
;//return false; /// WARNING: now skip errors
parseDirective(line.cutLeft(1).trim());
//return false; /// WARNING: now skip errors
}
} else {
if (grab) nfc << line << "\n";
@@ -982,7 +974,6 @@ bool PICodeParser::parseDirective(PIString d) {
macros << Macro(mname, d.trim(), args);
} else { // define
d.trim();
//if (mname == d) d.clear();
defines << Define(mname, d);
evaluator.setVariable(mname, complexd_1);
}