mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-01 10:52:26 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 496112fade | |||
| 790e51a8e3 | |||
| 0972816049 | |||
| b9fe916bc0 | |||
| 12da7181ff | |||
| 834e578f9b |
@@ -257,6 +257,7 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
||||
// we dont check for "//", IPS checks for '/' only...
|
||||
if ((!quote && p[0] == '/')
|
||||
|| (!quote && p[0] == '#')) {
|
||||
--p; //eat up the comment char
|
||||
break;
|
||||
} else if (p[0] == '\"' || p[0] == '\'') {
|
||||
quote = (p[0] == quote) ? '\0' : p[0];
|
||||
@@ -267,6 +268,14 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
||||
++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 ;)
|
||||
std::string_view pp_str(sline_start, p);
|
||||
if (pp_str.size() > 0 && !parse_line(pp_str)) {
|
||||
|
||||
Reference in New Issue
Block a user