mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 21:02:50 +00:00
403c6eea73
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.
28 lines
381 B
R
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
|