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:
|
if i == clean.len or gen.nBl:
|
||||||
# Process identifier
|
# Process identifier
|
||||||
if ident.nBl:
|
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:
|
if name.nBl and ident in nimState.constIdentifiers:
|
||||||
ident = ident & "." & name
|
ident = ident & "." & name
|
||||||
result &= ident
|
result &= ident
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,12 @@ struct JKL {
|
||||||
int **f1;
|
int **f1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Issue #178
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDLK_UNDERSCORE = '_'
|
||||||
|
} SDL_KeyCode;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -227,3 +227,4 @@ cg.f2 = nil
|
||||||
doAssert BIT == 1
|
doAssert BIT == 1
|
||||||
doAssert ca(nil) == 1
|
doAssert ca(nil) == 1
|
||||||
doAssert cc(nil) == 2
|
doAssert cc(nil) == 2
|
||||||
|
doAssert SDLK_UNDERSCORE == 95
|
||||||
Loading…
Add table
Add a link
Reference in a new issue