fix: some != -1 comparasion fixes

This commit is contained in:
TopchetoEU 2022-10-19 16:17:56 +03:00
parent 8a8712fb9d
commit 9aa0063e30

View File

@ -18,10 +18,10 @@ namespace ppc::comp::tree::ast::conv {
}; };
res["filename"] = loc.filename; res["filename"] = loc.filename;
if (loc.start != -1u) res["start"] = (float)loc.start; if (loc.start + 1) res["start"] = (float)loc.start;
if (loc.start != -1u) res["line"] = (float)loc.line; if (loc.start + 1) res["line"] = (float)loc.line;
if (loc.code_start != -1u) res["code_start"] = (float)loc.code_start; if (loc.code_start + 1) res["code_start"] = (float)loc.code_start;
if (loc.length != -1u) res["length"] = (float)loc.length; if (loc.length + 1) res["length"] = (float)loc.length;
return res; return res;
} }