mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Rename a few variables
This commit is contained in:
@@ -97,7 +97,7 @@ struct LexerState {
|
|||||||
|
|
||||||
void setAsCurrentState();
|
void setAsCurrentState();
|
||||||
bool setFileAsNextState(std::string const &filePath, bool updateStateNow);
|
bool setFileAsNextState(std::string const &filePath, bool updateStateNow);
|
||||||
void setViewAsNextState(char const *filePath, char const *buf, size_t size, uint32_t lineNo_);
|
void setViewAsNextState(char const *name, char const *buf, size_t size, uint32_t lineNo_);
|
||||||
|
|
||||||
void clear(uint32_t lineNo_);
|
void clear(uint32_t lineNo_);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -450,9 +450,9 @@ bool LexerState::setFileAsNextState(std::string const &filePath, bool updateStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LexerState::setViewAsNextState(
|
void LexerState::setViewAsNextState(
|
||||||
char const *filePath, char const *buf, size_t size, uint32_t lineNo_
|
char const *name, char const *buf, size_t size, uint32_t lineNo_
|
||||||
) {
|
) {
|
||||||
path = filePath; // Used to report read errors in `peekInternal`
|
path = name; // Used to report read errors in `peekInternal`
|
||||||
content = ViewedLexerState{.ptr = buf, .size = size, .offset = 0};
|
content = ViewedLexerState{.ptr = buf, .size = size, .offset = 0};
|
||||||
clear(lineNo_);
|
clear(lineNo_);
|
||||||
lexerStateEOL = this;
|
lexerStateEOL = this;
|
||||||
@@ -1498,9 +1498,8 @@ static void appendStringLiteral(std::string &yylval, bool raw) {
|
|||||||
// We'll be exiting the string scope, so re-enable expansions
|
// We'll be exiting the string scope, so re-enable expansions
|
||||||
// (Not interpolations, since they're handled by the function itself...)
|
// (Not interpolations, since they're handled by the function itself...)
|
||||||
lexerState->disableMacroArgs = false;
|
lexerState->disableMacroArgs = false;
|
||||||
auto str = readInterpolation(0);
|
if (auto interpolation = readInterpolation(0); interpolation) {
|
||||||
if (str) {
|
appendEscapedSubstring(yylval, *interpolation);
|
||||||
appendEscapedSubstring(yylval, *str);
|
|
||||||
}
|
}
|
||||||
lexerState->disableMacroArgs = true;
|
lexerState->disableMacroArgs = true;
|
||||||
continue; // Do not copy an additional character
|
continue; // Do not copy an additional character
|
||||||
|
|||||||
@@ -776,7 +776,7 @@ int main(int argc, char *argv[]) {
|
|||||||
fprintf(stderr, "\tTrim the last %" PRIu64 " tiles\n", options.trim);
|
fprintf(stderr, "\tTrim the last %" PRIu64 " tiles\n", options.trim);
|
||||||
fprintf(stderr, "\tMaximum %" PRIu8 " palettes\n", options.nbPalettes);
|
fprintf(stderr, "\tMaximum %" PRIu8 " palettes\n", options.nbPalettes);
|
||||||
fprintf(stderr, "\tPalettes contain %" PRIu8 " colors\n", options.nbColorsPerPal);
|
fprintf(stderr, "\tPalettes contain %" PRIu8 " colors\n", options.nbColorsPerPal);
|
||||||
fprintf(stderr, "\t%s palette spec\n", []() {
|
fprintf(stderr, "\t%s palette spec\n", [] {
|
||||||
switch (options.palSpecType) {
|
switch (options.palSpecType) {
|
||||||
case Options::NO_SPEC:
|
case Options::NO_SPEC:
|
||||||
return "No";
|
return "No";
|
||||||
|
|||||||
Reference in New Issue
Block a user