Commit Graph

7456 Commits

Author SHA1 Message Date
Araq
4be0d16520 added '..^' and '..<' operators; 'nil' is allowed for 'len'; added plugin system to the compiler 2015-04-22 12:04:11 +02:00
Araq
54515241e3 fixes #2581 2015-04-22 12:04:10 +02:00
Araq
aacaa8f171 cleaned up some magics to make room for new magics; added '..<' and '..^' templates 2015-04-22 12:04:09 +02:00
Araq
c69d74818e fixes #2550 2015-04-22 12:04:09 +02:00
Andreas Rumpf
2f973c783c Merge pull request #2565 from nanoant/parser-consistency
Parser consistency
2015-04-22 11:59:52 +02:00
Simon Hafner
f0f72613d8 epc skeleton 2015-04-22 06:32:02 +05:00
Simon Hafner
b01b7675ab parseEnum ftw 2015-04-22 06:15:52 +05:00
Simon Hafner
766b7ea61d enabled sexp tests 2015-04-22 06:11:30 +05:00
Simon Hafner
518db9eb7e rewrite suggest.nim for suggestionResultHook 2015-04-22 06:10:47 +05:00
Andreas Rumpf
4370163fdd Merge pull request #2583 from BlaXpirit/test-stdlib
Test stdlib
2015-04-21 15:36:37 +02:00
Oleh Prypin
22db40e5e4 Turn some test outputs into actual tests 2015-04-21 15:59:32 +03:00
Andreas Rumpf
3f546e4a54 Merge pull request #2580 from def-/test-fixes-4
Fix expected tester messages
2015-04-21 13:54:41 +02:00
Oleh Prypin
c433ae1aaa Fix romans module 2015-04-21 14:40:18 +03:00
Oleh Prypin
a8c3c2ef0d Fix a test in xmltree 2015-04-21 14:39:34 +03:00
Oleh Prypin
32109a7867 Don't run non-test code when defined(testing) 2015-04-21 14:37:29 +03:00
Adam Strzelecki
dc1b15647c Parser: Test for exact missing ':' location column
This ensures compiler points to the right place when claiming that ':' is
missing.
2015-04-21 11:32:13 +02:00
Adam Strzelecki
07b13251d1 Parser: Fix location (line, col) for diagnostics
Previously parser was using lexMessage which was taking location from current
buffer position which was pointing after recently consumed token. But since
parser shows diagnostics about that token it should point to the location where
token starts.

This makes diagnostics like: `test.nim(2, 2) Error: ':' expected` point
properly at the beginning of the wrong token.
2015-04-21 11:32:13 +02:00
Adam Strzelecki
69ed78b30f msg: Output column numbers starting from 1
Most of editors/IDEs expect column numbers to start from 1, so (1, 1) means
beginning of the file.

This change applies only to diagnostics output, however Nim will still
internally number columns starting from 0.
2015-04-21 11:32:12 +02:00
def
fc76c93a19 Fix expected tester messages 2015-04-21 11:17:24 +02:00
Andreas Rumpf
d203d6fad4 Merge pull request #2411 from reactormonk/merge-counttables
merge for CountTable, see #1680
2015-04-21 09:04:46 +02:00
Andreas Rumpf
72e513991f Merge pull request #2572 from maxgrenderjones/fix-2431-against-devel
{} returns nested results in json & standardise on 'key' not 'name'
2015-04-21 09:02:39 +02:00
Andreas Rumpf
1b80e2f296 Merge pull request #2506 from BlaXpirit/update-pcre
Update and improve PCRE wrapper
2015-04-21 08:58:28 +02:00
Andreas Rumpf
f7f5a690a9 Merge pull request #2449 from def-/slice-items
Add items iterator for slices
2015-04-21 08:56:59 +02:00
Andreas Rumpf
3e2c086b1f Merge pull request #2575 from nanoant/test-for-error-location-column
Tests: Optional error location column spec
2015-04-21 08:51:16 +02:00
Araq
248dc42aa5 fixes #2520 2015-04-21 08:17:40 +02:00
Araq
f7f9265399 attempt to fix JS codegen regression 2015-04-20 22:53:46 +02:00
Araq
e55f5d1fd4 fixes #2505, fixes #1853, fixes #2522 2015-04-20 21:25:49 +02:00
Araq
daefc2567b fixes serious codegen regression; C++ target works again 2015-04-20 21:24:49 +02:00
Adam Strzelecki
0da4d6b755 Parser: Make exprList() not comsume endToken
This makes use single comcol or eat for multiple cases. Also this makes
exprList responsible for consuming only list of expressions, nothing else which
is more logical.

