Eugene Kabanov
050918aa2a
Fix tioselectors.nim for appveyor. ( #5694 )
2017-04-12 08:43:41 +02:00
Zahary Karadjov
03770daba4
allow StmtLists to pass through semExprWithType
...
This fix was necessary in order to fix the lambda lifting used in
the "jsffi" module, which relies on turning nkStmtList into nkLambda
in a catch-all dot operator.
2017-04-11 02:22:13 +03:00
Zahary Karadjov
54a1d9c16a
wip
2017-04-11 00:48:52 +03:00
Zahary Karadjov
a3f19c87fb
lift parameter-less do block to lambdas
2017-04-10 23:58:05 +03:00
Zahary Karadjov
f7b10e213b
support post expression blocks in return and yield
2017-04-10 17:26:50 +03:00
Zahary Karadjov
8b63b84924
fix a regression in tlexerex
2017-04-10 13:06:06 +03:00
Zahary Karadjov
8cb11aac4f
adapt quote to the new parsing rules
2017-04-10 12:23:04 +03:00
Zahary Karadjov
e7eb01ed48
fix a parsing regression (calls with do inside param lists)
...
This treatment is applied only when "do" is used, because
the code foo(x: bar) is recognized as object construction.
2017-04-10 12:08:40 +03:00
Zahary Karadjov
9ffaee3f88
fully consisent parsing between the new and the old 'do blocks'
2017-04-10 11:44:02 +03:00
Zahary Karadjov
34b2527441
the new blocks without 'do' produce compatible AST with 'do blocks'
2017-04-09 23:45:52 +03:00
Zahary Karadjov
48a1a54d1c
improve the usability of the jsffi module
...
* All JavaScript operators are usable with JsObject
* The dot operators will use native JavaScript strings
* Results returned from dot calls are consired discardable
2017-04-09 23:04:55 +03:00
Zahary Karadjov
987b522071
fix the do notation when used with procs
2017-04-09 22:59:24 +03:00
Dominik Picheta
c9c64240d3
Fixes ambiguity introduced by #5390 .
2017-04-09 20:27:28 +02:00
Dominik Picheta
88cb40cd31
Implement support for enum fields in JSON macro.
2017-04-09 17:22:40 +02:00
Dominik Picheta
bd58a0d67c
Use doAssert in JSON macro and improve diagnostics.
2017-04-09 17:04:31 +02:00
Federico Ceratto
9f77233ab4
Add JSON tests based on https://github.com/nst/JSONTestSuite
2017-04-09 14:04:37 +01:00
Dominik Picheta
4bd650ee42
Merge branch 'feature/json-macro' into devel
2017-04-09 13:11:09 +02:00
Dominik Picheta
7ac0c15e7a
Improve documentation in the JSON module.
2017-04-09 13:09:59 +02:00
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
Zahary Karadjov
03172bef6f
fix #5643 ; fix #5644
2017-04-08 23:42:42 +03: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
Fredrik Høisæther Rasch
392f025148
Error Message if CC invocation fails ( #5663 )
2017-04-08 19:06:19 +02:00
Araq
6eb74c7281
remove system.getFileSize again, breaks windows builds and I don't want more stuff that's a pain to support in a platform independent manner
2017-04-08 18:19:01 +02:00
Zahary Karadjov
e9a3ffbc3d
Restore the Nim's 0.14 proper handling of generic aliases
...
A more efficient implementation is possible by restoring the old
lifting ot tyGenericInvocation to tyGenericInst in liftTypeParam,
but this fix will suffice for now.
fixes #5087
fixes #5602
fixes #5641
fixes #5570
2017-04-08 17:28:19 +03:00
Dominik Picheta
27ede21504
Merge pull request #5612 from ehmry/AsyncFile.setLen
...
asyncfile: setLen procedure for files
2017-04-08 12:24:21 +02:00
Zahary Karadjov
fceef77301
test case for #5640
2017-04-07 21:57:04 +03:00
Zahary Karadjov
0b7321651e
fix #5658
2017-04-07 21:53:27 +03:00
Zahary Karadjov
e11b3520ff
fix #5654
2017-04-07 19:35:05 +03:00
Zahary Karadjov
fb3ff64450
fix #5642
2017-04-07 19:28:52 +03:00
Zahary Karadjov
eb635d9ccf
fix #5648
2017-04-07 17:03:49 +03:00
Zahary Karadjov
ee4b98ec17
wip fix #5640
2017-04-07 15:05:14 +03: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
Emery Hemingway
bc5c2d8414
getFileSize and setFileSize procedures for File and AsyncFile
...
Platform independent procedure to set a file length. Useful when
replacing file content.
2017-04-05 19:05:43 -05: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