Commit Graph

118 Commits

Author SHA1 Message Date
Zahary Karadjov
2e5265bef5 experimental support for querying the type of expressions within macros
normalised the line endings of macros.nim (minor edits otherwise)
2012-10-03 01:59:50 +03:00
Araq
759b3201ad proc bodies can be expressions with a type 2012-09-22 22:43:36 +02:00
Araq
af7c92c003 term rewriting macros fully implemented; still buggy 2012-09-03 00:55:44 +02:00
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
b5b5e6e76d distinguish properly between nkOpen and nkClosedSymChoice 2012-08-26 02:47:17 +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
0171566c98 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +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
b4084df434 improved unsigned support 2012-07-14 14:03:13 +02:00
Araq
4fbba0a65a changed integer promotion rules; breaks bootstrapping and lots of code 2012-07-08 21:03:47 +02:00
Zahary Karadjov
b11fe5d0b4 more uint related fixes 2012-06-14 17:33:00 +03:00
Zahary Karadjov
e2d38a57ec better support for unsigned integers. 2012-06-11 21:38:01 +03:00
Dominik Picheta
2509c08d34 Marshal now works with nil strings. Timezone and tzname vars are not public any more in the times module. 2012-05-30 22:35:43 +01:00
Araq
f3980eb24a made tsequtils green again 2012-05-28 01:17:17 +02:00
Araq
848c1b297f added system.||; lacks runtime support 2012-05-23 02:05:28 +02:00
Zahary Karadjov
a72fe16f9d making tests green again 2012-03-20 14:44:23 +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
Araq
c25ffbf262 first steps for cleaner static/const distinction 2012-03-13 02:01:56 +01:00
Zahary Karadjov
f9876d379d unit test for #100
unittest: the check macro will print only the non-literal part of the checked expression
tests/run: added tunittests.nim as a single central executable where unittests could be added for quicker compilation/execution of the test suite
2012-03-10 17:26:34 +02:00
Dominik Picheta
2c1f90fc93 Fixed misspelling in lib/core/macros.nim 2012-02-25 15:12:13 +00:00
Zahary Karadjov
a3f16968a7 helper templates static, eval and emit for easier compile-time code evaluation 2012-02-24 16:25:50 +02:00
Zahary Karadjov
560a3bad28 `do' keyword in the grammar for lambda blocks 2012-02-10 14:50:35 +02:00
Araq
78f4aacde9 pragma blocks; fixed line information issue with user defined assertions 2012-01-17 23:58:18 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Zahary Karadjov
841d6b6aa9 fixed some recently introduced compilation errors in the standard library 2011-12-13 22:52:13 +02:00
Araq
7fcbdc6d42 implemented 'let' statement 2011-11-29 17:27:48 +01:00
Araq
e40bca47c5 fixes #60 2011-11-25 00:08:02 +01:00
Zahary Karadjov
b72480ec88 new kind of AST printer that prints indented trees
AST-to-string conversion procs renamed to repr, treeRepr and lispRepr for better consistency
new dumpTree and dumpLisp procs for quick AST inspection of arbitrary nimrod blocks
2011-11-04 04:56:40 +02:00
Araq
2d54b85089 compilation cache: tests now part of test suite 2011-10-27 23:25:34 +02:00
Araq
51e01879ba 'bind' as a declarative statement 2011-10-10 02:04:15 +02:00
Araq
c138cc36b4 new syntactic construct: a{i} 2011-10-08 02:14:42 +02:00
Zahary Karadjov
e3deb5b502 Cleaned up the circular dependecies and remaining issues
Changed: The []= operator for strings and sequences is now capable of splicing
2011-10-07 17:10:04 +03:00
Zahary Karadjov
22546c44d1 Basic unit testing facilities (suites, fixtures, cases)
Added: PNimrodNode.lineinfo for better error messages from macros
Added: seq.splice

For easier use from templates and macros, except stament now supports
the list of exception types to be supplied in nkBraket node (array literal).
2011-10-07 17:07:18 +03:00
Araq
14968fba46 bugfix: internal error in evalFieldAccess; parseutils.interpolatedFragments optimized; tstringinterp.nim now works 2011-09-26 00:24:06 +02:00
Araq
98e5beb936 got rid of akPureObject 2011-09-24 10:57:35 +02:00
Araq
6023e994fb beginning of a taint mode; type system enhancements 2011-09-24 00:46:41 +02:00
Zahary Karadjov
91351e5996 Initial implementation of the parseExpr, parseStmt, getAst macro routines:
proc parseExpr*(s: string) : expr {.magic: "ParseExprToAst".}
  ## Compiles the passed string to its AST representation
  ## Expects a single expression

proc parseStmt*(s: string) : stmt {.magic: "ParseStmtToAst".}
  ## Compiles the passed string to its AST representation
  ## Expects one or more statements

proc getAst*(macroOrTemplate: expr): expr {.magic: "ExpandMacroToAst".}
  ## Obtains the AST nodes returned from a macro or template invocation
  ## example:
  ## macro FooMacro() = 
  ##   var ast = getAst(BarTemplate())

Handling of the node.toYaml magic moved to the evaluation engine.
2011-09-20 14:13:45 +03:00
Zahary Karadjov
d541815e4b Added AST introspection routines as a part of the standard library 2011-09-20 14:13:45 +03:00
Araq
fd62116f6e bugfixes for generics; new threads implementation still broken 2011-09-20 00:56:48 +02:00
Araq
4839800c22 new actors implementation for nimrod; compiler's generics still not up for the task though 2011-08-29 01:14:26 +02:00
Araq
d560e84fcc locks now in their own core module 2011-08-20 00:24:02 +02:00
Araq
b0742c5b27 finally got rid of nkPassAsOpenArray 2011-08-16 08:56:53 +02:00
Araq
5b96eaa953 preparations for 0.8.12 2011-07-10 15:48:13 +02:00
Araq
3091bc4958 importCompilerProc pragma introduced because the hacks for typeinfo.nim did not suffice 2011-06-27 08:33:03 +02:00
Araq
990dc2d715 code gen bugfixes; marshal.nim implemented 2011-06-26 17:21:52 +02:00
Araq
9365cb710e fixed typos in typeinfo.nim 2011-06-12 00:46:04 +02:00