Araq
e0092cfae6
Merge branch 'master' of github.com:Araq/Nimrod
2012-06-19 22:38:48 +02:00
Araq
f191059e56
somewhat working closures
2012-06-19 22:37:00 +02:00
Zahary Karadjov
e2d38a57ec
better support for unsigned integers.
2012-06-11 21:38:01 +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
848c1b297f
added system.||; lacks runtime support
2012-05-23 02:05:28 +02:00
Araq
15dd3a2251
fixes #109
2012-05-20 10:56:17 +02:00
Zahary Karadjov
efb53233cb
the foundations of a type traits module; better error messages for expr, typedesc and typeclasses params
2012-04-06 13:46:31 +03:00
Zahary Karadjov
6216046bc6
genSym support for hygienic macros and templates.
...
example:
template hygienic(val: expr) =
var `*x` = val
echo `*x`
*x was chosen as mnemonic for "opposite of public" and thus private
2012-03-26 04:36:26 +03:00
Araq
c25ffbf262
first steps for cleaner static/const distinction
2012-03-13 02:01:56 +01:00
Araq
ec0f982ed4
attempt to make tests green again
2012-03-11 01:46:37 +01:00
Zahary Karadjov
560a3bad28
`do' keyword in the grammar for lambda blocks
2012-02-10 14:50:35 +02:00
Araq
32b4192b3f
version 0.8.14
2012-02-09 01:18:33 +01:00
Araq
f3f3fc01aa
further steps for closure support; added 'system.rawProc', 'system.rawEnv'
2012-02-08 22:56:31 +01:00
Araq
78f4aacde9
pragma blocks; fixed line information issue with user defined assertions
2012-01-17 23:58:18 +01:00
Araq
071b1e3957
test t99bott.nim works now
2012-01-06 00:29:18 +01:00
Araq
4f1b89c30c
year 2012 for most copyright headers
2012-01-02 23:07:35 +01:00
Araq
2962ca7890
alias analysis as required for the code gen and the HLO
2011-12-08 23:21:08 +01:00
Araq
70cf34cbdc
'assert' is now implemented without compiler magic
2011-12-04 20:14:50 +01:00
Araq
7fcbdc6d42
implemented 'let' statement
2011-11-29 17:27:48 +01:00
Araq
04e5c6718e
proper error message when attempting to eval C'imported procs
2011-11-20 17:17:47 +01:00
Araq
72651de710
bugfix: 'when' sections in generic objects now work, so TThread[void] compiles
2011-11-20 16:13:03 +01:00
Araq
7819b84475
bugfixes: objects still invalid for constants; fixed a typo concerning 'high' in eval context
2011-11-15 23:03:14 +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
c517639155
lazy loading of body ast implemented
2011-10-30 20:53:04 +01: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
51e01879ba
'bind' as a declarative statement
2011-10-10 02:04:15 +02:00
Araq
e956abbadd
slurp uses path; unidecode is improved and threadsafe
2011-10-08 01:17:06 +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
Zahary Karadjov
eaeed1f846
getAst works correctly with existing AST values as template/macro arguments
2011-10-07 17:05:54 +03:00
Araq
42516c0086
code generator supports constant sequences; more consistent compile time evaluation
2011-10-07 09:02:08 +02:00
Araq
14968fba46
bugfix: internal error in evalFieldAccess; parseutils.interpolatedFragments optimized; tstringinterp.nim now works
2011-09-26 00:24:06 +02: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
Araq
ffefb736d9
small bugfix for eval
2011-08-19 09:07:23 +02:00
Araq
b0742c5b27
finally got rid of nkPassAsOpenArray
2011-08-16 08:56:53 +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
2f066395ba
bugfixes; step one for 'var T' as return type support
2011-07-28 00:53:52 +02:00
Araq
cfb107f346
implemented write access to s[i] for macros
2011-06-21 00:47:58 +02:00
Araq
d2e2d71d05
newStringOfCap implemented and used to optimize some procs
2011-05-08 17:38:34 +02:00
Araq
145fabeb67
const table support
2011-04-29 22:55:15 +02:00
Araq
36c67455d4
got rid of some arcane module names
2011-04-21 00:54:44 +02:00
Araq
cd292568d7
big repo cleanup
2011-04-12 01:13:42 +02:00