flywind
40b58a0a18
fix #11009 ( #14935 )
2020-07-09 09:57:35 +02:00
Juan Carlos
74d1f25010
Clean out oldast ( #14837 )
...
* Clean out old Deprecated CLI switch
* Update to remove --oldast CLI option
2020-06-30 10:01:25 +02:00
alaviss
77834f0fda
compiler/suggest: highlight squashed operators ( #11796 )
...
The operator fetching proc is greedy, so operators such as `%*` in
expression `%*{}` can't be highlighted.
This commit fixes that.
2020-04-20 11:54:53 +02:00
Timothee Cour
216fd59c44
make usage of foo is a user-defined error more informative ( #13833 )
2020-04-01 17:49:29 +02:00
Andy Davidoff
0f672378ab
fix .deprecated. object typedef crash ( #13643 )
...
* fix .deprecated. object typedef crash
* fixup a test that i don't understand
* disable the test rather than debug ci
2020-03-16 15:08:38 +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
alaviss
558ecd1ca6
compiler/suggest: add variable support to con ( #12569 )
...
This allows for the type of a variable to be retrieved.
2019-11-04 18:29:26 +01:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
narimiran
a9c7fb2fcc
fixes nimsuggest/#108: RangeError with d:release
2019-09-04 13:31:59 +02:00
Andreas Rumpf
b07694cd90
new gensym handling ( #11985 )
...
* new .gensym implementation
* make astspec test green again
* introduce a --useVersion switch to group compatibility switches
* fixes #10180
* fixes #11494
* fixes #11483
* object constructor fields and named parameters are also not gensym'ed
* disabled broken package
2019-08-23 16:15:02 +02:00
Araq
0e4a8bfb28
fixes 'unused module' feature for 32 bit builds of Nim for good [nobackport]
2019-08-09 16:38:10 +02:00
Andreas Rumpf
81ddc67785
[refactoring] compiler: simplified markUsed
2019-08-08 22:43:58 +02:00
Andreas Rumpf
04708742e7
fixes #11809
2019-08-08 21:41:05 +02:00
Andreas Rumpf
fbb0642e27
Merge branch 'devel' into araq-detect-unused-imports
2019-07-18 18:16:32 +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
4137a4dbf3
[feature] detect unused imports
2019-07-17 22:36:23 +02:00
Araq
cb3c3c306c
minor style changes
2019-07-11 00:28:20 +02:00
Araq
bd689849f2
nim styleChecker: implemented all the missing features (bugfix)
2019-07-10 00:29:58 +02:00
Arne Döring
b92fd30282
rename tyExpr/tyStmt to tyUntyped/tyTyped ( #11227 )
2019-05-11 10:11:08 +02:00
Clyybber
f18b3af9d4
Replace countup(x, y-1) with x ..< y
2019-05-07 12:32:05 +02:00
Arne Döring
35aab357e2
Less warnings in macros ( #10799 )
2019-03-11 19:21:39 +01:00
Andreas Rumpf
bf4e688ca3
make nimsuggest aware of tyOwned
2019-02-25 16:37:09 +01:00
Arne Döring
28394153ab
32 bit fixes ( #10608 )
2019-02-13 23:30:14 +01:00
alaviss
2fdf816332
compiler/[msgs, suggest]: improve highlighter accuracy ( #10496 )
...
Previously the compiler would generate suggestions based on the symbol
identifier length, but that might not reflect the actual representation
of it within the actual source code.
This commit implements a simple source scanner for the suggest module to
address the problem outlined above.
Fixes nim-lang/nimsuggest#24
2019-02-07 17:08:15 +01:00
alaviss
74a7b09412
suggest: quote operators and keywords on suggestion ( #10460 )
2019-01-28 09:29:49 +01:00
Neelesh Chandola
fb26b95f81
{.deprecated: msg.} now works for vars and lets ( #10234 )
2019-01-08 19:44:47 +01:00
Neelesh Chandola
9faad7591e
Deprecate gc v2 ( #10151 )
...
* Deprecate gc v2
* warnDeprecated now has custom messages
2019-01-01 13:50:48 +01:00
Neelesh Chandola
bcbe317d17
Before showing deprecated warning, check whether enum field was marked deprecated or the whole enum type ( #10135 )
2018-12-30 18:34:41 +01:00
Neelesh Chandola
cbbdcb2669
Show deprecation warning for fields of a deprecated enum ( #10112 )
...
* Show deprecation warning for fields of a deprecated enum
* Add test
2018-12-30 09:45:39 +01:00
Andreas Rumpf
cb4d810659
make Nim take roughly 100MB less RAM for bootstrapping via a new compiler switch -d:leanCompiler; useful for the Raberry PI
2018-11-07 18:36:52 +01:00
Araq
548fc778c9
.error for routines now can also have a custom error message; improve error message for 'nil' strings
2018-09-25 00:28:39 +02:00
Andreas Rumpf
86556ebfdb
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
2018-09-07 19:21:16 +02:00
Andreas Rumpf
ae0255ea67
make nimsuggest compile again
2018-08-23 17:36:24 +02:00
Araq
30597e643f
fixes merge conflict
2018-08-23 11:30:55 +02:00
Araq
64517445ea
even more strict isNil handling for strings/seqs in order to detect bugs
2018-08-22 12:35:46 +02:00
LemonBoy
cf20c4460c
More robust handling of deprecated pragmas ( #8696 )
...
Prevent `deprecated` annotations to "slip" up to the parent module and
warn about unsupported annotations.
Accidentally fixes #7867
2018-08-21 15:07:44 +02:00
Andreas Rumpf
826c1e2d78
incremental compilation: implemented basic replay logic
2018-06-02 09:41:27 +02:00
Andreas Rumpf
a5701d6b71
ensure compiler API doesn't import the RST engine
2018-05-29 08:22:09 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Andreas Rumpf
bf6c2c5ccf
preparations of making compiler/msgs.nim free of global variables
2018-05-17 15:21:22 +02:00
Araq
2a7fc84c86
remove ast.emptyNode global; cleanup configuration.nim
2018-05-16 03:06:07 +02:00
Andreas Rumpf
328e7a1005
options.nim: no global variables anymore
2018-05-13 17:52:21 +02:00
Andreas Rumpf
e4c088721a
make nimsuggest compile again
2018-05-13 09:53:00 +02:00
Andreas Rumpf
84bc04ba32
sigmatch compiles again
2018-05-11 18:04:11 +02:00
Andreas Rumpf
33b69f0ed0
refactoring: make FileIndex a distinct type; make line information an uint16; fixes #7654
2018-04-21 08:13:37 +02:00
Andreas Rumpf
212457f5e0
the .deprecated pragma for procs now supports a user-definable deprecation message
2018-02-02 12:53:38 +01:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
Andreas Rumpf
b414806e66
nimsuggest: suggest types in a type section
2017-03-14 11:21:35 +01:00
Andreas Rumpf
2430fc7d82
nimsuggest: special rule for 'of' completion in case statements
2017-03-10 14:42:11 +01:00
Andreas Rumpf
68181e6da2
nimsuggest: maxresults limit; fixed local symbol usages priorizations
2017-03-10 11:29:16 +01:00