Andreas Rumpf
172e95be50
nimpretty: explicit --indent option; fixes #9502 ; refs #9510 [backport]
...
(cherry picked from commit d1fe195dcc )
2018-11-24 12:15:05 +01:00
Andreas Rumpf
7d88738068
parser/grammar sync; fixes #9608 [backport]
...
(cherry picked from commit 4e94f49065 )
2018-11-24 12:14:18 +01:00
Andreas Rumpf
06b1d17134
nimpretty: add #!nimpretty on/off directives
...
(cherry picked from commit f3c0703b7d )
2018-11-01 17:44:48 +01:00
Andreas Rumpf
754e11de3e
nimpretty: fixes #8626
...
(cherry picked from commit ed38079b9b )
2018-11-01 17:44:23 +01:00
Dheepak Krishnamurthy
ffeb3c6cec
Add checks for except: body blocks ( #9191 )
...
(cherry picked from commit 70018aa683 )
2018-11-01 17:25:30 +01:00
Andreas Rumpf
a622291be4
parser.nim: minor code style fix
2018-09-16 21:33:08 +02:00
Araq
5709736e82
Merge branch 'devel' into araq-better-docgen
2018-09-14 15:48:07 +02:00
Andreas Rumpf
f7d1902043
fixes merge conflicts
2018-09-11 17:27:47 +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
Andreas Rumpf
dae5450947
WIP: disallow 'nil' for strings and seqs
2018-08-13 11:41:33 +02:00
cooldome
ec02940185
Render bug: if expression with statement list expression as condition ( #8375 )
...
* Fixes #8348
2018-07-21 13:01:47 +02:00
Andreas Rumpf
2a3a128e36
Merge branch 'devel' into typedesc-reforms
2018-06-26 18:33:51 +02:00
Andreas Rumpf
dd81d9d5b7
nimpretty improvements
2018-06-19 09:42:33 +02:00
Andreas Rumpf
c70706f4bd
nimpretty: fixes pragma rendering
2018-06-17 14:15:42 +02:00
Zahary Karadjov
a49b06a52a
Implement the is operator for the new static and typedesc type classes
...
This also makes the first baby steps towards a sound treatment of
higher-order kinds (type type int).
Adds test cases showcasing the new features.
* Also fixes breakage after the rebase
2018-06-16 16:46:32 +03:00
Zahary Karadjov
fb27357b62
A minimal patch enabling the new typedesc and static types syntax
2018-06-16 16:46:32 +03:00
Andreas Rumpf
7819e63f77
nimpretty: more features
2018-06-16 09:53:36 +02:00
Andreas Rumpf
a1bd4a6cbd
nimpretty: first version that seems useful for others to test it
2018-06-16 01:46:39 +02:00
Andreas Rumpf
18a3833d60
more refactoring
2018-05-27 15:22:17 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Araq
2a7fc84c86
remove ast.emptyNode global; cleanup configuration.nim
2018-05-16 03:06:07 +02:00
Araq
02b78d3f94
make tests green again
2018-05-14 21:38:18 +02:00
Araq
5526252fa0
fixes testament compilation
2018-05-14 17:45:44 +02:00
Andreas Rumpf
61e57cfa13
big refactoring: parser compiles again
2018-05-10 10:49:51 +02:00
Zahary Karadjov
b0d85b0adf
Backwards-compatible support for keyword arguments in the command syntax
2018-05-07 09:37:49 +02:00
Andreas Rumpf
b7116a28ee
compiler refactoring, pass config around explicitly
2018-05-05 18:47:29 +02:00
Andreas Rumpf
1aa359febb
warn about inconsistent spacing around binary operators; fixes #7582
2018-05-05 14:58:33 +02:00
Andreas Rumpf
805402b294
fixes #7582
2018-05-05 14:17:31 +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
Araq
9bc963508f
nimpretty: next steps
2018-04-18 21:30:38 +02:00
Andreas Rumpf
a30b52eb64
fixes #7610
2018-04-14 15:44:05 +02:00
Andreas Rumpf
47335aab41
introduce nkTupleConstr AST node for unary tuple construction; breaking change
2018-04-13 17:45:58 +02:00
Oscar Nihlgård
d6793ded27
Fix parser bug with type classes ( #7480 )
2018-04-06 22:44:54 +02:00
Araq
212fdc5946
added the 'x.p[:T]' notation for explicit generic instantiations in combination with the ddot calling syntax
2018-04-06 22:05:57 +02:00
Araq
b0994c7f92
better error messages
2018-03-18 12:04:22 +01:00
Robert Hencke
ac10a3813a
Fix casing in rule 'typeDesc' ( #7324 )
...
Also, leave a note in grammar.txt that it is generated.
2018-03-12 09:27:36 +01:00
Andreas Rumpf
0495e6cf3a
steps to get for loops as expressions
2018-02-28 20:30:17 +01:00
Andreas Rumpf
2199f83280
improve error message for twrongcolon
2018-02-06 09:15:54 +01:00
Andreas Rumpf
cae5e33a4a
language change: 'generic' and 'atomic' are not keywords anymore
2017-11-21 11:27:35 +01:00
Fabian Keller
40a6caeed8
Block expressions ( #6695 )
...
* enabled parsing of block expressions
* added test case; closes #3827
* adjusted grammar doc strings
* updated grammar in docs
2017-11-06 20:33:01 +01:00
Araq
742f43e572
fixes #6609 ; 'if' expressions support multiple statements; minor breaking change
2017-11-05 01:26:04 +01:00
Andreas Rumpf
d52a1061b3
work in progress: new implementation for 'a[^1]'
2017-10-29 19:46:17 +01:00
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