.experimental can now be used to enable specific features
This commit is contained in:
parent
8ce9e43434
commit
ee366f1746
18 changed files with 122 additions and 116 deletions
|
|
@ -103,13 +103,23 @@ type
|
|||
ideNone, ideSug, ideCon, ideDef, ideUse, ideDus, ideChk, ideMod,
|
||||
ideHighlight, ideOutline, ideKnown, ideMsg
|
||||
|
||||
Feature* = enum ## experimental features
|
||||
implicitDeref,
|
||||
dotOperators,
|
||||
callOperator,
|
||||
parallel,
|
||||
destructor
|
||||
|
||||
ConfigRef* = ref object ## eventually all global configuration should be moved here
|
||||
cppDefines*: HashSet[string]
|
||||
headerFile*: string
|
||||
features*: set[Feature]
|
||||
|
||||
const oldExperimentalFeatures* = {implicitDeref, dotOperators, callOperator, parallel}
|
||||
|
||||
proc newConfigRef*(): ConfigRef =
|
||||
result = ConfigRef(cppDefines: initSet[string](),
|
||||
headerFile: "")
|
||||
headerFile: "", features: {})
|
||||
|
||||
proc cppDefine*(c: ConfigRef; define: string) =
|
||||
c.cppDefines.incl define
|
||||
|
|
@ -146,8 +156,6 @@ var
|
|||
gListFullPaths*: bool
|
||||
gPreciseStack*: bool = false
|
||||
gNoNimblePath* = false
|
||||
gExperimentalMode*: bool
|
||||
newDestructors*: bool
|
||||
gDynlibOverrideAll*: bool
|
||||
useNimNamespace*: bool
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue