Commit Graph

37 Commits

Author SHA1 Message Date
Zahary Karadjov
2f4ae65917 produce errors on proc types with implicit empty param lists. 2012-04-20 22:32:36 +03:00
Zahary Karadjov
c1d16c5a4d made built-in types primary expressions to allow infix operators to be used with them 2012-04-20 21:35:59 +03:00
Zahary Karadjov
818787457d grammar: the built-in type classes are now valid expressions 2012-04-18 19:50:32 +03:00
Araq
959e370ae9 @ is a sigil-like operator 2012-04-15 10:02:15 +02: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
70f5236d48 untyped proc/template/macro params default to expr 2012-03-20 17:44:30 +02:00
Araq
4da067691e implemented 'static'; macros do not work anymore 2012-03-15 00:28:28 +01:00
Araq
375c95d3ad bugfix: no need for arrows to be new token kinds 2012-02-12 18:56:36 +01: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
4cfc0462a4 bugfixes: tests are green again 2012-01-13 23:28:08 +01:00
Araq
c682a1da2b bugfix: invalid indentation for 'else' is detected; optional indentation for 'if' expressions 2012-01-13 14:59:58 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
4012517d6d bugfix: suggest feature 2011-12-22 20:15:02 +01:00
Araq
7fcbdc6d42 implemented 'let' statement 2011-11-29 17:27:48 +01:00
Araq
68be801f63 operator precedence changed: assignment like operators are supported; escaping of operators with \ is supported 2011-11-09 01:42:05 +01:00
Araq
93be594eca fix of recently introduced parsing bug 2011-11-02 19:04:40 +01:00
Araq
1f6725e59e small bugfixes to make more tests green 2011-11-02 02:28:18 +01:00
Araq
351e89e705 better code generation for constant aggregates 2011-11-02 00:55:29 +01: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
033e3dfc50 l-values are preserved modulo type distinction 2011-09-24 13:15:11 +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
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
6a8a409f1b preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code) 2011-07-31 00:21:32 +02:00
Araq
a6daf71520 old pointer deref operator completely removed 2011-07-23 20:19:05 +02:00
Araq
54021471e4 nicer error messages for used keywords as identifiers 2011-06-19 16:22:39 +02:00
Araq
d608e4d115 bugfix: empty object case branches produce an error 2011-06-19 16:13:31 +02:00
Araq
adbb48fbce bugfix: endless loop in parser; added sphinx wrapper 2011-06-14 12:05:36 +02:00
Araq
9207492bb9 lexer, parser cleanup; boehm gc for mac os x 2011-05-17 21:14:30 +02:00
Araq
6ff8752be5 cleaned up the tests; fixes #30; fixes #26 2011-05-01 20:11:55 +02:00
Araq
4ba4999bb7 slice support in system.nim; syntactic sugar for tables; cleanup of grammar/parser 2011-04-23 17:11:24 +02:00
Araq
05fee773ec parser got rid of cruft 2011-04-22 12:41:03 +02:00
Araq
8dda362fa6 slices are first class citizens 2011-04-22 10:53:43 +02:00
Araq
1985ac6995 grammar changes for table constructor: second part 2011-04-21 20:26:56 +02:00
Araq
f00072fd55 grammar changes for table constructor: first part 2011-04-21 19:47:10 +02:00
Araq
36c67455d4 got rid of some arcane module names 2011-04-21 00:54:44 +02:00