summary refs log tree commit diff stats
path: root/compiler/evals.nim
Commit message (Collapse)AuthorAgeFilesLines
* lazy loading of body ast implementedAraq2011-10-301-6/+8
|
* eval context for macros lives as long as the current module is compiledAraq2011-10-281-15/+36
|
* 'bind' as a declarative statementAraq2011-10-101-1/+1
|
* slurp uses path; unidecode is improved and threadsafeAraq2011-10-081-19/+19
|
* Cleaned up the circular dependecies and remaining issuesZahary Karadjov2011-10-071-16/+64
| | | | Changed: The []= operator for strings and sequences is now capable of splicing
* Basic unit testing facilities (suites, fixtures, cases)Zahary Karadjov2011-10-071-3/+8
| | | | | | | | 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).
* getAst works correctly with existing AST values as template/macro argumentsZahary Karadjov2011-10-071-2/+51
|
* code generator supports constant sequences; more consistent compile time ↵Araq2011-10-071-9/+7
| | | | evaluation
* bugfix: internal error in evalFieldAccess; parseutils.interpolatedFragments ↵Araq2011-09-261-12/+16
| | | | optimized; tstringinterp.nim now works
* Moved the parseAST magics to evals.nimZahary Karadjov2011-09-201-1/+28
| | | | | | | | | | | | | | 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.
* Initial implementation of the parseExpr, parseStmt, getAst macro routines:Zahary Karadjov2011-09-201-1/+8
| | | | | | | | | | | | | | | | | | 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.
* small bugfix for evalAraq2011-08-191-1/+1
|
* finally got rid of nkPassAsOpenArrayAraq2011-08-161-1/+0
|
* preparation for new 'is' operator; breaks bootstrapping again, sorry (use ↵Araq2011-07-311-3/+3
| | | | generated C code)
* bugfixes; step one for 'var T' as return type supportAraq2011-07-281-2/+3
|
* implemented write access to s[i] for macrosAraq2011-06-211-19/+34
|
* newStringOfCap implemented and used to optimize some procsAraq2011-05-081-1/+7
|
* const table supportAraq2011-04-291-14/+19
|
* got rid of some arcane module namesAraq2011-04-211-1/+1
|
* big repo cleanupAraq2011-04-121-0/+1110