Commit Graph

186 Commits

Author SHA1 Message Date
Andrey Makarov
554fe8f88f conservative approach to fix #15184 (#16723) 2021-01-15 00:53:36 +01:00
sherbst
552075d10e Fix typo in lexer.nim (#15876) 2020-11-07 15:58:49 +01:00
cooldome
00b495de95 Use modern enums in compiler (#15775) 2020-11-02 10:35:24 +01:00
Clyybber
f20e485827 Fix commentOffsetA for doc comments (#15643) 2020-10-20 01:19:49 +02:00
Andreas Rumpf
992952d868 nimpretty: do not produce 'line too long' messages (#15541) 2020-10-10 17:46:22 +02:00
Araq
0ac74ddd74 fixes a regression 2020-10-08 11:43:18 +02:00
Clyybber
13e659cfec Big compiler Cleanup (#14777) 2020-08-28 22:18:09 +02:00
Juan Carlos
c3459c7b14 Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763) 2020-06-23 11:22:07 +02:00
hlaaftana
de27910ab7 make from an operator (#14241) 2020-05-08 07:54:46 +02:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* Error -> Defect for defects

The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.

With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02: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
Arne Döring
a562de2d91 squashed and merged with devel 2019-08-21 19:24:36 +02:00
Miran
75baaa5e25 nim check, fix #11927, no more empty strings (#11979) 2019-08-19 22:25:21 +02:00
Araq
cb3c3c306c minor style changes 2019-07-11 00:28:20 +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
bd689849f2 nim styleChecker: implemented all the missing features (bugfix) 2019-07-10 00:29:58 +02:00
Araq
fc34193483 nimpretty: code cleanups 2019-07-09 11:38:01 +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
Kaushal Modi
a4c613c110 [other] Improve the "tabs are not allowed" error message (#11554) 2019-06-20 22:16:06 +02:00
Araq
af39f26a3a [bugfix] nimpretty: fixes #11468 2019-06-13 10:42:37 +02:00
Arne Döring
c7e1c665a1 [refactoring] refactor the compiler and stdlib to deprecation warnings (#11419) 2019-06-11 16:49:56 +02:00
Arne Döring
88b5dd3362 right shift is now by default sign preserving (#11322)
* right shift is now by default sign preserving
* fix hashString and semfold
* enable arithmetic shift right globally for CI
* fix typo
* remove xxx
* use oldShiftRight as flag
* apply feedback
* add changelog entry
2019-05-29 16:48:00 +02:00
Oscar Nihlgård
3a06022071 Enable range checking for unsigned integers (#11313)
* Enable range checking for unsigned integers

* Make the tests green
2019-05-25 20:48:13 +02:00
Arne Döring
1102b8ac6e StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746) 2019-02-28 22:57:57 +01:00
Araq
2e880c726b fixes a lexer regression for 'nimble check' 2019-02-05 15:40:03 +01:00
Araq
23c11987b4 make the lexer more forgiving so that nim-regex compiles again 2019-02-04 15:59:18 +01:00
Oscar Nihlgård
9a003bae06 Fix error lexer error messages for to large numbers (#10394) 2019-01-21 15:14:38 +01:00
Timothee Cour
4233046e3f make hex digit error msg more helpful (#9727) 2018-11-16 13:09:19 +01:00
Andreas Rumpf
8a357c270b parser change: 'not' is always a unary operator; fixes #9574 2018-11-07 21:17:52 +01:00
Araq
87d60b2a4b nimpretty: fixes #9500 2018-10-25 11:48:06 +02:00
Araq
06a6433db7 nimpretty: test for idempotence; fixes #9483 2018-10-24 15:19:29 +02:00
Araq
3ee53a7c8e nimpretty: fixes #8078 2018-10-24 00:59:57 +02:00
Araq
e3a0415650 nimpretty: fixes #9398 2018-10-24 00:53:41 +02:00
Araq
695074214b nimpretty: minor bug fix 2018-10-23 17:52:18 +02:00
Oscar Nihlgård
16c3d4332f Fix infinite loop with nim check (#9448) 2018-10-22 17:24:14 +02:00
Oscar Nihlgård
163e9de3c2 Unicode escape in string literals (#9390) 2018-10-17 00:14:22 +02:00
Andreas Rumpf
f3c0703b7d nimpretty: add #!nimpretty on/off directives 2018-10-16 16:55:04 +02:00
Andreas Rumpf
89ba0f8592 nimpretty: render r-strings properly, fixes #9236 2018-10-16 13:33:14 +02:00
Andreas Rumpf
86556ebfdb compiler refactoring; use typesafe path handing; docgen: render symbols between modules 2018-09-07 19:21:16 +02:00
cooldome
c033ff990a Renderer bug fixes (#8804)
Fixes #8763: render bug: pure enums not handled correctly
Fixes #8762: render bug: binary operators called with quotes rendered incorrectly
FIxes #8761: render bug: inversion of operator priorities
2018-09-07 01:52:42 +02:00
Iván Montes
e66d9c9381 Cosmetic: fix typo on TRIPLESTR_LIT (#8663) 2018-08-21 22:17:19 +02:00
Vindaar
681d8e0749 Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
2018-07-03 01:56:36 +02:00
Vindaar
cc7479b70f improve error message if literal ends with an underscore (#8114) 2018-06-28 00:33:15 +02:00
Hiroki Noda
a85493610c Lexer: do not accept some invalid integer literals (#8089)
* Lexer: do not accept some invalid integer literals

* Use Natural instead of uint, and result variable
2018-06-27 17:07:26 +02:00
Andreas Rumpf
dd81d9d5b7 nimpretty improvements 2018-06-19 09:42:33 +02:00
Andreas Rumpf
a1bd4a6cbd nimpretty: first version that seems useful for others to test it 2018-06-16 01:46:39 +02:00
Araq
8e9551b1c7 fixex merge conflicts 2018-06-08 19:50:36 +02:00
Oscar Nihlgård
fd28236368 Multi byte characters should not be treated as part of an operator 2018-06-03 09:05:50 +02:00
Andreas Rumpf
c640bd2d1b cleanup compiler/prettybase to not use redudant global variables 2018-05-27 22:52:10 +02:00