mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
bugfix: c2nim: typedef a b;
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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++) {}
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user