Fix #178 - single underscore
This commit is contained in:
parent
f5dd89904d
commit
f64fbb67b1
3 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -194,6 +194,12 @@ struct JKL {
|
|||
int **f1;
|
||||
};
|
||||
|
||||
// Issue #178
|
||||
typedef enum
|
||||
{
|
||||
SDLK_UNDERSCORE = '_'
|
||||
} SDL_KeyCode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -227,3 +227,4 @@ cg.f2 = nil
|
|||
doAssert BIT == 1
|
||||
doAssert ca(nil) == 1
|
||||
doAssert cc(nil) == 2
|
||||
doAssert SDLK_UNDERSCORE == 95
|
||||
Loading…
Add table
Add a link
Reference in a new issue