Commit Graph

222 Commits

Author SHA1 Message Date
Araq
cacb200eff fixes #2 2011-11-02 02:47:34 +01:00
Araq
77222b2aad fixes #59 2011-11-02 02:36:01 +01:00
Araq
1f6725e59e small bugfixes to make more tests green 2011-11-02 02:28:18 +01:00
Araq
84c473a890 DLL generation may work again 2011-11-02 01:25:17 +01:00
dom96
e1a82987af Fixed the tester. Some fixes and additions for the JS backend. 2011-10-31 15:39:01 +00:00
Araq
c517639155 lazy loading of body ast implemented 2011-10-30 20:53:04 +01:00
Araq
22115a2c6a splicing tested and documented 2011-10-28 17:57:58 +02:00
Araq
a0a8934a4f eval context for macros lives as long as the current module is compiled 2011-10-28 01:38:41 +02:00
Araq
2d54b85089 compilation cache: tests now part of test suite 2011-10-27 23:25:34 +02:00
Araq
9fb36bd20c compilation cache: mostly working; generics not yet 2011-10-25 15:26:36 +02:00
Araq
dce8d3d1ab rod files: next trivial examples working 2011-10-22 22:49:51 +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
Araq
e956abbadd slurp uses path; unidecode is improved and threadsafe 2011-10-08 01:17:06 +02: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
42516c0086 code generator supports constant sequences; more consistent compile time evaluation 2011-10-07 09:02:08 +02:00
Araq
da6046dcba bugfix: overloading resolution for typeof 2011-09-27 00:27:51 +02:00
Araq
7c34357856 bugfix: $ escaping in interpolatedFragments 2011-09-26 07:45:33 +02:00
Araq
14968fba46 bugfix: internal error in evalFieldAccess; parseutils.interpolatedFragments optimized; tstringinterp.nim now works 2011-09-26 00:24:06 +02:00
Araq
485c371942 renamed optional to discardable 2011-09-24 19:18:08 +02:00
Araq
72ceda98cb implemented optional pragma for implicit discard 2011-09-24 13:55:24 +02:00
Araq
92543a3037 more fixes to get rid of tyPureObject 2011-09-24 11:50:46 +02:00
Araq
2359b8b107 fixed some newly introduced bugs 2011-09-21 00:54:13 +02:00
Zahary Karadjov
9acfc43119 using statement (ala C#) implemented as macro (added as test).
simplified the usage of the interpolatedFragments iterator.
2011-09-20 14:13:45 +03:00
Zahary Karadjov
dbcca9b3b9 Moved the parseAST magics to evals.nim
Added string interpolation helper routines in parserutils

Added a proof-of-concept string interpolation user-land macros (currently, only as a test case):
  the interpolated expression could either be transformed to
  concat("literal string ", $(interpolated), " end") or
  "literal string $1 end" % [$(interpolated)]

Added a very initial definition of Optional[T] generic type

A new overload of ParseIdent was added in hope to get around the fact that the 
old one doesn't work correctly in macros, but the problem persists.
2011-09-20 14:13:45 +03: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
5112677904 attempt to fix tester.nim file handle leak 2011-08-29 01:13:38 +02:00
Araq
dd190a5c01 more occurences of 'pure' proc pragma fixed 2011-08-20 01:01:46 +02:00
Araq
d560e84fcc locks now in their own core module 2011-08-20 00:24:02 +02:00
Araq
ffefb736d9 small bugfix for eval 2011-08-19 09:07:23 +02:00
Araq
257b16ca34 inlining of 'var openarray' iterators now work 2011-08-18 18:52:05 +02:00
Araq
2183bf77a6 added xmltree.innerText; fixes #49 2011-08-15 19:40:00 +02:00
Araq
d5dd4669df further tests for var T result type; ttables test now fails :-( 2011-08-10 01:16:32 +02:00
Araq
72e7a98543 added system.slurp for easy embedding of resources 2011-08-10 00:43:58 +02:00
Araq
7000cf51b7 modifyable results for generics; teventemitter works 2011-08-09 01:40:12 +02:00
Araq
12f22ba68a fixes #35, fixes #43 2011-08-08 01:15:09 +02:00
Araq
cb21fd4f8f json code generation works again 2011-08-07 23:54:03 +02:00
Araq
5131b3cea4 support for C++ code generation; importcpp and importobjc pragmas 2011-08-07 21:02:09 +02:00
Araq
7a6140e3a4 fixes #42 2011-08-04 19:47:35 +02:00
Araq
f0145ba7c5 anonymous procs implemented; however no closure support yet 2011-08-01 08:39:27 +02:00
Araq
dd99fe61c0 documentation for 'var T' as return type 2011-08-01 00:21:16 +02:00
Araq
3e806a374a 'var T' for iterators 2011-07-31 22:39:17 +02:00
Araq
4f7fa05911 void type improvements; documentation improvements 2011-07-31 14:57:38 +02:00
Araq
00da785f5d void type for generics 2011-07-31 01:11:34 +02:00
Araq
05cffb9370 'is' operator for generic code 2011-07-31 00:55:30 +02:00
Araq
6a8a409f1b preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code) 2011-07-31 00:21:32 +02:00
Araq
086f0d34db Merge branch 'master' of git@github.com:Araq/Nimrod 2011-07-30 10:43:05 +02:00
Araq
6781da5215 bugfix: forwarding of generic procs now works 2011-07-30 10:42:51 +02:00
Keita Haga
174a711d86 tests/tester.nim: HTML-encode the expected results and actual results before writing them out 2011-07-30 03:23:08 +09:00