Commit Graph

7456 Commits

Author SHA1 Message Date
Andreas Rumpf
b251625840 Merge pull request #3189 from yglukhov/defer-test-fix
Fixed defer test.
2015-08-07 11:37:07 +02:00
Yuriy Glukhov
842a26317c Fixed defer test. 2015-08-07 00:20:40 +03:00
Dominik Picheta
4a7c1d5fd7 Don't crash on nil in get* procs in the JSON module. 2015-08-06 21:45:52 +01:00
Andreas Rumpf
da4b0d994d Merge pull request #3188 from yglukhov/fix-3185
Fixes #3185
2015-08-06 21:22:05 +02:00
Yuriy Glukhov
41a2a9f00b Fixes #3185 2015-08-06 22:19:33 +03:00
Araq
14ce3c7d4d fix regressions 2015-08-05 21:43:15 +02:00
Araq
0d8942d45e destructors now work with overloaded assignment operators; fixes #2811; fixes #1632 2015-08-05 21:43:14 +02:00
Dominik Picheta
e2886eebb4 Merge pull request #3172 from Nycto/devel
Unittest module: Fix multiple requires in a test
2015-08-05 19:42:14 +01:00
Dominik Picheta
05ada2da43 Merge pull request #3180 from yglukhov/3179-workaround
Workaround for #3179.
2015-08-05 19:41:19 +01:00
Charles Blake
26f7a53d4a Merge ../Nim into devel 2015-08-04 16:13:45 -04:00
Dominik Picheta
096ce55c1a Merge pull request #3183 from sferik/fix-docstyle-include
Fix documentation style reference
2015-08-04 20:01:06 +01:00
Charles Blake
5ec4b7946f Add note about what is included. 2015-08-04 13:25:41 -04:00
Charles Blake
0487ad4180 Use hyperlinks to refer to other procs. 2015-08-04 13:16:27 -04:00
Charles Blake
abf15ec6ce Expand memSlices doc comment & use better example.
Have lines() iterators docs point back to memSlices() for details.
2015-08-04 12:11:33 -04:00
Araq
ab26298a03 added system.unsafeAddr 2015-08-04 17:31:18 +02:00
Erik Michaels-Ober
c035029431 Fix documentation style reference
The documentation style guide was renamed from styleguide to docstyle in
a98f609ae2 but this reference was not
updated in that comment.
2015-08-04 13:15:32 +02:00
Charles Blake
8b38e8b2a4 Merge ../Nim into devel 2015-08-04 04:58:00 -04:00
Dominik Picheta
f8f9677205 Updated documentation of system.new. Ref #2699. 2015-08-04 09:06:47 +01:00
Dominik Picheta
202cc48903 The async macro now supports transforming multiple async procs.
This is a workaround for #3182, no forward declarations. You can now do
this:

```nim
async:
  proc bar(): Future[T]
  proc foo() = await bar()
  proc bar() {.async.} = echo(123); await foo()
```
2015-08-03 21:28:33 +01:00
Charles Blake
8ad5649442 Merge ../Nim into devel 2015-08-03 15:11:30 -04:00
Dominik Picheta
b9c1dd0072 Fixed macros.nim not compiling.
Iterator aliases are not possible.
2015-08-03 18:42:02 +01:00
Charles Blake
5497c964d0 Move tests to stdlib. 2015-08-03 12:35:57 -04:00
Charles Blake
9e8b4475e2 Spruce up doc comments as per dom96 suggestions. 2015-08-03 12:34:03 -04:00
Charles Blake
7cb9f363d6 Merge ../Nim into devel 2015-08-03 12:27:30 -04:00
Charles Blake
c373c7209a toString --> $. 2015-08-03 12:26:08 -04:00
Charles Blake
c6d609f88b Fix accidentally deleted inp argument. 2015-08-03 12:25:30 -04:00
Dominik Picheta
85699b744d Merge pull request #3161 from barcharcraz/fix_times_on_vcc2015
import the correct symbols on windows
2015-08-03 17:08:14 +01:00
Dominik Picheta
303bc45745 Added documentation to macros.items. 2015-08-03 17:05:14 +01:00
Dominik Picheta
04dc46b1aa Merge branch 'macro-items' of https://github.com/transfuturist/Nim into transfuturist-macro-items 2015-08-03 17:03:57 +01:00
Charles Blake
2d9a0c96c6 Merge ../Nim into devel 2015-08-03 08:06:20 -04:00
Yuriy Glukhov
436b847a7e Workaround for #3179. 2015-08-03 14:11:48 +03:00
Charlie Barto
4d6bcbc2f4 make this change VCC specific 2015-08-02 18:55:35 -04:00
Araq
e1913abdd4 fixes #3140 2015-08-03 00:45:25 +02:00
Zahary Karadjov
15df168f99 Rename compiler configuration file to fix "nim check" within the repo
Prior to the change, "nim check" would fail on any file besides the
main nim.nim, because the include paths for the documentation were
not set correctly and this produced various compilation errors.
2015-08-03 01:27:41 +03:00
Dominik Picheta
328f632518 Merge pull request #3176 from zielmicha/ofoperator
Improve discoverability of 'of' operator
2015-08-02 22:35:41 +01:00
Zahary Karadjov
fe124ceadc Disable the new generic params handling for immediate template and macros
Since immediate templates are not subjected to the standard sigmatching
algorithm, they will have a number of deficiencies when it comes to generic
params: Type dependencies between the parameters won't be honoured
and the bound generic symbols won't be resolvable within their bodies.
We could try to fix this, but it may be wiser to just deprecate immediate
templates and macros now that we have working untyped parameters.

