move io out of system (#19442)

* move io out of system

* fix tests

* fix tests

* next step

* rename to syncio

* rename

* fix nimscript

* comma

* fix

* fix parts of errors

* good for now

* fix test
This commit is contained in:
flywind 2022-02-03 00:10:11 +08:00 • committed by GitHub
commit 891329cd4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 92 additions and 42 deletions

View file

@ -84,8 +84,8 @@ done with spaces only, tabulators are not allowed.
String literals are enclosed in double-quotes. The `var` statement declares
a new variable named `name` of type `string` with the value that is
returned by the `readLine <io.html#readLine,File>`_ procedure. Since the
compiler knows that `readLine <io.html#readLine,File>`_ returns a string,
returned by the `readLine <syncio.html#readLine,File>`_ procedure. Since the
compiler knows that `readLine <syncio.html#readLine,File>`_ returns a string,
you can leave out the type in the declaration (this is called `local type
inference`:idx:). So this will work too:
@ -97,7 +97,7 @@ Note that this is basically the only form of type inference that exists in
Nim: it is a good compromise between brevity and readability.
The "hello world" program contains several identifiers that are already known
to the compiler: `echo`, `readLine <io.html#readLine,File>`_, etc.
to the compiler: `echo`, `readLine <syncio.html#readLine,File>`_, etc.
These built-ins are declared in the system_ module which is implicitly
imported by any other module.
@ -594,7 +594,7 @@ Procedures
==========
To define new commands like `echo <system.html#echo,varargs[typed,]>`_
and `readLine <io.html#readLine,File>`_ in the examples, the concept of a
and `readLine <syncio.html#readLine,File>`_ in the examples, the concept of a
*procedure* is needed. You might be used to them being called *methods* or
*functions* in other languages, but Nim
`differentiates these concepts <tut1.html#procedures-funcs-and-methods>`_. In