Using Quote as Symbol wont compile
Closed this issue · 1 comments
When I turn off QuotedStrings and try to use " as a symbol, ParserGenApp generates the following lines which fail to compile:
self.tokenKindTab[@"""] = @(ACTION_TOKEN_KIND_QUOTE);
self.tokenKindNameTab[ACTION_TOKEN_KIND_QUOTE] = @""";
the lines should be (it just needs a special case for quotes):
self.tokenKindTab[@"""] = @(ACTION_TOKEN_KIND_QUOTE);
self.tokenKindNameTab[ACTION_TOKEN_KIND_QUOTE] = @""";
As a stopgap, I added a method to my version of PGTokenKindDescriptor:
-(NSString*)stringValue {
if ([_stringValue isEqualToString:@"""]) {
return @"\"";
}
return _stringValue;
}
(Note: I am still using 0.3.5, so please forgive me if this has already been fixed.)
Thanks! I believe I have fixed this in 23570f4
And tagged it as v0.3.7 https://github.com/itod/pegkit/releases/tag/v0.3.7