As a side-effect compiler is now more consistent about errors, eg.:

    try # <- missing something
      echo "try"
    finally:
      echo "finally"

Triggers: test.nim(2, 6) Error: ':' expected

    try:
      echo "try"
    finally # <- missing something
      echo "finally"

Previously triggered: test.nim(4, 6) Error: invalid indentation

But now we got: Error: ':' expected - same as in 1st case
2015-04-20 21:06:03 +02:00
Adam Strzelecki
8a6df889d0 Parser: Use colcom(...) when possible
This make parsing obligatory colon more consistent across the parser's code.
2015-04-20 21:06:03 +02:00
Adam Strzelecki
505836385c Tests: Optional error location column spec
This allows some test to specify error location column, to ensure compiler is
generating diagnostics pointing to exactly right place of an error.
2015-04-20 21:03:57 +02:00
Araq
43eae0c113 macros: added bool literal support 2015-04-20 20:40:10 +02:00
Araq
2b4e233510 Merge branch 'devel' of https://github.com/Araq/Nim into devel 2015-04-20 11:44:54 +02:00
Araq
7be092bba5 VM: minor fixes to make lexim work 2015-04-20 11:36:13 +02:00
Araq
dc3a0bc009 added macros.newTree proc (why didn't we do this earlier?) 2015-04-20 11:34:18 +02:00
Araq
9abfc60db4 parse 'of' branches for macros properly 2015-04-19 14:25:16 +02:00
Araq
89cbf092b2 fixes a serious codegen bug that caused to emit wrong barriers in rare cases 2015-04-19 13:36:22 +02:00
Araq
5cea6807e1 fixes #2476 2015-04-19 02:43:19 +02:00
Araq
751232dc7c implements .goto support for variables 2015-04-19 02:42:40 +02:00
Josep Sanjuas
f72bb57fff Convert to float before sum 2015-04-18 13:40:20 +02:00
Josep Sanjuas
44246b6709 Document toFloat is necessary 2015-04-18 13:38:15 +02:00
Josep Sanjuas
e76f54e059 Generalize variance to other types 2015-04-18 13:28:48 +02:00
Kay Zheng
a11a2f0fdb Check for async errors in 2015-04-18 10:27:35 +08:00
Max Grender-Jones
7daad41784 Allow {} to return nested results in json & standardise on 'key' not 'name'
- Note now returns nil if users try to index into a non-object;
  old behaviour was to throw a runtime error
- Also s/transverse/traverse/
2015-04-18 01:08:06 +01:00
Araq
5146624f0d disabled JS test 2015-04-18 01:18:23 +02:00
Araq
caef835fe4 fixes #2568 2015-04-17 21:21:02 +02:00
Kay Zheng
3125058b6a Only run the test for the fixed version of poll(...) 2015-04-17 22:40:53 +08:00
Kay Zheng
371d273924 Add a test case for the EvError handling issue 2015-04-17 22:24:06 +08:00
Andreas Rumpf
b4e938ca21 Merge pull request #2503 from ReneSac/arrowLike
Restrict arrow-like operators to those ending with `->`, `~>` or `=>`
2015-04-15 19:24:44 +02:00
Andreas Rumpf
86b37f7fc7 Merge pull request #2555 from def-/fix-2552
Make peekExitCode on Posix use WIFEXITED to determine exit
2015-04-15 17:41:01 +02:00