Split RGBLINK linkerscript parser functions into their own file

This commit is contained in:
Rangi42
2025-07-27 10:53:12 -04:00
parent f3cbfcecf4
commit a353637a90
15 changed files with 802 additions and 787 deletions

View File

@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include "asm/actions.hpp"
#include <stdio.h>

View File

@@ -595,7 +595,7 @@ static bool isMacroChar(char c) {
return c == '@' || c == '#' || c == '<' || (c >= '1' && c <= '9');
}
// forward declarations for readBracketedMacroArgNum
// Forward declarations for `readBracketedMacroArgNum`
static int peek();
static void shiftChar();
static int bumpChar();
@@ -795,7 +795,7 @@ int LexerState::peekCharAhead() {
return EOF;
}
// forward declarations for peek
// Forward declarations for `peek`
static std::shared_ptr<std::string> readInterpolation(size_t depth);
static int peek() {
@@ -1622,7 +1622,7 @@ static void readCharacter(std::string &str) {
// Lexer core
static Token yylex_SKIP_TO_ENDC(); // forward declaration for yylex_NORMAL
static Token yylex_SKIP_TO_ENDC(); // Forward declaration for `yylex_NORMAL`
// Must stay in sync with the `switch` in `yylex_NORMAL`!
static bool isGarbageCharacter(int c) {

View File

@@ -14,7 +14,7 @@
#include "diagnostics.hpp"
#include "extern/getopt.hpp"
#include "helpers.hpp"
#include "parser.hpp"
#include "parser.hpp" // Generated from parser.y
#include "version.hpp"
#include "asm/charmap.hpp"

View File

@@ -2719,7 +2719,7 @@ hl_ind_dec:
%%
/******************** Semantic actions ********************/
/******************** Error handler ********************/
void yy::parser::error(std::string const &str) {
::error("%s", str.c_str());