mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-02 11:00:41 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a5855f981f | |||
| 567dc84292 | |||
| f4019bf83d | |||
| ca3de4a41c | |||
| 996f1902c5 | |||
| 546574e71c |
@@ -257,6 +257,7 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
|||||||
// we dont check for "//", IPS checks for '/' only...
|
// we dont check for "//", IPS checks for '/' only...
|
||||||
if ((!quote && p[0] == '/')
|
if ((!quote && p[0] == '/')
|
||||||
|| (!quote && p[0] == '#')) {
|
|| (!quote && p[0] == '#')) {
|
||||||
|
--p; //eat up the comment char
|
||||||
break;
|
break;
|
||||||
} else if (p[0] == '\"' || p[0] == '\'') {
|
} else if (p[0] == '\"' || p[0] == '\'') {
|
||||||
quote = (p[0] == quote) ? '\0' : p[0];
|
quote = (p[0] == quote) ? '\0' : p[0];
|
||||||
@@ -267,6 +268,14 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
|||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// remove trailing; look at the char before, i.e
|
||||||
|
// <aa >
|
||||||
|
// <aa -.>
|
||||||
|
// <aa-.>
|
||||||
|
// <a-.>
|
||||||
|
// <aa>
|
||||||
|
for (; p + 1 > sline.cbegin() && std::isspace(p[-1]); --p)
|
||||||
|
;
|
||||||
// now we have the preprocessed string ;)
|
// now we have the preprocessed string ;)
|
||||||
std::string_view pp_str(sline_start, p);
|
std::string_view pp_str(sline_start, p);
|
||||||
if (pp_str.size() > 0 && !parse_line(pp_str)) {
|
if (pp_str.size() > 0 && !parse_line(pp_str)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user