Commit Graph

18917 Commits

Author SHA1 Message Date
Andrei Formiga
c439ef2e71 Fix issue #4001: invalid pragma {. hint[]: off .}
The bug was in processNote, module pragmas. The code assumed that
a nkBracketExpr AST node always had two children (without testing
this), and tried to access elements with index 0 and 1 in the sons
array of the nkBracketExpr node.

The code that triggered the bug was just {. hint[]: off .}
by itself in a module; in this case the nkBracketExpr has only
one children in the sons array, so the code in processNote caused
an out-of-bounds array access.

This commit also adds a test to guarantee that this pragma is
rejected, as is.
2016-05-27 19:03:15 -03:00
Andreas Rumpf
51c62a211b remove funny debug output 2016-05-27 21:25:13 +02:00
Andreas Rumpf
8f43e9d18c fixes #4225 2016-05-27 19:35:48 +02:00
Andreas Rumpf
6d76df8454 fixes #4227 2016-05-27 19:18:08 +02:00
Andreas Rumpf
6ff66bfd51 improve error messages for mismatched templates involving 'untyped' and stmts 2016-05-27 19:18:08 +02:00
Andreas Rumpf
04df004cd1 Merge pull request #4229 from moigagoo/patch-2
Stdlib: nre: Add `export options`
2016-05-27 17:27:48 +02:00
Konstantin Molchanov
4006e0b8b7 Stdlib: nre: Add export options
This should make `nre` more user friendly. See https://github.com/nim-lang/Nim/issues/4158
2016-05-27 15:27:35 +04:00
Andreas Rumpf
4476226b80 Merge pull request #4226 from cheatfate/tables_templates
Introduce template withValue() for tables.nim too.
2016-05-27 11:20:46 +02:00
cheatfate
49c50e4e21 Introduce template withValue() for tables.nim too. 2016-05-27 01:00:05 +03:00
Andreas Rumpf
d2ddeb47c5 Merge pull request #4224 from cheatfate/sharedtables_templates
Introduce template withValue()
2016-05-26 16:23:54 +02:00
cheatfate
a2393d0593 Introduce template withValue() 2016-05-26 15:32:14 +03:00
Andreas Rumpf
301d39b882 Merge pull request #4130 from lihf8515/devel
Update parsecfg.nim
2016-05-26 10:51:10 +02:00
Andreas Rumpf
d11a1a68fd Merge pull request #4223 from yglukhov/fix-4222
Fixes #4222
2016-05-26 10:43:25 +02:00
Yuriy Glukhov
4d0d2d69f3 Fixes #4222 2016-05-26 08:49:56 +03:00
Andreas Rumpf
ea0dff3783 Merge pull request #4216 from Parashurama/fix_4212
fixes issue 4212 && add test for various valid zero floats.
2016-05-25 17:11:57 +02:00
Andreas Rumpf
2bc6acd0ed gc:stack compiles with --threads:on 2016-05-25 12:04:27 +02:00
Parashurama
4716034a7f fixes issue 4212 && add test for various valid zero floats. 2016-05-25 11:57:09 +02:00
Andreas Rumpf
ad70fb4ffe Merge pull request #4213 from oderwat/nimphpext-stack-gc
Made nimphpext work with gc:stack.
2016-05-25 02:55:24 +02:00
Andreas Rumpf
58ac5b8065 Merge pull request #4201 from oderwat/oderwat-gitignores
Extending .gitignore to skip common IDE files and directories
2016-05-25 02:31:53 +02:00
Hans Raaf
5385798838 Made nimphpext work with gc:stack. 2016-05-25 02:25:48 +02:00
Andreas Rumpf
835bd9aef2 fixes #4212 2016-05-25 01:10:31 +02:00
Andreas Rumpf
bcc91a319c Nimscript knows about the command line defines 2016-05-24 23:35:39 +02:00
Andreas Rumpf
749abfc39c Merge pull request #4208 from cheatfate/osproc2
Make waitForExit() to use timeout.
2016-05-24 21:30:49 +02:00
Andreas Rumpf
fc4038fade allow to check verbosity level via compileOption 2016-05-24 20:25:37 +02:00
cheatfate
d4f3db3bd0 Resolve bugs 2016-05-24 01:37:31 +03:00
Andreas Rumpf
fcb5cdcc9f Merge pull request #4083 from vegansk/vm_readfile
Add ``readFile`` implementation for nimvm
2016-05-24 00:09:54 +02:00
Andreas Rumpf
e00f15aa2a Nim check defines 'nimcheck' conditional symbol 2016-05-24 00:07:59 +02:00
cheatfate
b27ee842d4 Resolve #4200
Resolve [Deprecated] warning for raiseOsError at line 878
2016-05-24 00:33:05 +03:00
Dominik Picheta
8b7d52a734 Merge pull request #4203 from def-/torationaloverflow
Fix toRational overflow by calculating internally with int64s (fixes #4194)
2016-05-23 13:52:53 +01:00
Andreas Rumpf
55ec99b70b new GC listens to GC_ref/GC_unref 2016-05-23 12:54:01 +02:00
Andreas Rumpf
9b609b26ca GC v2 compiles again 2016-05-23 12:53:17 +02:00
def
834ad57d94 Fix toRational overflow by calculating internally with int64s (fixes #4194) 2016-05-22 18:09:55 +02:00
Andreas Rumpf
6dd0887009 Merge pull request #4199 from oderwat/oderwat-fix-pragmas
Fixing pragmas (so syntax highligthing works).
2016-05-22 15:23:21 +02:00
Andreas Rumpf
2ecf4633f4 Merge branch 'prim-gc' into devel 2016-05-22 15:01:36 +02:00
Andreas Rumpf
dcf830bba9 fixes #3184 2016-05-22 14:28:53 +02:00
Hans Raaf
5263d9d6f0 Added .*/, ~* and *.log to GIT ignore list.
Using differend IDEs for the Nim compiler I am constantly running
into the problem that my global .gitignore is not working for the Nim
directory. This is caused by the `*` / `!*.*` like rules, which
reset all other rules. So I thought a bit about a sensible filtering
of common IDE special files and added that to the .gitignore.
2016-05-21 14:03:43 +02:00
Andreas Rumpf
ec7d556c20 Merge pull request #4191 from nigredo-tori/fix_tojsstr
Fix toJSStr for control characters
2016-05-20 20:37:00 +02:00
Hans Raaf
38b7581a28 Fixing pragmas (so syntax highligting works). 2016-05-20 20:26:20 +02:00
Dmitry Polienko
55c3b1444d Slightly better test case
Tests identity rather than exact output.
2016-05-20 16:03:08 +06:00
nigredo-tori
85c41a1398 Fix toJSStr for control characters
fixes #4190
Add leading zero to encoded character if it is less than 0x10
2016-05-20 12:35:34 +06:00
Andreas Rumpf
268f25225a Merge pull request #4187 from Lompik/devel
Remove spurious semicolon in type definition
2016-05-20 00:57:03 +02:00
Andreas Rumpf
366a0df490 Merge pull request #4188 from Parashurama/improve_float_parsing
fixes some issues with underscores in float literals. add more tests.
2016-05-20 00:56:51 +02:00
Andreas Rumpf
a263f1dc62 Merge pull request #4185 from yglukhov/fixup-4066
4066 fixup
2016-05-20 00:56:07 +02:00
Andreas Rumpf
287eb8802f Merge pull request #4068 from yglukhov/fix-4066
Added test for #4066
2016-05-19 23:53:40 +02:00
Parashurama
5d7d8816e5 fixes some issues with underscores in float literals. add more tests.
fixes some potential issues with underscores in float literals.
adds more checks for badly positionned underscores in float literals.
adds more test files.
2016-05-19 21:03:22 +02:00
Stephane Fontaine
f12fc1140d Remove spurious semicolon in type definition 2016-05-19 19:58:17 +04:00
Yuriy Glukhov
0d5c8b32e7 4066 fixup 2016-05-19 12:34:18 +03:00
Yuriy Glukhov
f46d40cb37 Added a test case 2016-05-18 13:51:07 +03:00
Dominik Picheta
d3e9589b3d Merge pull request #4180 from cheatfate/callsoon2
Resolve bugs with `deep recursion` of asyncdispatch.
2016-05-18 11:45:56 +01:00
Andreas Rumpf
9fd2d6ff5a Merge pull request #4182 from Parashurama/fix_issue_4181
fix issue #4181. add testcase.
2016-05-18 12:42:43 +02:00