metagn
15d00ca0e1
allow proc expressions in place of statements ( #20935 )
...
properly fixes #18714
2022-11-29 06:37:00 +01:00
ringabout
a15872ba9e
refactor strongSpaceB with an enum ( #20809 )
...
refactor strongSpaceB
2022-11-10 16:21:52 +01:00
ringabout
0b1d1b7886
fixes #15688 ; handle strongSpace overflow issues ( #20724 )
...
* fixes #15688 ; handle `strongSpace` overflow issues
* stop at 1
* change the type of strongSpaceA to bool
2022-11-03 09:18:09 +01:00
Andreas Rumpf
0d23419e68
DAA and 'out' parameters ( #20506 )
...
* DAA and 'out' parameters
* progress
* documented strictDefs and out parameters
* docs, tests and a bugfix
* fixes silly regression
2022-10-06 17:08:41 +02:00
ringabout
e323b91a32
correct grammar (ref #20199 ) and add check for grammar.txt ( #20494 )
...
* correct grammar; ref #20199
* add check for keeping grammar.txt up-to-date
* add nimTestGrammar
2022-10-06 16:36:32 +02:00
ringabout
f89ba2c951
add default field support for object in ARC/ORC ( #20480 )
...
* fresh start
* add cpp target
* add result support
* add nimPreviewRangeDefault
* reduce
* use orc
* refactor common parts
* add tuple support
* add testcase for tuple
* cleanup; fixes nimsuggest tests
* there is something wrong with cpp
* remove
* add support for seqs
* fixes style
* addd initial distinct support
* remove links
* typo
* fixes tuple defaults
* add rangedefault
* add cpp support
* fixes one more bugs
* add more hasDefaults
* fixes ordinal types
* add testcase for #16744
* add testcase for #3608
* fixes docgen
* small fix
* recursive
* fixes
* cleanup and remove tuple support
* fixes nimsuggest
* fixes generics procs
* refactor
* increases timeout
* refactor hasDefault
* zero default; disable i386
* add tuples back
* fixes bugs
* fixes tuple
* add more tests
* fix one more bug regarding tuples
* more tests and cleanup
* remove messy distinct types which must be initialized by original types
* add tests
* fixes zero default
* fixes grammar
* fixes tests
* fixes tests
* fixes tests
* fixes comments
* fixes and add testcase
* undo default values for results
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com >
2022-10-04 12:45:10 +02:00
metagn
86f7f4ffa5
remove deprecated type pragma syntax, fix bugs that required it ( #20199 )
...
* remove deprecated pragma syntax from 0.20.0
closes #4651 , closes #16653 with a cheap fix for now due to
how early `tfFinal` is set
* remove type pragma between name and generics
* undo removal, try removing bind expression (0.8.14)
* fix test, unremove bind expr
* remove again
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* dependencies @ HEAD & weave test dependencies
* try fix package ci
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2022-09-03 09:52:13 +02:00
flywind
42ac50e988
fixes #19662 ; Indent level errored for first line ( #19718 )
2022-04-25 12:00:23 +02:00
flywind
7f6e800caf
move assertions out of system ( #19599 )
2022-03-23 20:34:53 +01:00
hlaaftana
61d682e733
Allow full commands and blocks in type sections ( #19181 )
...
* allow full commands and blocks in type sections
* update grammar
* fix changelog [skip ci]
* more tests
* even more tests
2022-01-02 07:29:55 +01:00
Andreas Rumpf
a61bbf7d8d
fixes grammar typos [backport] ( #19289 )
2021-12-27 17:28:19 +01:00
hlaaftana
1ef945668d
treat do with pragmas but no parens as proc ( #19191 )
...
fixes #19188
2021-12-05 06:44:22 +01:00
hlaaftana
2859069dbe
fix #12274 ( #19180 )
2021-11-24 07:08:07 +01:00
Andreas Rumpf
6ff61766da
fixes #19011 [backport:1.6] ( #19114 )
2021-11-09 18:59:59 +01:00
Andreas Rumpf
c56ba3f06a
fixes #18847 [backport] ( #18870 )
2021-09-20 09:09:53 +02:00
Andreas Rumpf
2e2d928846
formal grammar updates [backport:1.2] ( #18803 )
2021-09-04 19:52:57 +02:00
Timothee Cour
fa7c1aa864
move PNode.comment to a side channel, reducing memory usage during compilation by a factor 1.25x ( #18760 )
...
* move PNode.comment so a side channel, reducing memory usage
* fix a bug
* fixup
* use sfHasComment to speedup comment lookups
* fix for IC
* Update compiler/parser.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-08-29 15:54:07 +02:00
Timothee Cour
3aa16c1de0
fix RFC #341 : dot-like operators are now parsed with same precedence as . ( #18711 )
...
* fix RFC #341 : dot-like operators are now parsed with same precedence as `.`
* fixup
* [skip ci] address comment in changelog
* address comment
* update grammmar
* add manual entry
* fixup
* -d:nimPreviewDotLikeOps
* address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
2021-08-25 06:50:40 +02:00
Timothee Cour
8d2f6bba3a
support same-line doc comments in routines ( #18595 )
...
* support same-line comments in routines
* remove assert as per review comment
2021-07-27 19:50:59 +02:00
konsumlamm
ac5435ecd0
Make error message for empty new-styled concept more descriptive ( #18506 )
...
* Allow empty new-styled concept
Slightly improve error messages
* Make empty new-styled concepts an error
2021-07-18 10:49:03 +02:00
Clyybber
72d6a9c885
Fix #16426 ( #18377 )
2021-06-28 17:41:37 +02:00
Clyybber
76f93877cd
Small parser loop fix ( #17904 )
...
* Fix loop on error with nim check in semiStmtList
* Add test
2021-04-30 17:17:29 +02:00
Timothee Cour
08262206d3
refs #15667 improve invalid indentation errors, report when & where = could be missing ( #16397 )
...
* refs #15667 improve invalid indentation errors
* also show line info where = is missing
* add test
* add more tests
2021-04-10 08:55:39 +02:00
Araq
f5b1e384a4
parser.nim: simply layout change
2021-03-30 10:29:50 +02:00
Arne Döring
159c06e045
unify tuple expressions ( #13793 )
...
* unify tuple expressions
* fix test
* fix test
* apply feedback
* Handle empty tuples
* Fix rendering named unary tuple
* Protect static NimNode against stripping
* Slightly less hacky
* Revert "Slightly less hacky"
This reverts commit 170c5aec0addc029f637afbc948700ca006b7942.
* Slightly less hacky
* Cleanup
* Fix test
* Fix another test
* Add condsym
* Rebase fallout
* changelog: Move from compiler changes to language changes
* Add stricter tests
* Add empty tuple example to doc/astspec
* Fix test
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-03-30 02:06:51 +02:00
Andreas Rumpf
5f5a92379f
custom integer literals ( #17489 )
...
* user defined integer literals; refs #17020
* updated renderer.nim
* use mlexerutils helper
* imported all test cases from https://github.com/nim-lang/Nim/pull/17020
* final grammar updated
2021-03-24 14:46:19 +01:00
Andreas Rumpf
6278b5d89a
new-style concepts implementation, WIP ( #15251 )
...
* fixes #15210 [backport:1.2]
* make tests green
* make ordinal work
* makes Swapable test compile
* make Indexable example work
* concepts: 'self' is now 'Self'
* concepts: make Dictionary example compile
* document the new concept implementation
* concepts: make typeDesc work properly
* concepts: allow documentation comments (d'oh)
2021-02-24 13:17:33 +01:00
hlaaftana
def1f99289
add finally as post expr block [backport:1.4] ( #16896 )
2021-02-01 20:14:20 +01:00
Timothee Cour
6e267d28b3
remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs ( #16861 )
...
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors
* simplify nimNoNilSeqs2
* simplify nimNoNilSeqs
* fixup
2021-01-29 14:30:24 +01:00
cooldome
00b495de95
Use modern enums in compiler ( #15775 )
2020-11-02 10:35:24 +01:00
Andreas Rumpf
92163fa330
implements https://github.com/nim-lang/RFCs/issues/258 ( #15503 )
...
* implements https://github.com/nim-lang/RFCs/issues/258
* don't be too strict with custom pragma blocks
* cast pragmas: documentation
* added most missing inference query procs to effecttraits.nim
2020-10-06 16:47:15 +02:00
Andreas Rumpf
7d8c1be8fb
parser hotfix: don't run into endless loops; regression ( #15468 )
2020-10-02 18:26:52 +02:00
Clyybber
1881fc5812
Fix #15305 ( #15311 )
...
* Fix #15305
* Fix test
2020-09-12 12:39:46 +01:00
Clyybber
f3552b86c1
Better semiStmtList parsing ( #15123 )
...
* Better semiStmtList parsing
* Add examples from forums and wiki
* Move parseIfExpr near parseIfOrWhen
* Update grammar
2020-09-09 07:36:31 +02:00
Clyybber
35ff17410f
Expand hoisted default params in sem ( #15270 )
...
* Expand hoisted default params in sem
Introduce ast.newTree{I,IT}
Add test for default params in procs
* Cleanup
* Simplify hoist transformation and expand test
2020-09-05 22:01:47 +02:00
Clyybber
13e659cfec
Big compiler Cleanup ( #14777 )
2020-08-28 22:18:09 +02:00
Andreas Rumpf
4ab6887a67
fixes #15111 ( #15136 )
2020-08-01 07:39:00 +02:00
Andreas Rumpf
da29222f86
init checks and 'out' parameters ( #14521 )
...
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Araq
45bc6954c5
improve the parser's error message
2020-06-19 10:50:39 +02:00
Andreas Rumpf
75e579ff8e
parser.nim: minor refactorings ( #14540 )
2020-06-01 19:04:28 +02:00
hlaaftana
de27910ab7
make from an operator ( #14241 )
2020-05-08 07:54:46 +02: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
Andreas Rumpf
fadbd8f70d
fixes #10665 ( #13141 ) [backport]
2020-01-14 13:51:28 +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
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Araq
6d8913ee14
nimpretty: fixes #11616
2019-07-18 12:13:22 +02:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +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
Araq
a59f0adc50
nimpretty: nimpretty now understands splitting newlines
2019-07-04 11:32:15 +02:00
Miran
f288e1b11a
[bugfix] fix #11469 , new rules for a newline in nimpretty ( #11512 )
...
* [bugfix] fix #11469 , new rules for a newline in nimpretty
* concatenate two lines if they have the same indentation level
2019-06-26 15:36:44 +02:00