CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
This commit is contained in:
parent
7bce1f8578
commit
a9b62de895
58 changed files with 142 additions and 143 deletions
|
|
@ -17,58 +17,58 @@ type
|
|||
TSpecialWord* = enum
|
||||
wInvalid = "",
|
||||
wAddr = "addr", wAnd = "and", wAs = "as", wAsm = "asm",
|
||||
wBind = "bind", wBlock = "block", wBreak = "break", wCase = "case", wCast = "cast",
|
||||
wConcept = "concept", wConst = "const", wContinue = "continue", wConverter = "converter",
|
||||
wBind = "bind", wBlock = "block", wBreak = "break", wCase = "case", wCast = "cast",
|
||||
wConcept = "concept", wConst = "const", wContinue = "continue", wConverter = "converter",
|
||||
wDefer = "defer", wDiscard = "discard", wDistinct = "distinct", wDiv = "div", wDo = "do",
|
||||
wElif = "elif", wElse = "else", wEnd = "end", wEnum = "enum", wExcept = "except",
|
||||
wExport = "export", wFinally = "finally", wFor = "for", wFrom = "from", wFunc = "func",
|
||||
wIf = "if", wImport = "import", wIn = "in", wInclude = "include", wInterface = "interface",
|
||||
wElif = "elif", wElse = "else", wEnd = "end", wEnum = "enum", wExcept = "except",
|
||||
wExport = "export", wFinally = "finally", wFor = "for", wFrom = "from", wFunc = "func",
|
||||
wIf = "if", wImport = "import", wIn = "in", wInclude = "include", wInterface = "interface",
|
||||
wIs = "is", wIsnot = "isnot", wIterator = "iterator", wLet = "let", wMacro = "macro",
|
||||
wMethod = "method", wMixin = "mixin", wMod = "mod", wNil = "nil", wNot = "not", wNotin = "notin",
|
||||
wObject = "object", wOf = "of", wOr = "or", wOut = "out", wProc = "proc", wPtr = "ptr",
|
||||
wRaise = "raise", wRef = "ref", wReturn = "return", wShl = "shl", wShr = "shr", wStatic = "static",
|
||||
wTemplate = "template", wTry = "try", wTuple = "tuple", wType = "type", wUsing = "using",
|
||||
wMethod = "method", wMixin = "mixin", wMod = "mod", wNil = "nil", wNot = "not", wNotin = "notin",
|
||||
wObject = "object", wOf = "of", wOr = "or", wOut = "out", wProc = "proc", wPtr = "ptr",
|
||||
wRaise = "raise", wRef = "ref", wReturn = "return", wShl = "shl", wShr = "shr", wStatic = "static",
|
||||
wTemplate = "template", wTry = "try", wTuple = "tuple", wType = "type", wUsing = "using",
|
||||
wVar = "var", wWhen = "when", wWhile = "while", wXor = "xor", wYield = "yield",
|
||||
|
||||
wColon = ":", wColonColon = "::", wEquals = "=", wDot = ".", wDotDot = "..",
|
||||
wStar = "*", wMinus = "-",
|
||||
wMagic = "magic", wThread = "thread", wFinal = "final", wProfiler = "profiler",
|
||||
wMagic = "magic", wThread = "thread", wFinal = "final", wProfiler = "profiler",
|
||||
wMemTracker = "memtracker", wObjChecks = "objchecks",
|
||||
wIntDefine = "intdefine", wStrDefine = "strdefine", wBoolDefine = "booldefine",
|
||||
wIntDefine = "intdefine", wStrDefine = "strdefine", wBoolDefine = "booldefine",
|
||||
wCursor = "cursor", wNoalias = "noalias",
|
||||
|
||||
wImmediate = "immediate", wConstructor = "constructor", wDestructor = "destructor",
|
||||
wImmediate = "immediate", wConstructor = "constructor", wDestructor = "destructor",
|
||||
wDelegator = "delegator", wOverride = "override", wImportCpp = "importcpp",
|
||||
wCppNonPod = "cppNonPod",
|
||||
wCppNonPod = "cppNonPod",
|
||||
wImportObjC = "importobjc", wImportCompilerProc = "importcompilerproc",
|
||||
wImportc = "importc", wImportJs = "importjs", wExportc = "exportc", wExportCpp = "exportcpp",
|
||||
wImportc = "importc", wImportJs = "importjs", wExportc = "exportc", wExportCpp = "exportcpp",
|
||||
wExportNims = "exportnims",
|
||||
wIncompleteStruct = "incompleteStruct", # deprecated
|
||||
wCompleteStruct = "completeStruct", wRequiresInit = "requiresInit", wAlign = "align",
|
||||
wNodecl = "nodecl", wPure = "pure", wSideEffect = "sideEffect", wHeader = "header",
|
||||
wNoSideEffect = "noSideEffect", wGcSafe = "gcsafe", wNoreturn = "noreturn",
|
||||
wNosinks = "nosinks", wMerge = "merge", wLib = "lib", wDynlib = "dynlib",
|
||||
wCompilerProc = "compilerproc", wCore = "core", wProcVar = "procvar",
|
||||
wBase = "base", wUsed = "used", wFatal = "fatal", wError = "error", wWarning = "warning",
|
||||
wCompilerProc = "compilerproc", wCore = "core", wProcVar = "procvar",
|
||||
wBase = "base", wUsed = "used", wFatal = "fatal", wError = "error", wWarning = "warning",
|
||||
wHint = "hint",
|
||||
wWarningAsError = "warningAsError",
|
||||
wHintAsError = "hintAsError",
|
||||
wLine = "line", wPush = "push",
|
||||
wPop = "pop", wDefine = "define", wUndef = "undef", wLineDir = "lineDir",
|
||||
wPop = "pop", wDefine = "define", wUndef = "undef", wLineDir = "lineDir",
|
||||
wStackTrace = "stackTrace", wLineTrace = "lineTrace", wLink = "link", wCompile = "compile",
|
||||
wLinksys = "linksys", wDeprecated = "deprecated", wVarargs = "varargs", wCallconv = "callconv",
|
||||
wDebugger = "debugger", wNimcall = "nimcall", wStdcall = "stdcall", wCdecl = "cdecl",
|
||||
wLinksys = "linksys", wDeprecated = "deprecated", wVarargs = "varargs", wCallconv = "callconv",
|
||||
wDebugger = "debugger", wNimcall = "nimcall", wStdcall = "stdcall", wCdecl = "cdecl",
|
||||
wSafecall = "safecall", wSyscall = "syscall", wInline = "inline", wNoInline = "noinline",
|
||||
wFastcall = "fastcall", wThiscall = "thiscall", wClosure = "closure", wNoconv = "noconv",
|
||||
wOn = "on", wOff = "off", wChecks = "checks", wRangeChecks = "rangeChecks",
|
||||
wOn = "on", wOff = "off", wChecks = "checks", wRangeChecks = "rangeChecks",
|
||||
wBoundChecks = "boundChecks", wOverflowChecks = "overflowChecks", wNilChecks = "nilChecks",
|
||||
wFloatChecks = "floatChecks", wNanChecks = "nanChecks", wInfChecks = "infChecks",
|
||||
wFloatChecks = "floatChecks", wNanChecks = "nanChecks", wInfChecks = "infChecks",
|
||||
wStyleChecks = "styleChecks", wStaticBoundchecks = "staticBoundChecks",
|
||||
wNonReloadable = "nonReloadable", wExecuteOnReload = "executeOnReload",
|
||||
|
||||
wAssertions = "assertions", wPatterns = "patterns", wTrMacros = "trmacros",
|
||||
wAssertions = "assertions", wPatterns = "patterns", wTrMacros = "trmacros",
|
||||
wSinkInference = "sinkInference", wWarnings = "warnings",
|
||||
wHints = "hints", wOptimization = "optimization", wRaises = "raises",
|
||||
wHints = "hints", wOptimization = "optimization", wRaises = "raises",
|
||||
wWrites = "writes", wReads = "reads", wSize = "size", wEffects = "effects", wTags = "tags",
|
||||
wRequires = "requires", wEnsures = "ensures", wInvariant = "invariant",
|
||||
wAssume = "assume", wAssert = "assert",
|
||||
|
|
@ -76,34 +76,34 @@ type
|
|||
wSafecode = "safecode", wPackage = "package", wNoForward = "noforward", wReorder = "reorder",
|
||||
wNoRewrite = "norewrite", wNoDestroy = "nodestroy", wPragma = "pragma",
|
||||
wCompileTime = "compileTime", wNoInit = "noinit", wPassc = "passc", wPassl = "passl",
|
||||
wLocalPassc = "localPassC", wBorrow = "borrow", wDiscardable = "discardable",
|
||||
wLocalPassc = "localPassC", wBorrow = "borrow", wDiscardable = "discardable",
|
||||
wFieldChecks = "fieldChecks", wSubsChar = "subschar", wAcyclic = "acyclic",
|
||||
wShallow = "shallow", wUnroll = "unroll", wLinearScanEnd = "linearScanEnd",
|
||||
wComputedGoto = "computedGoto", wInjectStmt = "injectStmt", wExperimental = "experimental",
|
||||
wWrite = "write", wGensym = "gensym", wInject = "inject", wDirty = "dirty",
|
||||
wWrite = "write", wGensym = "gensym", wInject = "inject", wDirty = "dirty",
|
||||
wInheritable = "inheritable", wThreadVar = "threadvar", wEmit = "emit",
|
||||
wAsmNoStackFrame = "asmNoStackFrame", wImplicitStatic = "implicitStatic",
|
||||
wGlobal = "global", wCodegenDecl = "codegenDecl", wUnchecked = "unchecked",
|
||||
wGuard = "guard", wLocks = "locks", wPartial = "partial", wExplain = "explain",
|
||||
wLiftLocals = "liftlocals",
|
||||
|
||||
wAuto = "auto", wBool = "bool", wCatch = "catch", wChar = "char",
|
||||
wClass = "class", wCompl = "compl", wConst_cast = "const_cast", wDefault = "default",
|
||||
wDelete = "delete", wDouble = "double", wDynamic_cast = "dynamic_cast",
|
||||
wAuto = "auto", wBool = "bool", wCatch = "catch", wChar = "char",
|
||||
wClass = "class", wCompl = "compl", wConst_cast = "const_cast", wDefault = "default",
|
||||
wDelete = "delete", wDouble = "double", wDynamic_cast = "dynamic_cast",
|
||||
wExplicit = "explicit", wExtern = "extern", wFalse = "false", wFloat = "float",
|
||||
wFriend = "friend", wGoto = "goto", wInt = "int", wLong = "long", wMutable = "mutable",
|
||||
wNamespace = "namespace", wNew = "new", wOperator = "operator", wPrivate = "private",
|
||||
wProtected = "protected", wPublic = "public", wRegister = "register",
|
||||
wReinterpret_cast = "reinterpret_cast", wRestrict = "restrict", wShort = "short",
|
||||
wSigned = "signed", wSizeof = "sizeof", wStatic_cast = "static_cast", wStruct = "struct",
|
||||
wSwitch = "switch", wThis = "this", wThrow = "throw", wTrue = "true", wTypedef = "typedef",
|
||||
wFriend = "friend", wGoto = "goto", wInt = "int", wLong = "long", wMutable = "mutable",
|
||||
wNamespace = "namespace", wNew = "new", wOperator = "operator", wPrivate = "private",
|
||||
wProtected = "protected", wPublic = "public", wRegister = "register",
|
||||
wReinterpret_cast = "reinterpret_cast", wRestrict = "restrict", wShort = "short",
|
||||
wSigned = "signed", wSizeof = "sizeof", wStatic_cast = "static_cast", wStruct = "struct",
|
||||
wSwitch = "switch", wThis = "this", wThrow = "throw", wTrue = "true", wTypedef = "typedef",
|
||||
wTypeid = "typeid", wTypeof = "typeof", wTypename = "typename",
|
||||
wUnion = "union", wPacked = "packed", wUnsigned = "unsigned", wVirtual = "virtual",
|
||||
wUnion = "union", wPacked = "packed", wUnsigned = "unsigned", wVirtual = "virtual",
|
||||
wVoid = "void", wVolatile = "volatile", wWchar_t = "wchar_t",
|
||||
|
||||
wAlignas = "alignas", wAlignof = "alignof", wConstexpr = "constexpr", wDecltype = "decltype",
|
||||
wAlignas = "alignas", wAlignof = "alignof", wConstexpr = "constexpr", wDecltype = "decltype",
|
||||
wNullptr = "nullptr", wNoexcept = "noexcept",
|
||||
wThread_local = "thread_local", wStatic_assert = "static_assert",
|
||||
wThread_local = "thread_local", wStatic_assert = "static_assert",
|
||||
wChar16_t = "char16_t", wChar32_t = "char32_t",
|
||||
|
||||
wStdIn = "stdin", wStdOut = "stdout", wStdErr = "stderr",
|
||||
|
|
@ -134,14 +134,14 @@ const enumUtilsExist = compiles:
|
|||
when enumUtilsExist:
|
||||
from std/enumutils import genEnumCaseStmt
|
||||
from strutils import normalize
|
||||
proc findStr*[T: enum](a, b: static[T], s: string, default: T): T =
|
||||
proc findStr*[T: enum](a, b: static[T], s: string, default: T): T =
|
||||
genEnumCaseStmt(T, s, default, ord(a), ord(b), normalize)
|
||||
|
||||
else:
|
||||
from strutils import cmpIgnoreStyle
|
||||
proc findStr*[T: enum](a, b: static[T], s: string, default: T): T {.deprecated.} =
|
||||
proc findStr*[T: enum](a, b: static[T], s: string, default: T): T {.deprecated.} =
|
||||
# used for compiler bootstrapping only
|
||||
for i in a..b:
|
||||
if cmpIgnoreStyle($i, s) == 0:
|
||||
return i
|
||||
result = default
|
||||
result = default
|
||||
Loading…
Add table
Add a link
Reference in a new issue