Factor out one shared enum FileStackNodeType

This commit is contained in:
Rangi42
2023-11-06 11:20:46 -05:00
committed by Eldred Habert
parent 02f9128d07
commit 7a1e052b58
3 changed files with 8 additions and 11 deletions

View File

@@ -11,11 +11,7 @@
#include "asm/lexer.h" #include "asm/lexer.h"
enum FileStackNodeType { #include "linkdefs.h"
NODE_REPT,
NODE_FILE,
NODE_MACRO,
};
struct FileStackNode { struct FileStackNode {
struct FileStackNode *parent; // Pointer to parent node, for error reporting struct FileStackNode *parent; // Pointer to parent node, for error reporting

View File

@@ -9,6 +9,7 @@
#include <stdio.h> #include <stdio.h>
#include "helpers.h" #include "helpers.h"
#include "linkdefs.h"
// Variables related to CLI options // Variables related to CLI options
extern bool isDmgMode; extern bool isDmgMode;
@@ -27,12 +28,6 @@ extern bool beVerbose;
extern bool isWRA0Mode; extern bool isWRA0Mode;
extern bool disablePadding; extern bool disablePadding;
enum FileStackNodeType {
NODE_REPT,
NODE_FILE,
NODE_MACRO,
};
struct FileStackNode { struct FileStackNode {
struct FileStackNode *parent; struct FileStackNode *parent;
// Line at which the parent context was exited; meaningless for the root level // Line at which the parent context was exited; meaningless for the root level

View File

@@ -75,6 +75,12 @@ enum SectionType {
SECTTYPE_INVALID SECTTYPE_INVALID
}; };
enum FileStackNodeType {
NODE_REPT,
NODE_FILE,
NODE_MACRO,
};
// Nont-`const` members may be patched in RGBLINK depending on CLI flags // Nont-`const` members may be patched in RGBLINK depending on CLI flags
extern struct SectionTypeInfo { extern struct SectionTypeInfo {
char const *const name; char const *const name;