static params: expr[T] is now static[T]
This introduces tyStatic and successfully bootstraps and handles few simple test cases. Static params within macros are no longer treated as PNimrodNodes - they are now equivalent to constants of the designated type.
This commit is contained in:
parent
7120491d05
commit
027f30610e
22 changed files with 135 additions and 110 deletions
|
|
@ -78,7 +78,7 @@ proc mapType(t: ast.PType): ptr libffi.TType =
|
|||
of tyFloat, tyFloat64: result = addr libffi.type_double
|
||||
of tyFloat32: result = addr libffi.type_float
|
||||
of tyVar, tyPointer, tyPtr, tyRef, tyCString, tySequence, tyString, tyExpr,
|
||||
tyStmt, tyTypeDesc, tyProc, tyArray, tyArrayConstr, tyNil:
|
||||
tyStmt, tyTypeDesc, tyProc, tyArray, tyArrayConstr, tyStatic, tyNil:
|
||||
result = addr libffi.type_pointer
|
||||
of tyDistinct:
|
||||
result = mapType(t.sons[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue