Commit Graph

10601 Commits

Author SHA1 Message Date
Dominik Picheta
eedc6fecd7 Document to macro in JSON and add example. 2017-04-09 12:48:07 +02:00
Dominik Picheta
a883424d0d Implements else branch for JSON unmarshalling of object variants. 2017-04-09 11:49:50 +02:00
Dominik Picheta
658467a31f Improve error messages and add tests for the JSON macro. 2017-04-08 22:06:57 +02:00
Dominik Picheta
cc223ff7d8 Support int, string and bool fields in unmarshal json macro. 2017-04-08 21:23:35 +02:00
Dominik Picheta
12aafb25cc First implementation of JSON unmarshal macro. 2017-04-08 20:55:32 +02:00
Dominik Picheta
cdfcc12529 Implement json.% for enums. 2017-04-06 21:56:20 +02:00
Dominik Picheta
28f3b3d3a7 Add some extra methods and fields to DOM module. 2017-04-06 21:16:17 +02:00
zah
0c694d2064 Merge pull request #5564 from nim-lang/fix/4556
Fix/4556
2017-04-06 11:25:19 +03:00
Andreas Rumpf
ab3f22fce1 minor update for nimsuggest 2017-04-06 08:53:31 +02:00
Arne Döring
3d4f68c822 Make nimsuggest quit when pressing Ctrl-D from the command line. (#5662) 2017-04-06 08:16:26 +02:00
Anatoly Galiulin
3374bcb373 parsecfg: handle streams and strings when saving or loading configuration (#5554) 2017-04-06 08:10:08 +02:00
John Scillieri
4ba6f9808e Update 'compiles' documentation to remove not (#5666)
Documentation for proc compiles showed a broken/unintuitive example (unless i missed something)
2017-04-05 23:50:48 +02:00
Zahary Karadjov
34c34cb49b move the object construction logic to a separate file 2017-04-06 00:46:18 +03:00
Zahary Karadjov
f162214d5d object construction: test cases and manual additions 2017-04-06 00:46:18 +03:00
Zahary Karadjov
564c0acae2 cleaned up the code and implemented proper error messages 2017-04-06 00:46:18 +03:00
Zahary Karadjov
02243410fd News items for previous commit 2017-04-06 00:46:18 +03:00
Zahary Karadjov
6edb07091d fix #4556
This implements a number of new safety checks and error messages
when object constructors are used:

In case objects:

* the compiler will prevent you from initializing fields in
conflicting branches

* When a field from a particular branch is initialized, the
compiler will demand that the discriminator field is also
supplied with a maching compile-time value

In all objects:

* When the "requiresInit" pragma is applied to a type, all fields
of the type must be initialized when object construction is used.

The code will be simplified in a follow up commit.
2017-04-06 00:45:12 +03:00
Andreas Rumpf
88c4d6aabe fix another compiler regression 2017-04-05 11:32:23 +02:00
Andreas Rumpf
ac81a99892 make tests green again 2017-04-04 18:05:53 +02:00
Andreas Rumpf
bfaa329680 Merge branch 'devel' into araq 2017-04-04 13:38:41 +02:00
Andreas Rumpf
0b79a2b02e attempt to make tests green again 2017-04-04 13:28:15 +02:00
Andreas Rumpf
e21ca54b11 assignments support ': stmtList' like let/var do 2017-04-04 12:20:43 +02:00
Araq
87732f797c fixes #5638 2017-04-04 12:08:34 +02:00
Araq
e105c04e49 revert PR #5638 because it breaks code 2017-04-04 10:43:54 +02:00
Andreas Rumpf
9aeccda262 system.nim: make min/max take openArrays, not varargs (breaking change) 2017-04-04 09:34:16 +02:00
Andreas Rumpf
08f5087d2c remove the need for the .procvar annotation 2017-04-03 16:35:41 +02:00
Andreas Rumpf
e8cfa14354 de-deprecate silly warning about non-exhaustive string case statments 2017-04-03 12:28:06 +02:00
Emery Hemingway
dd7ebb2c95 fixup! support for the Genode OS framework (#5653)
Allocate thread metadata at createThread.
2017-04-02 23:48:23 +02:00
Andreas Rumpf
57b7c45128 Merge branch 'devel' into araq 2017-04-02 23:44:50 +02:00
Andreas Rumpf
cab2ce7e87 update grammar.txt 2017-04-02 23:42:53 +02:00
Andreas Rumpf
c65ff403b2 memory manager: use less memory; corruption prevention 2017-04-02 23:41:29 +02:00
Andreas Rumpf
81cd7a8685 minor todo.txt update 2017-04-02 23:41:29 +02:00
Andreas Rumpf
f520dfbfab remove en-dash from the language 2017-04-02 23:41:29 +02:00
Andreas Rumpf
d587b6a25f language addition: colon-block for expressions in let/var context 2017-04-02 23:38:55 +02:00
Andreas Rumpf
c785066ee3 memory manager: use less memory; corruption prevention 2017-04-02 21:06:10 +02:00
Andreas Rumpf
846e51bb65 minor todo.txt update 2017-04-02 21:01:26 +02:00
Dominik Picheta
6323b09f32 Merge pull request #5652 from TiberiumN/patch-1
Fix #5611
2017-04-02 18:14:09 +01:00
Daniil Yarancev
009277856e Fix #5611 2017-04-02 18:52:14 +03:00
Andreas Rumpf
b652b3cd52 remove en-dash from the language 2017-04-02 15:21:10 +02:00
Andreas Rumpf
a543b89bf8 language addition: colon-block for expressions in let/var context 2017-04-02 15:05:04 +02:00
Eugene Kabanov
316b680f5d Proper fix for osproc.nim on Android (#5646) 2017-04-02 08:32:54 +02:00
Anatoly Galiulin
5fdd03ad4d Fixed issue #5638 (#5639) 2017-04-01 14:14:34 +02:00
Emery Hemingway
7e351fc7fa support for the Genode OS framework (#5560) 2017-03-31 23:13:06 +02:00
Araq
57246cbcec updated news to take PR #5390 into account 2017-03-31 22:14:13 +02:00
wt
c480505797 Fix wrong value range of ntohs ... (#5390) 2017-03-31 22:13:06 +02:00
Silvio
2946c7a4b9 Implementing repr for JS (#5578) 2017-03-31 22:00:48 +02:00
andri lim
2f9a698e87 attempt to fix #5632 typedesc typeRel regression (#5634) 2017-03-31 21:58:26 +02:00
andri lim
fce4b7cd62 attempt to fix #5621 #5615 generic ref object typeRel (#5633) 2017-03-31 21:58:09 +02:00
Andreas Rumpf
d7eb146d28 make pragma expression parsing use the same parser mechanism as elsewhere 2017-03-31 17:03:15 +02:00
Andreas Rumpf
98c6af780e grammar update 2017-03-31 17:02:14 +02:00