c2nim: bugfix: 'type x[10];' was not parsed properly
This commit is contained in:
parent
6a97bed6a7
commit
52e8b597e4
3 changed files with 3 additions and 6 deletions
|
|
@ -94,7 +94,7 @@ proc OpenParser(p: var TParser, filename: string,
|
||||||
new(p.tok)
|
new(p.tok)
|
||||||
|
|
||||||
proc parMessage(p: TParser, msg: TMsgKind, arg = "") =
|
proc parMessage(p: TParser, msg: TMsgKind, arg = "") =
|
||||||
#assert false
|
assert false
|
||||||
lexMessage(p.lex, msg, arg)
|
lexMessage(p.lex, msg, arg)
|
||||||
|
|
||||||
proc CloseParser(p: var TParser) = CloseLexer(p.lex)
|
proc CloseParser(p: var TParser) = CloseLexer(p.lex)
|
||||||
|
|
@ -930,10 +930,8 @@ proc declaration(p: var TParser): PNode =
|
||||||
parMessage(p, errTokenExpected, ";")
|
parMessage(p, errTokenExpected, ";")
|
||||||
if sonsLen(result.sons[pragmasPos]) == 0:
|
if sonsLen(result.sons[pragmasPos]) == 0:
|
||||||
result.sons[pragmasPos] = ast.emptyNode
|
result.sons[pragmasPos] = ast.emptyNode
|
||||||
of pxAsgn, pxSemicolon, pxComma:
|
|
||||||
result = parseVarDecl(p, baseTyp, rettyp, origName)
|
|
||||||
else:
|
else:
|
||||||
parMessage(p, errTokenExpected, ";")
|
result = parseVarDecl(p, baseTyp, rettyp, origName)
|
||||||
assert result != nil
|
assert result != nil
|
||||||
|
|
||||||
proc createConst(name, typ, val: PNode, p: TParser): PNode =
|
proc createConst(name, typ, val: PNode, p: TParser): PNode =
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ HWBType;
|
||||||
static HWBType *
|
static HWBType *
|
||||||
RGB_to_HWB (RGBType RGB, HWBType * HWB)
|
RGB_to_HWB (RGBType RGB, HWBType * HWB)
|
||||||
{
|
{
|
||||||
|
HWBType* myArray[20];
|
||||||
/*
|
/*
|
||||||
* RGB are each on [0, 1]. W and B are returned on [0, 1] and H is
|
* RGB are each on [0, 1]. W and B are returned on [0, 1] and H is
|
||||||
* returned on [0, 6]. Exception: H is returned UNDEFINED if W == 1 - B.
|
* returned on [0, 6]. Exception: H is returned UNDEFINED if W == 1 - B.
|
||||||
|
|
|
||||||
1
todo.txt
1
todo.txt
|
|
@ -3,7 +3,6 @@ version 0.8.14
|
||||||
|
|
||||||
- add critbits module to stdlib
|
- add critbits module to stdlib
|
||||||
- BUG: type TX = TTable[string, int]
|
- BUG: type TX = TTable[string, int]
|
||||||
- BUG: c2nim: int x[20];
|
|
||||||
- warning for implicit openArray -> varargs conversion
|
- warning for implicit openArray -> varargs conversion
|
||||||
- implement explicit varargs; **but** ``len(varargs)`` problem remains!
|
- implement explicit varargs; **but** ``len(varargs)`` problem remains!
|
||||||
--> solve by implicit conversion from varargs to openarray
|
--> solve by implicit conversion from varargs to openarray
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue