mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 11:13:57 +00:00
bootstrap the compiler with nimPreviewSlimSystem (#20176)
* bootstrap the compiler with nimPreviewSlimSystem * threads
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
|
||||
import rstast
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, syncio]
|
||||
|
||||
|
||||
type
|
||||
LangSymbol* = object ## symbol signature in Nim
|
||||
symKind*: string ## "proc", "const", "type", etc
|
||||
|
||||
@@ -59,6 +59,10 @@ import
|
||||
strutils
|
||||
from algorithm import binarySearch
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
type
|
||||
SourceLanguage* = enum
|
||||
langNone, langNim, langCpp, langCsharp, langC, langJava,
|
||||
|
||||
@@ -238,6 +238,10 @@ import
|
||||
std/private/miscdollars, tables, strscans
|
||||
from highlite import SourceLanguage, getSourceLanguage
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, syncio]
|
||||
|
||||
|
||||
type
|
||||
RstParseOption* = enum ## options for the RST parser
|
||||
roSupportSmilies, ## make the RST parser support smilies like ``:)``
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
import strutils, json
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
type
|
||||
RstNodeKind* = enum ## the possible node kinds of an PRstNode
|
||||
rnInner, # an inner node or a root
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
import strutils, os, hashes, strtabs, rstast, rst, highlite, tables, sequtils,
|
||||
algorithm, parseutils, std/strbasics
|
||||
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, syncio]
|
||||
|
||||
|
||||
import ../../std/private/since
|
||||
|
||||
const
|
||||
|
||||
@@ -59,6 +59,9 @@ runnableExamples:
|
||||
|
||||
import std/private/since
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
when not defined(nimHasCursor):
|
||||
{.pragma: cursor.}
|
||||
|
||||
|
||||
@@ -286,6 +286,10 @@ efficiency and perform different checks.
|
||||
import macros, parseutils
|
||||
import std/private/since
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
proc conditionsToIfChain(n, idx, res: NimNode; start: int): NimNode =
|
||||
assert n.kind == nnkStmtList
|
||||
if start >= n.len: return newAssignment(res, newLit true)
|
||||
|
||||
@@ -39,6 +39,9 @@ runnableExamples:
|
||||
import strutils, parseutils, base64
|
||||
import std/private/[since, decode_helpers]
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
type
|
||||
Url* = distinct string
|
||||
|
||||
@@ -33,6 +33,10 @@ runnableExamples:
|
||||
import std/private/since
|
||||
import macros, strtabs, strutils
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
type
|
||||
XmlNode* = ref XmlNodeObj ## An XML tree consisting of XML nodes.
|
||||
##
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
##
|
||||
## Experimental API, subject to change.
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
|
||||
const whitespaces = {' ', '\t', '\v', '\r', '\l', '\f'}
|
||||
|
||||
proc add*(x: var string, y: openArray[char]) =
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
when not declared(ThisIsSystem):
|
||||
{.error: "You must not import this module explicitly".}
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
const
|
||||
hasAllocStack = defined(zephyr) # maybe freertos too?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user