bugfix: c2nim: typedef a b;

This commit is contained in:
Andreas Rumpf
2010-07-21 22:09:50 +02:00
parent cdf03b06b9
commit 202d229fdf
4 changed files with 10 additions and 4 deletions

View File

@@ -583,6 +583,7 @@ proc otherTypeDef(p: var TParser, section, typ: PNode) =
name = skipIdent(p)
else:
# typedef typ name;
t = typ
name = skipIdent(p)
t = parseTypeSuffix(p, t)
addTypeDef(section, name, t)

View File

@@ -7,6 +7,9 @@
extern "C" {
#endif
typedef char gchar;
typedef unsigned int gunsignedint;
point* newPoint(void) {
for (int i = 0; i < 89; ++i) echo("test" " string " "concatenation");
for (; j < 54; j++) {}

View File

@@ -22,9 +22,9 @@ Welcome to Nimrod
import re
for x in lines("myfile.txt"):
if x =~ r"(\w+)=(.*)":
echo "Key: ", matches[1],
" Value: ", matches[2]
if x =~ re"(\w+)=(.*)":
echo "Key: ", matches[0],
" Value: ", matches[1]
**Nimrod** is a new statically typed, imperative
programming language, that supports procedural, object oriented, functional
@@ -93,7 +93,8 @@ Nimrod plays nice with others
Porting to other platforms is easy.
* **There are bindings to GTK2, the Windows API, the POSIX API, OpenGL, SDL,
Cario, Python, Lua, TCL, X11, libzip, PRCE, ODBC, libcurl, mySQL and SQLite.**
New bindings are easily generated in a semi-automatic way.
* A C to Nimrod conversion utility: New bindings to C libraries are easily
generated by ``c2nim``.
* A Pascal to Nimrod conversion utility: A large subset of Object Pascal
can be translated to Nimrod automatically!

View File

@@ -36,6 +36,7 @@ Additions
needs to be recompiled.
- Added ``system.reopen``.
- Added ``system.getCurrentException``.
- Added ``system.appType``.
- Added ``times.epochTime`` and ``times.cpuTime``.
- Implemented explicit type arguments for generics.
- Implemented implicit type arguments for generics.