Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd20feda59 | ||
|
db3879f7a5 |
@ -202,6 +202,7 @@ export class Struct {
|
||||
if (!method.isInherited) {
|
||||
out += method.generateTypedef();
|
||||
out += `extern ${method.generateDefinition()}`;
|
||||
out += `extern ${method.generateDefinition('_unedited')}`;
|
||||
out += method.generateNewMethodTest(this.#directParent, '', '');
|
||||
}
|
||||
}
|
||||
@ -260,6 +261,8 @@ export class Struct {
|
||||
if (!method.isInherited) {
|
||||
init += `${INDENT}${method.getName()} = (${method.getType()}) ${toHex(method.address)};\n`;
|
||||
declarations += method.generateDefinition();
|
||||
init += `${INDENT}${method.getName()}_unedited = (${method.getType()}) ${toHex(method.address)};\n`;
|
||||
declarations += method.generateDefinition('_unedited');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ export class VTable {
|
||||
if (info) {
|
||||
const type = `${info.getType()} *`;
|
||||
out += `extern ${type}${info.getName()}_vtable_addr;\n`;
|
||||
out += `extern ${info.generateDefinition('_non_virtual')}`;
|
||||
out += info.generateNewMethodTest(directParent, '*', '_vtable_addr');
|
||||
}
|
||||
}
|
||||
@ -166,6 +167,8 @@ export class VTable {
|
||||
const type = `${info.getType()} *`;
|
||||
init += `${INDENT}${info.getName()}_vtable_addr = (${type}) ${toHex(vtableAddress)};\n`;
|
||||
declarations += `${type}${info.getName()}_vtable_addr;\n`;
|
||||
init += `${INDENT}${info.getName()}_non_virtual = *${info.getName()}_vtable_addr;\n`;
|
||||
declarations += info.generateDefinition('_non_virtual');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,34 @@
|
||||
syntax def "\.def$"
|
||||
comment "//"
|
||||
|
||||
# Mistakes
|
||||
# Missing semicolon
|
||||
color red "[^;]$"
|
||||
# Missing type
|
||||
color red "^(((static|virtual)-)?method|property|static-property(-array)?) [a-zA-Z_][a-zA-Z0-9_]* ?(\(|=)"
|
||||
# Missing prefix
|
||||
color red "^[^ ]+"
|
||||
# Missing vtable
|
||||
color red "^(vtable(-size|-destructor-offset))? .+$"
|
||||
|
||||
# Reset
|
||||
color normal "(\(|\))"
|
||||
|
||||
# Commands
|
||||
color magenta "\<(extends|size|vtable(-size|-destructor-offset)?|property|static-property|((static|virtual)-)?method|constructor)\>"
|
||||
color magenta "^(extends|size|vtable(-size|-destructor-offset)?|property|static-property|((static|virtual)-)?method|constructor)\>"
|
||||
|
||||
# Types
|
||||
color green "\<(char|uchar|short|ushort|int|uint|float|bool|void|std::(string|vector|map))\>"
|
||||
color green "\<((u?(char|short|int))|float|bool|void|std::(string|vector|map))\>"
|
||||
|
||||
# Numbers
|
||||
color yellow "0x[a-f0-9]+"
|
||||
# Non-hex numbers
|
||||
color red " [0-9][a-f0-9]+;"
|
||||
|
||||
# Comments
|
||||
color brightblue "//.*"
|
||||
|
||||
# Whitespace.
|
||||
color normal "[[:space:]]+"
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
Loading…
Reference in New Issue
Block a user