bugfix: c2nim: typedef a b;
This commit is contained in:
parent
cdf03b06b9
commit
202d229fdf
4 changed files with 10 additions and 4 deletions
|
|
@ -583,6 +583,7 @@ proc otherTypeDef(p: var TParser, section, typ: PNode) =
|
||||||
name = skipIdent(p)
|
name = skipIdent(p)
|
||||||
else:
|
else:
|
||||||
# typedef typ name;
|
# typedef typ name;
|
||||||
|
t = typ
|
||||||
name = skipIdent(p)
|
name = skipIdent(p)
|
||||||
t = parseTypeSuffix(p, t)
|
t = parseTypeSuffix(p, t)
|
||||||
addTypeDef(section, name, t)
|
addTypeDef(section, name, t)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef char gchar;
|
||||||
|
typedef unsigned int gunsignedint;
|
||||||
|
|
||||||
point* newPoint(void) {
|
point* newPoint(void) {
|
||||||
for (int i = 0; i < 89; ++i) echo("test" " string " "concatenation");
|
for (int i = 0; i < 89; ++i) echo("test" " string " "concatenation");
|
||||||
for (; j < 54; j++) {}
|
for (; j < 54; j++) {}
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ Welcome to Nimrod
|
||||||
import re
|
import re
|
||||||
|
|
||||||
for x in lines("myfile.txt"):
|
for x in lines("myfile.txt"):
|
||||||
if x =~ r"(\w+)=(.*)":
|
if x =~ re"(\w+)=(.*)":
|
||||||
echo "Key: ", matches[1],
|
echo "Key: ", matches[0],
|
||||||
" Value: ", matches[2]
|
" Value: ", matches[1]
|
||||||
|
|
||||||
**Nimrod** is a new statically typed, imperative
|
**Nimrod** is a new statically typed, imperative
|
||||||
programming language, that supports procedural, object oriented, functional
|
programming language, that supports procedural, object oriented, functional
|
||||||
|
|
@ -93,7 +93,8 @@ Nimrod plays nice with others
|
||||||
Porting to other platforms is easy.
|
Porting to other platforms is easy.
|
||||||
* **There are bindings to GTK2, the Windows API, the POSIX API, OpenGL, SDL,
|
* **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.**
|
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
|
* A Pascal to Nimrod conversion utility: A large subset of Object Pascal
|
||||||
can be translated to Nimrod automatically!
|
can be translated to Nimrod automatically!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ Additions
|
||||||
needs to be recompiled.
|
needs to be recompiled.
|
||||||
- Added ``system.reopen``.
|
- Added ``system.reopen``.
|
||||||
- Added ``system.getCurrentException``.
|
- Added ``system.getCurrentException``.
|
||||||
|
- Added ``system.appType``.
|
||||||
- Added ``times.epochTime`` and ``times.cpuTime``.
|
- Added ``times.epochTime`` and ``times.cpuTime``.
|
||||||
- Implemented explicit type arguments for generics.
|
- Implemented explicit type arguments for generics.
|
||||||
- Implemented implicit type arguments for generics.
|
- Implemented implicit type arguments for generics.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue