Commit Graph

2608 Commits

Author SHA1 Message Date
Andreas Rumpf
8264c3cbee Merge pull request #2849 from ozra/feature-2811-hump-snake-dash
Feature #2811 hump, snake and now dash
2015-06-04 11:37:26 +02:00
yglukhov
e9a57e9706 Fixed codegen for DotDot magic 2015-06-04 12:00:27 +03:00
Oscar Campbell
071ccf3d02 Add "safety compilation". Improved, fixed messages
- node ext searcher also looks for "iojs" if no node(js?) found.
- koch ensures the local work dir compiler is freshly compiled before executing the tests.
- the tester can only run in the repo dir - now the compiler and libs used are also explicitly the local dirs - so no confusion from system wide pathing ("sufficiently sandboxed").
- fixed expectations in tmitems.nim test to match changes in json mod.
- re-layouted the columns / row printing slightly, making test fails pop out more, and everything "normal" layed back.
2015-06-04 07:33:27 +02:00
Ryan Gonzalez
8beed96106 Colors! 2015-06-02 18:47:43 -05:00
Oscar Campbell
44b0bf59d9 Change const def to cleaner code per suggestion. 2015-06-02 22:22:27 +02:00
Adam Strzelecki
b0db8126a5 Parser: Inline expr pragmas with parenthesis
Previously pragmas could be attached only to whole statements, this change
allows attaching pragmas to inline statements, eg.:

  template rewriteAdd{a + b}(a: expr, b: expr): expr =
    ({.noRewrite.}: a + b) + 1

Code above will cause a + b to be rewritten once, because rewriteAdd attaches
{.noRewrite.} to resulting a + b expr.
2015-06-02 21:58:14 +02:00
Adam Strzelecki
2f5ed17cfe Parser: Properly represent parsePar in grammar 2015-06-02 21:53:46 +02:00
Adam Strzelecki
13b57dbc2f Introduce {.noRewrite.} expr pragma disabling TR
Term rewriting macros/templates are currently greedy and they will rewrite as
long as there is a match. So there was no way to ensure some rewrite happens
only once, eg. when rewriting term to same term plus extra content.

With new macro we can actually prevent further rewriting on marked expr or
stmts, eg. with given example echo(...) will be rewritten just once:

  template pwnEcho{echo(x)}(x: expr) =
    {.noRewrite.}: echo("pwned!")

  echo "ab"
2015-06-02 21:38:53 +02:00
Oscar Campbell
dd30bab480 Restructure branching slighty. Fix error message. 2015-06-01 23:49:04 +02:00
Billingsly Wetherfordshire
87c8d586b5 string only matches for openarray not varargs 2015-06-01 07:37:36 -05:00
Billingsly Wetherfordshire
f3b8a3cbbc made string compatible with openarray[char] 2015-06-01 06:04:22 -05:00
Stefan Talpalaru
50e96ad939 the Go GC - initial implementation 2015-05-31 19:07:44 +02:00
Oscar Campbell
4a1e45e3f8 Remove forgotten debug echo statement. 2015-05-31 03:11:44 +02:00
Oscar Campbell
6a43b0e817 Clean up to compiler style. Refine error-msg for illegal octal 'O' 2015-05-31 02:55:06 +02:00
Oscar Campbell
1b4db5a34c Implement #2811 - Unicode en-dash (U+2013) as hump/snake alt. 2015-05-31 01:31:06 +02:00
Oscar Campbell
49b953533a Fix #2523 - first commit. Needs some cleanup. 2015-05-31 00:56:27 +02:00
yglukhov
c5f7d553e9 Perform lambda lifting for compile-time stuff when targeting JS. Enable unittest test. 2015-05-29 10:48:14 +03:00
Araq
94f54700c4 first implementation of pinnedSpawn 2015-05-28 12:42:04 +02:00
yglukhov
eec76cfc6b Fixed renderer for asm node in JS 2015-05-28 10:23:09 +03:00
Andreas Rumpf
14b2bbc24c Merge pull request #2695 from transfuturist/devel
Add path directive to allow inclusion of config file's path itself
2015-05-26 21:13:52 +02:00
Andreas Rumpf
3db13ba0e0 Merge pull request #2804 from yglukhov/minor-cosmetics
Minor cosmetic changes.
2015-05-26 21:12:13 +02:00
Andreas Rumpf
aa66dfd5a7 Merge pull request #2810 from yglukhov/js-codegen-obj-field-byvar
Fixes #2798. Passing arguments by var in certain cases leads to invalid JS.
2015-05-26 21:11:32 +02:00
Flaviu Tamas
badc3a0929 Add simple tests to secure_hash 2015-05-26 09:40:01 -04:00
Flaviu Tamas
e9516e6308 Use sha1 instead of crc 2015-05-26 09:39:50 -04:00
yglukhov
d3c4c7c52f Fixes #2798 2015-05-26 16:00:48 +03:00
Sergey Avseyev
b8fbe6c711 Ship all testdata with dist 2015-05-26 15:46:57 +03:00
yglukhov
1156e8ef9d Minor cosmetic changes. 2015-05-26 11:32:07 +03:00
Simon Hafner
4cc722a414 now nimsuggest works on the first sug 2015-05-24 17:47:51 -05:00
Simon Hafner
928b730d1b fixes #2694 2015-05-24 14:52:16 -05:00
Flaviu Tamas
4873db4c72 Rename crc module to "secure_hash" 2015-05-23 13:17:19 -04:00
Flaviu Tamas
188bba2b3c Clean up crc module
Use better names, remove quite a bit of dead code.
Change `><` to a name that's actually descriptive.
2015-05-23 13:01:52 -04:00
Andreas Rumpf
5d4ee87f3b Merge pull request #2754 from def-/intval
Intval
2015-05-19 14:36:03 +02:00
Andreas Rumpf
d7c0b269cb Merge pull request #2734 from def-/stdin-fix
Clean up stdin file reading of compiler.
2015-05-19 14:35:18 +02:00
yglukhov
4439b00b19 Fixed JS call codegen, when first parameters are compile-time. 2015-05-19 13:41:18 +03:00
def
2076e14a09 Update ast spec about uint literals 2015-05-18 21:34:26 +02:00
def
51de44be79 Make intVal work for uint literals in the VM 2015-05-18 21:31:24 +02:00
def
2613110015 Use gProjectIsStdin instead 2015-05-17 16:10:46 +02:00
def
def61c9fcd Clean up stdin file reading of compiler.
Uses "stdinfile" as the module identifier now, which prevents problems
with - colliding with the minus operator. This fixes #2422 and #2702.
2015-05-16 12:38:53 +02:00
transfuturist
8fc53f2952 Add path directive to allow inclusion of config file's path itself 2015-05-14 12:52:43 -07:00
Andreas Rumpf
c30d7c3208 Merge pull request #2680 from reactormonk/epc
Implements EPC for nim-mode in nimsuggest
2015-05-14 02:16:12 +02:00
Adam Strzelecki
179d82c55b Fix #2662: Don't convert subtype typedesc params
There is no point to issue implicit HiddenStdConv encountering subtype of
typedesc[Base] parameter on overload resolution, since this will anyway never
reach codegen. This change effectively fixes compiler bug for:

  iterator it(T: typedesc[Base]) = ...
  for s in it(SubclassOfBase): ...

Where HiddenStdConv triggered implicit instantiation of variable of type
typedesc[Base] in for transform, that eventually fails at getUniqueType, that
refuses to work for typedesc.
2015-05-13 19:10:54 +02:00
Simon Hafner
5e97780a94 changed from parseEnum to direct copy
Let's hope this doesn't break anything
2015-05-13 18:34:29 +05:00
Simon Hafner
c56a005238 nextFreePort -> connectToNextFreePort 2015-05-13 18:19:39 +05:00
Simon Hafner
13e8547fa7 hardcoded order 2015-05-08 19:47:34 +05:00
Simon Hafner
c06672451a removed unnecessary deps 2015-05-08 19:47:17 +05:00
Simon Hafner
f5cca89610 merged devel into epc 2015-05-08 06:40:34 +05:00
Simon Hafner
2474c1bb11 import sigmatch, not suggest in nimsuggest 2015-05-08 06:32:58 +05:00
Andreas Rumpf
9422dbf337 Merge pull request #2657 from def-/noreturn
Pass noReturn pragma to C code.
2015-05-08 02:08:32 +02:00
def
4a2a0894ae Implicitly assume compilers to know naked and noreturn attributes 2015-05-07 22:31:45 +02:00
def
a7b39e3ebf Improve code style a bit 2015-05-07 20:35:16 +02:00