Commit Graph

127 Commits

Author SHA1 Message Date
Araq
0cc662d8b8 fixes bootstrapping 2015-08-21 12:18:04 +02:00
Araq
695e2e970e implemented macros.getImpl 2015-08-21 02:34:34 +02:00
Dominik Picheta
b9c1dd0072 Fixed macros.nim not compiling.
Iterator aliases are not possible.
2015-08-03 18:42:02 +01:00
Dominik Picheta
303bc45745 Added documentation to macros.items. 2015-08-03 17:05:14 +01:00
Dominik Picheta
04dc46b1aa Merge branch 'macro-items' of https://github.com/transfuturist/Nim into transfuturist-macro-items 2015-08-03 17:03:57 +01:00
Araq
8913e82f45 removed macros.high as it never worked outside of macros.nim 2015-07-28 02:54:21 +02:00
Araq
83842ff4ed Nimrod -> Nim rename 2015-07-08 11:49:33 +02:00
Araq
b9ccd06013 fixes bootstrapping problem 2015-07-04 18:24:57 +02:00
transfuturist
558360e6fd Update macros.nim 2015-07-03 13:48:13 -07:00
Adam Strzelecki
1a0417fbe0 macros: Introduce sameType(a, b) for node types
Previously introduced node comparison `==` was working somehow wrong on nodes
returned from getType(a), comparing just ids of the symbols.

Recently introduced `==` change 47dce26886
started comparing symbol nodes pointer-wise, thus strictly. Since getType(a)
always creates new symbol pointing to the type, comparing two such nodes using
`==` always returns false, even they point to the same type.

That is why we need a new sameType macro to be able to tell if these nodes
point to the same type.
2015-07-03 11:11:10 +02:00
Araq
60ac5e3e76 fixes #3046 2015-07-03 10:55:50 +02:00
Araq
6b3abdba0f made macros.$ a bit smarter; but really this one needs to die 2015-07-03 01:57:01 +02:00
transfuturist
a31c36e98f Undeprecate children 2015-06-20 12:21:16 -07:00
transfuturist
bc2aaea853 Change check for NimNode items to node kind 2015-05-17 15:05:26 -07:00
Adam Strzelecki
1d47617d1b Macros: Introduce getType(t: typedesc): NimNode
Since typedesc are exception in macros and they are not implicitly converted to
NimNode on macro call, we need some means to perform such conversion on demand.

Fortunately it is as simple as declaring new magic "NGetType" proc with
typedesc parameter.

NOTE: Keeping actual macro exceptional behavior for typedesc is important,
since it allows passing typedesc macro parameter to other procs or macros
expecting type parameter. If typedesc parameter was implicitly converted, then
we would lost this ability.
2015-05-17 15:28:41 +02:00
transfuturist
3d80fcb8c6 Add value check for NimNode items 2015-05-16 17:50:01 -07:00
transfuturist
7500eed0cf Better solution: deprecation 2015-05-16 17:26:47 -07:00
transfuturist
939c0a6bb8 NimNode needs an items iterator to be used nicely in for statements 2015-05-16 10:52:44 -07:00
Araq
43eae0c113 macros: added bool literal support 2015-04-20 20:40:10 +02:00
Araq
2b4e233510 Merge branch 'devel' of https://github.com/Araq/Nim into devel 2015-04-20 11:44:54 +02:00
Araq
dc3a0bc009 added macros.newTree proc (why didn't we do this earlier?) 2015-04-20 11:34:18 +02:00
fowlmouth
f8917e8ad3 add ntys up to ntyNot 2015-03-28 03:19:48 -05:00
Araq
a541be8935 prepare for upcoming parsing change of unary operators 2015-03-22 09:31:15 +01:00
def
fd4e629905 Rename PNimrodNode to NimNode 2015-03-17 17:50:32 +01:00
Max Zerzouri
9c126282b2 interpret tuple as a class and tuple[] as the empty tuple
When the indentation syntax is allowed it is always interpreted as a
tuple:

type
  Unit = tuple
2015-03-06 12:20:15 +13:00
Chris Heller
0553758ebd Clone the implementation of cmpIgnoreStyle into macros.nim from typeinfo.nim so that we get rid of any imports in the core modules 2015-03-03 09:29:38 -08:00
Chris Heller
b54dfbce16 Remove use of .format() from macros.nim to avoid importing into core. There is still a remaining import of cmpIgnoreStyle from strutils that needs to be removed as well 2015-03-03 09:22:54 -08:00
Chris Heller
df7e388e0c Make macros.nim expectKind error message with a single TNimrodNodeKind consistent with error message shown with a set of TNimrodNodeKind by displaying the actual node kind (as well as the expected) 2015-03-02 17:02:43 -08:00
Araq
3bfcfeb0cf don't use stdout for nimsuggest server mode 2015-02-27 16:44:55 +01:00
Araq
975f33b01d disable deprecated warnings for macros module 2015-02-25 21:14:21 +01:00
Araq
752052e903 implements a type API for macros 2015-02-24 00:13:28 +01:00
Araq
1e6aef62ba macros.PNimrodNode is now NimNode 2015-02-24 00:13:27 +01:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Araq
10335fd726 fixed minor bugs; cleaned up tests 2015-02-12 14:56:56 +01:00
dumndummer
9a1be7a9f3 Update macros.nim
minor doc comment spelling correction
2015-02-02 17:57:31 +00:00
Mason McGill
a6ce70bd8d Added a few AST-construction shortcuts. 2015-01-27 11:48:14 -08:00
Dominik Picheta
acc80aaedc macros.$ can now turn a nnkSym into a string. 2014-12-28 15:23:05 +00:00
Araq
e27ab36731 implements 'defer' 2014-12-04 10:12:32 +01:00
Araq
b2f577df23 fixes #1473 2014-11-12 02:36:59 +01:00
Araq
adad2d5f4a Merge branch 'devel' into bigbreak
Conflicts:
	lib/impure/db_postgres.nim
	lib/pure/json.nim
	lib/pure/math.nim
	lib/system/atomics.nim
2014-11-03 11:42:36 +01:00
Grzegorz Adam Hankiewicz
aa1fb9a07e Adds stringification support for nnkPostfix nodes. 2014-10-11 00:53:26 +02:00
Araq
4523b29d7a Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
Araq
d05df2173b Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Araq
8f5bf06528 fixes #1450 2014-08-14 02:55:04 +02:00
Araq
472190bedc fixes #1085 2014-04-21 00:04:36 +02:00
Araq
e6d17e6273 made large parts of the stdlib gcsafe 2014-04-20 20:01:24 +02:00
Araq
3e25d5f247 merged better html links #850 2014-04-08 01:19:15 +02:00
Zahary Karadjov
e8c50640d7 failing test case preventing the use of --gc:v2: tsymchoicefield 2014-03-24 12:17:22 +02:00
Zahary Karadjov
862c0ef83d split the inline and closure iterators into different symbol kinds for easier discrimination between them 2014-03-06 21:57:35 +02:00