We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在这里的代码:
Piccolo/engine/source/meta_parser/parser/language_types/field.cpp
Line 11 in 65379de
或许可以考虑加在这里(codegen的时候去掉空格):
Piccolo/engine/source/meta_parser/parser/generator/reflection_generator.cpp
Line 94 in 65379de
Utils::replaceAll(array_useful_name, " ", ""); vector_define.set("vector_useful_name", array_useful_name);
The text was updated successfully, but these errors were encountered:
举个错误解析的例子,为什么会带空格
Sorry, something went wrong.
就是上面说的,std::vector<unsigned char>,因为对 vector 类型做了特殊处理,在parse field的阶段就去掉空格会导致codegen阶段的类型生成失去空格(即type从unsigned char变为了unsignedchar),从而解析失败。因此我想说可以考虑在codegen阶段去掉空格,改动方法如上。
std::vector<unsigned char>
可以
No branches or pull requests
在这里的代码:
Piccolo/engine/source/meta_parser/parser/language_types/field.cpp
Line 11 in 65379de
强行把空格去掉会导致带有空格的类型会反射生成失败(例如 std::vector 类型,它生成的反射文件的 type 会去掉空格,导致codegen的时候的static_cast会出现类型unsignedchar,无法解析而失败)
或许可以考虑加在这里(codegen的时候去掉空格):
Piccolo/engine/source/meta_parser/parser/generator/reflection_generator.cpp
Line 94 in 65379de
例如:
The text was updated successfully, but these errors were encountered: