Commit Graph

12137 Commits

Author SHA1 Message Date
Dominik Picheta
403c19fba0 Merge pull request #7326 from trustable-code/patch-6
Fix background-color in nimdoc.cfg
2018-03-18 14:40:06 +00:00
Dominik Picheta
58cda83d9e Merge pull request #7356 from GULPF/parseXml-string
Add string overload for parseXml
2018-03-18 13:00:43 +00:00
Araq
863c626078 fixes #7335 2018-03-18 12:13:55 +01:00
Araq
b0994c7f92 better error messages 2018-03-18 12:04:22 +01:00
Oscar Nihlgård
e0ce4f842b Add string overload for parseXml 2018-03-18 11:30:11 +01:00
Araq
4301744e49 raise the max instruction count for the VM to one billion 2018-03-18 11:04:53 +01:00
jcosborn
e39f2a9283 fix allocator corruption for large sizes (#7338)
* fix allocator corruption for large sizes
* allow large chunks to coalesce and added test case
* use correct constants in MaxBigChunkSize
2018-03-17 23:59:04 +01:00
twetzel59
d20729e840 Fix #7304 by clarifying integer width in manual (#7319)
* Fix #7304 by clarifying integer width in manual

* Update lexing.txt
2018-03-17 20:25:28 +01:00
andri lim
19164929ed fixes #7347, asyncfile.getFileSize (#7354)
* fixes #7347

* fixes #7347
2018-03-17 15:21:22 +00:00
Yuriy Glukhov
5ea80b43b1 More flexible lowerBound interface (#7344) 2018-03-16 16:22:45 +01:00
cooldome
70b28a39fe Codegen: use type forward declarations more aggresively. Fixes #7339 (#7340)
Do not emit object definition it if used only by ref or ptr
2018-03-16 16:21:03 +01:00
PMunch
a9f21cffdf Add CommentStmt to astGenRepr (#7313)
* Added codeRepr and dumpCode to the macros module.

This allows those writing macros to write examples, get the code to generate the AST for that example, and then modify that code to be dynamic with the macro function.
2018-03-16 15:57:40 +01:00
WhiteDuke
d56ca42b1a [Documentation] free -> dealloc (#7334) 2018-03-16 15:55:00 +01:00
Andreas Rumpf
37a3eb5170 make 'memset' calls more robust; refs #7341 2018-03-16 15:55:46 +01:00
Andreas Rumpf
b1ab9d551f Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-03-16 15:44:46 +01:00
Andreas Rumpf
08282b1355 make 'memset' calls more robust; refs #7341 2018-03-16 15:44:40 +01:00
Andreas Rumpf
9f17a56896 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-03-16 15:33:16 +01:00
Andreas Rumpf
083d84ba03 json.nim: documentation copy&paste issue 2018-03-16 15:33:09 +01:00
andri lim
4f9f9ea528 fixes #7332 (#7341) 2018-03-16 15:32:01 +01:00
jcosborn
cc5140d8b6 reuse default ident in opcNNewNimNode (performance regression) (#7330)
* reuse default ident in opcNNewNimNode (performance regression)

* use emptyIdent as default
2018-03-14 16:13:30 +01:00
Andreas Rumpf
12f7b96be0 prevent yet another compiler crash from happening 2018-03-14 11:49:27 +01:00
Andreas Rumpf
55a5dcf8a4 improves the stability of 'nim check' 2018-03-13 08:15:24 +01:00
Robert Hencke
ac10a3813a Fix casing in rule 'typeDesc' (#7324)
Also, leave a note in grammar.txt that it is generated.
2018-03-12 09:27:36 +01:00
Araq
8683c8a389 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-03-12 09:02:21 +01:00
Araq
710c1184a3 fixes httpclient documentation comment 2018-03-12 08:59:04 +01:00
Simon Krauter
952084eeef Fix background-color in nimdoc.cfg
Don't assume, that the default background-color is white.
My default background-color is dark, which makes the documentation hardly readable: https://i.imgur.com/xN0UjWz.png
The reason is the transparency of the existing color (rgba(252, 248, 244, 0.45);) 
Fixed by removing the transparency.
2018-03-11 18:23:31 +01:00
PMunch
5003942256 Renamed jsondoc2 to jsondoc, similar to doc2 (#7279)
* Update information about jsondoc/jsondoc2

Manual was missing information about jsondoc2 which made it seem like
it didn't exist at all. This commit adds mention of the jsondoc2
command along with an example.

* Renamed jsondoc2 similar to doc2 and updated docs

doc2 was recently renamed to doc while doc was renamed to doc0. This
commits renames jsondoc to jsondoc2 and jsondoc2 to jsondoc0 to behave
tha same way. The documentation for doc/jsondoc was also lagging behind
this change which has also been fixed. I interpreted this as a soft
deprecation of doc and jsondoc and therefore removed them from the
auto-complete lists.
2018-03-08 15:11:45 +01:00
zah
cbd059aa85 Fix #6415 (#7281)
* hangle static generic params when used in the importcpp pragma

* importcpp works for generic types with fields; fixes #6415

* revert a too agressive safety check that ended up breaking the tests
2018-03-08 15:10:45 +01:00
cooldome
63c28b973e Allow only single infix as in except branches. Fixes #7115 (#7132) 2018-03-08 10:56:32 +01:00
ryanc-signiq
67fd7a7f86 FIXUP: Removed +1 causing substr slicing to skip chars on first iteration of while loop (#7312) 2018-03-08 08:33:41 +01:00
c-blake
551d7b7dc1 Add ability for users to elide ':' or '=' when CLI authors pass a (#7297)
* Add ability for users to elide ':' or '=' when CLI authors pass a
non-empty partial symbol table.  Behavior should be identical to the
old behavior if empty partial symbol tables are passed.  "Partialness"
of the symbol table refers to the fact that one need only specify
option keys that are toggles/booleans/do not take arguments, hence
the "NoArg" suffixes in shortNoArg and longNoArg.

commandLineParams() returns seq[TaintedString], so use that consistently
in getopt() and initOptParser(seq[TaintedString]) dropping the taint at
the quoting stage just as with the paramStr() logic.

Fix capitalization inconsistency of cmdLongOption.

Export OptParser.cmd and OptParser.pos so that, at least *in principle*,
users of this API can handle "--" option processing termination or some
"git-like" sub-command stop word with a separate option sub-syntax.
{ Eg., ``case p.key of "": echo "trailing non-option args: ", p.cmd[p.pos..^1]``
or ``case p.kind of cmdArgument: if p.key == "mysubcmd": ...``. }  Really,
searching for the last delimiter before p.pos is probably needed to frame
the trailing text..Not the nicest API, but still possible with effort.

* Make requested changes from string to seq[char]
(see https://github.com/nim-lang/Nim/pull/7297)

* Document new behavior and elaborate on some special cases.

* NoArg => NoVal to be less ambiguous/more clear.

* Add more documentation and an example snippet.

* Tweak language. Clarify still using ':'/'=' is ok.

* Add a test case for new NoVal behavior.
2018-03-08 08:12:34 +01:00
alaviss
566cec74b6 lib/system: Fix programResult documentation (#7307) 2018-03-07 14:46:02 +01:00
Araq
10cd89eba9 yet another documentation fix 2018-03-06 23:03:42 +01:00
Andreas Rumpf
eeea000582 make the 'canimport' template work 2018-03-06 15:57:46 +01:00
Simon Krauter
077ff83b6e Fixes #7212, now with better code (#7302)
When platform is Windows and app type is GUI, an error about missing DLL file is displayed as message box in addition to the console output, which is usually not visible.
2018-03-06 11:58:43 +01:00
Araq
a9974a33f1 more documentation fixes 2018-03-05 23:25:50 +01:00
Andreas Rumpf
0132442c1d strutils.strip: improve the documentation; fixes #7159 2018-03-05 21:45:13 +01:00
Andreas Rumpf
e2094bc6f4 make re.split consistent with strutils.split and other programming languages; refs #7278 2018-03-05 21:39:13 +01:00
Andreas Rumpf
5c8332d871 fixes #7293 2018-03-05 19:46:13 +01:00
Andreas Rumpf
1b760dcd66 fixes #5293 2018-03-05 19:46:13 +01:00
cooldome
4790b6d63f Fixes 7283 (#7284) 2018-03-05 19:06:47 +01:00
Araq
86c3832201 development version is 0.18.1 2018-03-05 17:02:19 +01:00
Araq
15e044416f fixes #7291 2018-03-05 13:38:32 +01:00
Araq
8572085cc7 fixes #7294; Nim doc search feature 2018-03-05 13:20:50 +01:00
Araq
e3b6ee85b3 algorithm.nim: change formatting to Nim's defaults 2018-03-05 13:20:50 +01:00
Araq
0c28dcd9e2 Cleanup docs about re.nim 2018-03-05 13:20:49 +01:00
Dominik Picheta
363c703e72 Merge pull request #7289 from alehander42/fix-asyncjs-pragma
Stop replacing all pragmas of a function with asyncjs
2018-03-05 11:12:01 +00:00
Alexander Ivanov
b6c69dd45e Use addPragma 2018-03-05 10:28:17 +02:00
Tim
a568e4dac6 Changes entityToUtf8 implementation from htmlparser and add two procs (#7288)
`entityToUtf8` now supports every entity name and decimal and hexadecimal values from https://dev.w3.org/html5/html-author/charref.

As it finally turned out, the `case` implementation generates even a smaller binary size compared to a `[(name, val)]` implementation.

Additionally the procs `entityToRune` and `runeToEntity` are now available. The last one only generates numeric html entities, so it doesn't need a lookup table.
2018-03-04 21:18:03 +01:00
twetzel59
9079517d71 Resolves #5588: adds openFileStream proc that throws on failure (#7282) 2018-03-04 17:30:28 +01:00