NimScript: added buildOS and buildCPU constants
This commit is contained in:
parent
ae7fe5087f
commit
5298a72f34
3 changed files with 12 additions and 1 deletions
|
|
@ -616,6 +616,8 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
|
|||
of mCpuEndian: result = newIntNodeT(ord(CPU[targetCPU].endian), n)
|
||||
of mHostOS: result = newStrNodeT(toLowerAscii(platform.OS[targetOS].name), n)
|
||||
of mHostCPU: result = newStrNodeT(platform.CPU[targetCPU].name.toLowerAscii, n)
|
||||
of mBuildOS: result = newStrNodeT(toLowerAscii(platform.OS[platform.hostOS].name), n)
|
||||
of mBuildCPU: result = newStrNodeT(platform.CPU[platform.hostCPU].name.toLowerAscii, n)
|
||||
of mAppType: result = getAppType(n)
|
||||
of mNaN: result = newFloatNodeT(NaN, n)
|
||||
of mInf: result = newFloatNodeT(Inf, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue