Fix #178 - single underscore

This commit is contained in:
Ganesh Viswanathan 2020-04-10 22:45:29 -05:00
commit f64fbb67b1
3 changed files with 10 additions and 1 deletions

View file

@ -655,7 +655,9 @@ proc getNimExpression*(nimState: NimState, expr: string, name = ""): string =
if i == clean.len or gen.nBl:
# Process identifier
if ident.nBl:
ident = nimState.getIdentifier(ident, nskConst)
# Issue #178
if ident != "_":
ident = nimState.getIdentifier(ident, nskConst)
if name.nBl and ident in nimState.constIdentifiers:
ident = ident & "." & name
result &= ident

View file

@ -194,6 +194,12 @@ struct JKL {
int **f1;
};
// Issue #178
typedef enum
{
SDLK_UNDERSCORE = '_'
} SDL_KeyCode;
#ifdef __cplusplus
}
#endif

View file

@ -227,3 +227,4 @@ cg.f2 = nil
doAssert BIT == 1
doAssert ca(nil) == 1
doAssert cc(nil) == 2
doAssert SDLK_UNDERSCORE == 95