Commit graph

295 commits

Author SHA1 Message Date
Araq
1d14cb1ad8 next steps towards term rewriting macros; simple examples work 2012-08-30 22:55:32 +02:00
Araq
1786e30991 first steps towards term rewriting macros 2012-08-30 10:55:40 +02:00
Araq
b4844a189d parameter passing works the same for macros and templates; use callsite magic to access the invokation AST 2012-08-28 22:15:29 +02:00
Araq
6bcdb9c8f4 implemented generic templates 2012-08-27 01:59:14 +02:00
Araq
9a7f0cd851 bindSym suffices; no 'bind' for macros anymore 2012-08-25 01:34:50 +02:00
Araq
c7ba6f5eb6 implemented 'bind' for macros 2012-08-24 01:18:03 +02:00
Araq
da190876de next steps to hygienic templates 2012-08-20 08:44:17 +02:00
Araq
5e15dec175 first steps to make templates hygienic 2012-08-20 01:13:13 +02:00
Araq
51de278bd4 next steps for tyVarargs/tyOpenArray split 2012-08-14 08:44:26 +02:00
Araq
991b3096e8 made tests green again 2012-08-14 00:09:06 +02:00
Araq
244c14db0b top level closures should work; transf is not a pass anymore; next steps for first class iterator support 2012-08-13 17:07:49 +02:00
Araq
c7158af752 idetools: 'usages' and 'def' should work now; documented js backend 2012-08-05 12:33:23 +02:00
Araq
7d6500f1de idetools improvements; preparation of first class iterators; fixes #183 2012-08-02 23:14:38 +02:00
Araq
674c05f426 made compiler more robust for idetools; implemented idetools.usages 2012-07-30 23:07:19 +02:00
Araq
976c39cdc9 more improvements for idetools 2012-07-30 01:24:54 +02:00
Araq
b595fc8347 better error handling for better idetools support 2012-07-29 23:08:28 +02:00
Araq
2ff8d17369 added warning for confusing var declarations 2012-07-26 08:47:54 +02:00
Araq
39235e21f5 bugfixes for the symbol mangling; implements #129 2012-07-19 17:38:52 +02:00
Araq
8d99753d63 preparations for making 'closure' the default calling convention for proc types 2012-07-16 23:00:57 +02:00
Araq
049de0ef66 'addSon' for types deprecated for 'int literal type' analysis (3) 2012-07-09 20:04:19 +02:00
Araq
82b5e430cf 'addSon' for types deprecated for 'int literal type' analysis (2) 2012-07-09 08:22:55 +02:00
Araq
bb82e30508 bugfix: ha.echo should be accepted 2012-07-08 22:03:06 +02:00
Araq
b5d34242ca added proc annotations: macros invoked as pragmas 2012-06-26 01:00:32 +02:00
Araq
869a5aa90d doc2 improvements 2012-06-24 02:34:11 +02:00
Araq
7b4560337b bugfixes for closures 2012-06-21 08:46:56 +02:00
Araq
40339aac62 added another macro regression 2012-06-20 00:45:57 +02:00
Zahary Karadjov
ce933c90a4 destructor pragma 2012-06-07 03:32:40 +03:00
Zahary Karadjov
65970efd97 destructors for case values 2012-06-07 02:14:25 +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
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
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
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
cb79bf9f16 compiler finally supports 'object {.pragma.}' syntax 2012-04-16 23:40:08 +02:00
Zahary Karadjov
57fe3e8c41 avoid duplicated variable names in unrolled loops 2012-04-15 02:53:32 +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
Zahary Karadjov
98b7bdaa50 when expressions, proper rendering for nkDo and nkLambda and parser support for x.type and x.addr 2012-04-05 22:43:37 +03:00
Zahary Karadjov
3a5cf3d63a expr params implemented for procs; paving the way for type classes 2012-03-22 03:27:00 +02:00
Zahary Karadjov
e43f8d842b merged branch overloading-for-macros 2012-03-19 12:06:38 +02:00
Araq
be1154106a clean separation of PNimrodNode and tyExpr 2012-03-16 19:33:24 +01:00
Araq
4da067691e implemented 'static'; macros do not work anymore 2012-03-15 00:28:28 +01:00
Zahary Karadjov
c45b714dfb allowing multiple definitions of templates 2012-03-14 21:01:18 +02:00
Araq
e88123fb17 fixes #100 2012-03-10 12:43:04 +01:00
Araq
2c4a1dbc0c further steps for closure support 2012-02-08 09:10:59 +01:00
Araq
632aece191 further steps to closure support 2012-02-06 00:19:56 +01:00
Araq
e4a4588b48 small fixes for tests on windows 2012-01-31 00:05:25 +01:00