Disabling the new features is admittedly not the greatest way to handle
this situations as it introduces inconsistency in the language, but at least
it makes the code backwards-compatible with the previous version of the
compiler instead of triggering more serious problems.
2015-08-02 23:58:22 +03:00
Zahary Karadjov
02f97489b7 fix #1858 again; restores the support for static macro params 2015-08-02 23:58:22 +03:00
Michał Zieliński
0575437762 Improve discoverability of 'of' operator 2015-08-02 22:55:22 +02:00
Andreas Rumpf
7af92708af Merge pull request #3175 from singularperturbation/feature/rst-forum-issue-41
Fix for inline image in rstgen (nimforum #41)
2015-08-02 22:12:12 +02:00
singularperturbation
4c1611fc13 Fix for image directive with periods
Saw in https://github.com/nim-lang/nimforum/issues/41 that there was an
issue in rendering inline images.  Traced back through rstgen and found
that it was not counting something like:

`.. image:: http://i.imgur.com/oCem13Y.png` as valid since it contained
a period, and this wasn't in the set of valid characters, so the empty
string is returned by default.

Added a period to the allowable characters, and now renders correctly.

Test case:
```
import rst, rstgen, strtabs

var docConfig: StringTableRef

docConfig = rstgen.defaultConfig()
docConfig["doc.smiley_format"] = "/images/smilieys/$1.png"

proc rstToHtml(content: string): string =
    result = rstgen.rstToHtml(content, {roSupportSmilies,roSupportMarkdown},
                              docConfig)

var a: string = rstToHtml(".. image:: http://i.imgur.com/oCem13Y.png")
echo a
```
2015-08-02 14:16:53 -05:00
Charles Blake
1bea224c4a Try to get examples to render right as HTML. 2015-08-02 12:29:24 -04:00
Charles Blake
2e4e0ffd3d Add some example code blocks. 2015-08-02 12:25:57 -04:00
Charles Blake
ad67bfcf46 Quote the \ in doc comments. 2015-08-02 12:21:49 -04:00
Charles Blake
63c4f204e8 Add some little one-line doc comment of MemSlice. 2015-08-02 12:20:05 -04:00
Charles Blake
2252f80e72 Add some very simple tests for memfiles iterators. 2015-08-02 12:09:53 -04:00
Charles Blake
2bcd4e9a38 Add top of module comment. Re-order definitions to
type, then converter, then 3 iterators lowest- to highest-level
(also fastest to slowest) including a new intermediate iterator
lines(MemFile, buffer) that is more like readLine(File) in case
that helps anyone port code.
Add doc comments.
Also have toString just use newString+c_memcpy instead of
currently fragile toNimStr which Araq wants a separate PR for.
2015-08-02 12:03:52 -04:00
Charles Blake
a9d09f2868 Revert toNimStr fix as per Araq request. 2015-08-02 12:03:11 -04:00
Charles Blake
fc54fbfb98 Nix unchecked which has no semantics for objects. 2015-08-02 05:28:21 -04:00
Andreas Rumpf
b77475bd19 Merge pull request #3118 from apense/styledoc
Added Documentation Style Guide; Fixes #3089
2015-08-02 11:09:42 +02:00
Andreas Rumpf
2f25e74c9f Merge pull request #3147 from yglukhov/js-emit
Emit pragma support for JS backend.
2015-08-02 11:06:13 +02:00