Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd20feda59 | ||
|
db3879f7a5 |
@ -202,6 +202,7 @@ export class Struct {
|
|||||||
if (!method.isInherited) {
|
if (!method.isInherited) {
|
||||||
out += method.generateTypedef();
|
out += method.generateTypedef();
|
||||||
out += `extern ${method.generateDefinition()}`;
|
out += `extern ${method.generateDefinition()}`;
|
||||||
|
out += `extern ${method.generateDefinition('_unedited')}`;
|
||||||
out += method.generateNewMethodTest(this.#directParent, '', '');
|
out += method.generateNewMethodTest(this.#directParent, '', '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -260,6 +261,8 @@ export class Struct {
|
|||||||
if (!method.isInherited) {
|
if (!method.isInherited) {
|
||||||
init += `${INDENT}${method.getName()} = (${method.getType()}) ${toHex(method.address)};\n`;
|
init += `${INDENT}${method.getName()} = (${method.getType()}) ${toHex(method.address)};\n`;
|
||||||
declarations += method.generateDefinition();
|
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) {
|
if (info) {
|
||||||
const type = `${info.getType()} *`;
|
const type = `${info.getType()} *`;
|
||||||
out += `extern ${type}${info.getName()}_vtable_addr;\n`;
|
out += `extern ${type}${info.getName()}_vtable_addr;\n`;
|
||||||
|
out += `extern ${info.generateDefinition('_non_virtual')}`;
|
||||||
out += info.generateNewMethodTest(directParent, '*', '_vtable_addr');
|
out += info.generateNewMethodTest(directParent, '*', '_vtable_addr');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,6 +167,8 @@ export class VTable {
|
|||||||
const type = `${info.getType()} *`;
|
const type = `${info.getType()} *`;
|
||||||
init += `${INDENT}${info.getName()}_vtable_addr = (${type}) ${toHex(vtableAddress)};\n`;
|
init += `${INDENT}${info.getName()}_vtable_addr = (${type}) ${toHex(vtableAddress)};\n`;
|
||||||
declarations += `${type}${info.getName()}_vtable_addr;\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$"
|
syntax def "\.def$"
|
||||||
comment "//"
|
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
|
# 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
|
# 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
|
# Numbers
|
||||||
color yellow "0x[a-f0-9]+"
|
color yellow "0x[a-f0-9]+"
|
||||||
|
# Non-hex numbers
|
||||||
|
color red " [0-9][a-f0-9]+;"
|
||||||
|
|
||||||
# Comments
|
# Comments
|
||||||
color brightblue "//.*"
|
color brightblue "//.*"
|
||||||
|
|
||||||
|
# Whitespace.
|
||||||
|
color normal "[[:space:]]+"
|
||||||
# Trailing whitespace.
|
# Trailing whitespace.
|
||||||
color ,green "[[:space:]]+$"
|
color ,green "[[:space:]]+$"
|
||||||
|
Loading…
Reference in New Issue
Block a user