Commit Graph

359 Commits

Author SHA1 Message Date
Zahary Karadjov
985113ee2a fix AST debug printing when line directives are enabled 2012-06-06 21:12:14 +03:00
Zahary Karadjov
db8dbab766 fix bootstrapping on POSIX platforms 2012-06-06 20:38:57 +03:00
Zahary Karadjov
d10b524c9a generate default destructors 2012-06-06 19:11:52 +03:00
Zahary Karadjov
4105a91c48 fix compilation errors when bootstrapping with C++ 2012-06-04 01:56:42 +03:00
Zahary Karadjov
bb850aafec codegen for C++ exceptions 2012-06-03 20:37:56 +03:00
Zahary Karadjov
3ce400bb00 bugfix: finally blocks were not executed when the except block is exited by raise or return 2012-06-03 18:00:45 +03:00
Zahary Karadjov
88f7b7bc50 Merge branch 'master' of github.com:Araq/Nimrod into upstream 2012-06-02 19:52:06 +03:00
Zahary Karadjov
a1da1f987b Added system.staticExec proc for executing external command at compile-time 2012-06-02 19:51:49 +03:00
Araq
04300542da fixes #127 2012-05-30 22:37:17 +02:00
Araq
b5d8e8bfaa '+=' etc for all floating point types 2012-05-29 00:42:28 +02:00
Araq
bb7a14fec0 bugfix: UFCS for templates (ttempl3.nim enhanced) 2012-05-27 16:22:48 +02:00
Araq
7a249eb8c1 bugfix: field names of tuples are treated consistently in the C backend 2012-05-27 14:57:12 +02:00
Zahary Karadjov
337e1ecc7c codegen for user-defined destructors 2012-05-25 19:02:14 +03:00
Araq
848c1b297f added system.||; lacks runtime support 2012-05-23 02:05:28 +02:00
Zahary Karadjov
4f45097f87 optional indentation for case statements
- preliminary support for try expressions  and case expressions
- allow do forms in assignments and return statements
2012-05-23 02:27:57 +03:00
Zahary Karadjov
b1574bb0e0 stand-alone except and finally blocks
This is equivalent to the on-error and at-scope-exit operators in other languages
2012-05-23 02:25:16 +03:00
Araq
15dd3a2251 fixes #109 2012-05-20 10:56:17 +02:00
Araq
e6019b6f98 fixes #103 2012-05-11 00:22:04 +02:00
Araq
8cf9b48ad4 thoughts about 'continue/break' bug 2012-05-10 23:26:38 +02:00
Araq
63326f19f0 fixes #111; however may introduce other problems 2012-05-10 08:21:06 +02:00
Araq
76235348f8 extracted documentation generator 2012-05-09 01:50:08 +02:00
Araq
c323ec0155 added system.getStackTrace; docgen refactoring (incomplete) 2012-05-06 01:16:36 +02:00
Araq
a41bf611a0 fixes binding of overloaded procs 2012-05-04 01:58:54 +02:00
Araq
28b68d914e rst parser does not support 'raw' directive per default (security risk) 2012-05-01 22:55:06 +02:00
Araq
e95f155af3 small bugfixes; documentation generator supports smilies for the forum 2012-05-01 11:14:29 +02:00
Araq
ce1138dfa7 some code formating 2012-04-26 01:16:50 +02:00
Araq
7511a05b27 resolved conflict for news.txt 2012-04-21 03:22:53 +02:00
Araq
4aba7421f5 GC with realtime support 2012-04-21 03:19:43 +02:00
Zahary Karadjov
251c44ff04 implicit generics types as return types. removed the error message for capturing incorrect uses of `proc` 2012-04-21 03:24:32 +03:00
Zahary Karadjov
2f4ae65917 produce errors on proc types with implicit empty param lists. 2012-04-20 22:32:36 +03:00
Zahary Karadjov
064f296213 allow the use of built-in type constraints in type sections 2012-04-20 22:28:53 +03:00
Zahary Karadjov
c1d16c5a4d made built-in types primary expressions to allow infix operators to be used with them 2012-04-20 21:35:59 +03:00
Zahary Karadjov
8319e2411d fixed incorrect C++ code generation for sequences. more revealing type names in the generated code 2012-04-18 19:50:32 +03:00
Zahary Karadjov
818787457d grammar: the built-in type classes are now valid expressions 2012-04-18 19:50:32 +03:00
Zahary Karadjov
38710b614f more Objective-C and C keywords are now escaped 2012-04-18 19:50:32 +03:00
Araq
cb79bf9f16 compiler finally supports 'object {.pragma.}' syntax 2012-04-16 23:40:08 +02:00
Araq
d4c2f2509c bugfix: 'error' statement pragma works as expected again 2012-04-16 17:23:44 +02:00
Araq
17d67ab828 fixes #105 2012-04-16 16:31:15 +02:00
Araq
da9ff288d9 Merge branch 'master' of github.com:Araq/Nimrod 2012-04-15 10:02:35 +02:00
Araq
959e370ae9 @ is a sigil-like operator 2012-04-15 10:02:15 +02:00
Zahary Karadjov
b2cc17cde4 Merge branch 'master' of github.com:Araq/Nimrod into upstream 2012-04-15 02:58:01 +03:00
Zahary Karadjov
57fe3e8c41 avoid duplicated variable names in unrolled loops 2012-04-15 02:53:32 +03:00
Zahary Karadjov
20d56875de fix threading tests 2012-04-15 02:52:09 +03:00
Zahary Karadjov
567b5b07ea fixes #20 properly 2012-04-15 01:06:40 +03:00
Zahary Karadjov
42e0b08214 fix the usage of definedInScope in pegs.=~
template `=~`*(s: string, pattern: TPeg): bool =
   when not definedInScope(matches):
      var matches: array[0..maxSubpatterns-1, string]

It seems that this never worked as intended.
I discovered it now, because when variables' names are preserved, multiple
variables named `matches` were created. The reason this happens is that
when the template is used as an if condition, the if scope is already entered,
but the variables end up in the outer scope.

This patch is consistent with how `expr` templates work, but makes the
definition of a variable injection template like := a bit harder, yet still possible.
(note that if foo := bar(): is still not creating properly scoped variable prior to the patch)
2012-04-14 13:32:51 +03:00
Zahary Karadjov
f25c638dc4 experimental support for preserving local variable names in the generated code 2012-04-13 21:03:49 +03:00
Araq
82813e58c4 Merge branch 'master' of github.com:Araq/Nimrod 2012-04-13 18:37:17 +02:00
Araq
fe750a5cf9 performance improvements for ropes 2012-04-13 18:36:55 +02:00
Zahary Karadjov
caf7878009 Proper C scopes for if, try and case statements
even thought the setjmp implementation for try statement won't be used in C++,
using properly scoped variables for them is beneficial, because we'll be able to
establish a 1:1 relation between nimrod scopes and C scopes.
Once we have that, we'll be able to keep the original names of local variables
to greatly improve the debugging experience (i.e. watch expressions and
hover tooltips will work).
2012-04-12 17:52:55 +03:00
Zahary Karadjov
d2b45dbe85 C variables are created in their enclosing block instead of their enclosing function 2012-04-12 14:12:32 +03:00