BIG deep clean
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
C++ code info structs
|
||||
PIP - Platform Independent Primitives
|
||||
C++ code info structs
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "picodeinfo.h"
|
||||
|
||||
@@ -2,29 +2,29 @@
|
||||
* \brief C++ code info structs
|
||||
*/
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
C++ code info structs
|
||||
PIP - Platform Independent Primitives
|
||||
C++ code info structs
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PICODEINFO_H
|
||||
#define PICODEINFO_H
|
||||
|
||||
#include "pistring.h"
|
||||
#include "pistringlist.h"
|
||||
|
||||
class PIVariant;
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Module includes
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
PIP - Platform Independent Primitives
|
||||
Module includes
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PICODEMODULE_H
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,6 @@ private:
|
||||
int macros_iter, anon_num;
|
||||
bool with_includes;
|
||||
PIEvaluator evaluator;
|
||||
//PIVector<Entity * > tree;
|
||||
PISet<PIString> proc_files;
|
||||
PIString cur_file, main_file;
|
||||
PIStringList includes;
|
||||
|
||||
Reference in New Issue
Block a user