quakeforge/libs/video/renderer/vulkan/vkgen/vkstring.r
Bill Currie 403c6eea73 [vkgen] Recognize char * as a string
Ruamoko currently doesn't support `const`, so that's not relevant, but
recognizing `char *` (via a hack to work around what looks like a bug
with type aliasing) allows strings to be handled without having to use a
custom parser. Things are still a little clunky for custom parsers, but
this seems to be a good start.
2023-02-14 15:10:09 +09:00

28 lines
381 B
R

#include <string.h>
#include "vkfieldstring.h"
#include "vkstring.h"
#include "vkgen.h"
@implementation String
-(string) name
{
return "string";
}
-(FieldDef *)fielddef:(Struct *)strct field:(string)fname
{
return [StringField fielddef:nil struct:strct field:fname];
}
-(string) cexprType
{
return [self name] + "_type";
}
-(string) parseType
{
return "QFString";
}
@end