Andreas Rumpf
eddf9abd13
beginnings of the new nimpretty tool; still unusable
2017-10-05 08:43:22 +02:00
Andreas Rumpf
ddc131cf07
the parser finally parses 'echo {1,2}' as it should
2017-09-30 21:35:30 +02:00
Araq
3ccc9c467d
'with' and 'without' are not keywords anymore
2017-09-30 18:32:44 +02:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Zahary Karadjov
7ad115f530
Restore the old behavior of parsing "quote do:"
...
close #5845
2017-08-19 08:57:43 +02:00
Andreas Rumpf
76cf4f4c1b
parser enhancement: allow keywords after dots
2017-07-11 00:54:47 +02:00
Andreas Rumpf
c59bc0cc18
first steps to allow easy functors via macros
2017-06-04 11:17:41 +02:00
Andreas Rumpf
7a95c961a7
cleanup of in/out covariance handling
2017-05-17 20:54:53 +02:00
Andreas Rumpf
61a0eba14f
Merge branch 'zahary' into araq2
2017-05-17 15:27:04 +02:00
Andreas Rumpf
503f780676
Merge branch 'zahary' into araq2
2017-05-16 17:32:18 +02:00
Zahary Karadjov
5e368f3639
support for external types with covariant generic params
2017-05-08 21:45:37 +03:00
Araq
05c20bc4ff
fixes a parser bug
2017-04-25 19:36:05 +02:00
Zahary Karadjov
8de19a7f4c
fix a parsing regression (do is still mandatory in some situations)
2017-04-14 23:48:43 +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
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
Andreas Rumpf
e21ca54b11
assignments support ': stmtList' like let/var do
2017-04-04 12:20:43 +02:00
Andreas Rumpf
a543b89bf8
language addition: colon-block for expressions in let/var context
2017-04-02 15:05:04 +02:00
Andreas Rumpf
d7eb146d28
make pragma expression parsing use the same parser mechanism as elsewhere
2017-03-31 17:03:15 +02:00
Zahary Karadjov
74a80988d9
proper error reporting for concepts and the introduction of the {.explain.} pragma
2017-03-24 16:59:47 +02:00
Zahary Karadjov
815724db71
support the full range of type modifiers when declaring concept vars and testing proc signatures
2017-03-24 16:58:15 +02:00
Andreas Rumpf
b414806e66
nimsuggest: suggest types in a type section
2017-03-14 11:21:35 +01:00
Araq
556b564c7d
nimsuggest: make tests green again
2017-03-10 00:18:24 +01:00
Araq
1887390b0f
nimsuggest: fixes nimsuggest bug #45 ; do not show suggestions in string literals or comments
2017-03-08 12:53:21 +01:00
Araq
2589d69ed2
fixes #5430
2017-02-26 00:32:07 +01:00
Araq
773d17cd14
big refactoring: step 1
2016-10-31 15:34:44 +01:00
Araq
10bd488daa
implements #?braces syntax
2016-10-16 00:35:49 +02:00
Jacek Sieka
3cd4cf4320
remove unused stuff
2016-08-09 22:54:27 +08:00
Andreas Rumpf
39ebe2175b
compiler almost free of deprecated expr/stmt names
2016-07-30 16:34:42 +02:00
Andreas Rumpf
60b187513e
stdlib and compiler don't use .immediate anymore
2016-07-29 23:51:01 +02:00
Andreas Rumpf
11b499f3ca
prepare for #3898
2016-07-15 15:40:26 +02:00
Andreas Rumpf
0134a51a7c
fixes critical 'do' parsing bug
2016-05-28 02:17:13 +02:00
Andreas Rumpf
4869d4e82a
fixes #4036
2016-04-04 10:28:18 +02:00
Andreas Rumpf
c9966a3e17
use 'using' instead of 'sig' keyword; cleans up new features a bit
2016-02-29 12:19:54 +01:00
Andreas Rumpf
0baa1d9955
first version of .partial objects
2016-02-28 23:22:47 +01:00
Andreas Rumpf
38dee2095c
added 'sig' feature; removed tfShared support in the compiler
2016-02-28 19:56:41 +01:00
Andreas Rumpf
2e71bd50b2
implements multi-line-comments; pounds are stripped from the doc comments
2016-01-16 21:40:54 +01:00
Andreas Rumpf
46f1f41cc9
finally removes 'echo ' gotcha
2016-01-15 11:34:52 +01:00
Araq
5fe71db6d9
'out T' is an alias for 'var T'
2015-11-26 17:46:05 +01:00
Araq
cd7b5ae1eb
fixes #1799 properly
2015-10-25 02:35:18 +02:00
Araq
5206c310e6
fixes #1799
2015-10-25 01:26:08 +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
Araq
9e4e7ca535
fixes #2533
2015-04-24 12:36:41 +02:00
Andreas Rumpf
6a016743aa
Merge pull request #2566 from nanoant/parser-diagnostic-location
...
Parser: Fix location (line, col) for diagnostics
2015-04-24 12:33:11 +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
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