This commit is contained in:
blueloveTH 2024-06-15 19:17:57 +08:00
parent 2093f6f10f
commit e50761364d
5 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ from typing import List, Dict
assert os.system("python prebuild.py") == 0
with open("include/pocketpy/opcodes.h", "rt", encoding='utf-8') as f:
with open("include/pocketpy/xmacros/opcodes.h", "rt", encoding='utf-8') as f:
OPCODES_TEXT = '\n' + f.read() + '\n'
class Header:

View File

@ -21,7 +21,7 @@ enum NameScope { NAME_LOCAL, NAME_GLOBAL, NAME_GLOBAL_UNKNOWN };
enum Opcode : uint8_t {
#define OPCODE(name) OP_##name,
#include "pocketpy/opcodes.h"
#include "pocketpy/xmacros/opcodes.h"
#undef OPCODE
};

View File

@ -102,6 +102,8 @@ void SMALLMAP_METHOD(clear)(SMALLMAP* self) {
#undef KV
#undef SMALLMAP
#undef SMALLMAP_METHOD
#undef CONCAT
#undef CONCAT_
#undef K
#undef V

View File

@ -11,7 +11,7 @@
const static char* OP_NAMES[] = {
#define OPCODE(name) #name,
#include "pocketpy/opcodes.h"
#include "pocketpy/xmacros/opcodes.h"
#undef OPCODE
};