Timothee Cour
511bd947d3
fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg ( #14768 )
2020-06-23 10:06:36 +02:00
Andreas Rumpf
66c50c2ffc
implement the 'bind' statement for generics, it was an oversight that this was never implemented ( #14584 )
2020-06-07 09:55:56 +02:00
Timothee Cour
ed263e174e
fix #13524 astToStr now works inside generics ( #13681 )
2020-03-18 13:43:32 +01:00
Jasper Jenkins
796aafe7e0
make case-object transitions explicit, make unknownLineInfo a const, replace a few magic numbers with consts ( #13170 )
2020-01-17 10:34:31 +01:00
Clyybber
7e747d11c6
Cosmetic compiler cleanup ( #12718 )
...
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Timothee Cour
630e18a6eb
refs #11947 ; FieldError fixed ( #11950 )
2019-08-15 06:04:38 +02:00
Araq
c94647aeca
styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
2019-07-10 12:42:41 +02:00
Andreas Rumpf
7e53c1c5c5
fixes #11188 ( #11319 )
2019-05-24 22:50:43 +02:00
Clyybber
cc28eef38e
Replace countup(x, y) with x .. y
2019-05-07 12:37:28 +02:00
Clyybber
f18b3af9d4
Replace countup(x, y-1) with x ..< y
2019-05-07 12:32:05 +02:00
Andreas Rumpf
bf592c4e94
more destructor based changes ( #10885 )
...
* mark user defined destructors with sfOverriden to simplify the logic
* refactoring in preparation to merge liftings and generic instantiations for destructors
* ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on
* renamed 'patterns' switch to 'trmacros' as it was totally misleading before
* destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking
* test for invalid/too late destructor introductions
* liftdestructors: make code robust for nimsuggest
* --newruntime works for hello world again
* newruntime: code generation for closures
2019-03-23 00:12:05 +01:00
deech
68a82f100e
Fixes #10727 . ( #10728 )
2019-02-25 11:21:14 +01:00
Andreas Rumpf
6e8ed8c6fa
added first version of a nimfind tool for the poor souls that don't have a good nimsuggest integretation
2018-11-14 16:04:54 +01:00
Araq
f6def4286c
fixes #8603
2018-10-30 11:28:45 +01:00
LemonBoy
6d4503325c
Fix regression with runnableExamples in generic expr
...
The examples should not enter the generic analysis at all.
The regression was introduced in 4cf704bb as a fix for #8694 .
Fixes #9130
Fixes #8694
2018-09-30 14:11:53 +02:00
Andreas Rumpf
4cf704bb3e
fixes #8694
2018-09-02 22:44:48 +02:00
LemonBoy
584d778318
Fix use of custom pragmas in generic procs ( #8165 )
...
Fixes #7626
2018-07-01 08:06:58 +02:00
Zahary Karadjov
5bcf8bcb59
fixes #7222 ; fixes #5595 ; fixes #3747
...
* late instantiation for the generic procs' default param values
* automatic mixin behaviour in concepts
Other fixes:
* don't render the automatically inserted default params in calls
* better rendering of tyFromExpr
2018-06-16 16:46:32 +03:00
Andreas Rumpf
5348fef003
implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1
2018-06-13 01:44:19 +02:00
Andreas Rumpf
40ec7be45c
refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly
2018-05-27 22:09:15 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Andreas Rumpf
328e7a1005
options.nim: no global variables anymore
2018-05-13 17:52:21 +02:00
Andreas Rumpf
dd35111ff2
semstmts compiles again
2018-05-12 19:45:19 +02:00
Araq
ee67a67ac4
first steps in adding template/macro calls to stack traces
2017-12-21 10:03:33 +01:00
Andreas Rumpf
617ba1a209
Merge branch 'devel' into araq
2017-11-07 11:17:20 +01:00
Andreas Rumpf
4e4d466d06
minor breaking change: for loop bodies now get their own scope
2017-11-05 16:53:05 +01:00
Andreas Rumpf
30b098fcaf
wip
2017-11-02 15:39:44 +01:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Andreas Rumpf
fd4ef6ae8f
.pure enums are much more convenient to use now
2017-09-17 17:36:37 +02:00
Zahary Karadjov
cd02561368
introduce a pre-processing pass for the concept bodies
...
fixes #4982
fixes #3805
close #3414
2017-06-20 11:29:42 +02:00
Andreas Rumpf
0d8a503e45
fixes #5597 ; wrong eager template instantiation in generic context ( #5601 )
2017-03-24 07:35:12 +01:00
Andreas Rumpf
3e7b04683c
make tests green again
2017-03-02 12:23:35 +01:00
Andreas Rumpf
22789a0bfc
fixes #5419
2017-02-24 00:32:14 +01:00
Dominik Picheta
1c233ba27a
More progress towards a working #3691 .
2017-02-03 19:50:22 +01:00
Dominik Picheta
656da1f6a9
WIP: as with generics.
2017-02-02 21:36:49 +01:00
Andreas Rumpf
01ae0d28d4
recursive modules are only detected to improve error messages
2016-11-24 12:27:21 +01:00
Andreas Rumpf
55e86184a5
fixes #4600
2016-08-23 01:29:30 +02:00
Andreas Rumpf
de6198c747
fixes #4555
2016-08-02 12:47:02 +02: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
1d186ee9c3
fixes #2377
2016-07-08 18:08:34 +02:00
Andreas Rumpf
03b64327ca
fixes a critical bug about template instantiations in generics
2016-06-05 16:43:20 +02:00
Andreas Rumpf
c1627354d1
first implementation of the new lambda-lifting pass; barely anything works
2015-12-26 00:42:30 +01:00
Araq
ba4dd92f45
fixes regression: NimForum compiles again
2015-09-21 15:49:48 +02:00
Araq
eb7f514933
fixes #3268
2015-09-18 10:11:37 +02:00
Araq
36f68e1650
fixes #3329
2015-09-18 02:24:12 +02:00
Araq
29a9166966
fixes the most pressing regressions introduced by the new handling of a[i] in the compiler
2015-09-16 15:34:54 +02:00
Araq
8ef66b973d
first attempt to fix 'a[i]' handling in generics
2015-09-12 10:55:28 +02:00
Araq
36a90c6044
fixes #1965
2015-08-10 01:31:42 +02:00