fixes #1470
This commit is contained in:
parent
03b152ac66
commit
2b9b09e052
1 changed files with 18 additions and 0 deletions
|
|
@ -69,6 +69,24 @@ notation. (Thus an operator can have more than two parameters):
|
||||||
assert `*+`(3, 4, 6) == `*`(a, `+`(b, c))
|
assert `*+`(3, 4, 6) == `*`(a, `+`(b, c))
|
||||||
|
|
||||||
|
|
||||||
|
Export marker
|
||||||
|
-------------
|
||||||
|
|
||||||
|
If a declared symbol is marked with an `asterisk`:idx: it is exported from the
|
||||||
|
current module:
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
|
||||||
|
proc exportedEcho*(s: string) = echo s
|
||||||
|
proc `*`*(a: string; b: int): string =
|
||||||
|
result = newStringOfCap(a.len * b)
|
||||||
|
for i in 1..b: result.add a
|
||||||
|
|
||||||
|
var exportedVar*: int
|
||||||
|
const exportedConst* = 78
|
||||||
|
type ExportedType* = distinct int
|
||||||
|
|
||||||
|
|
||||||
Method call syntax
|
Method call syntax
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue