lots of small changes
This commit is contained in:
parent
c0c35839cc
commit
a5ecbf823f
85 changed files with 180 additions and 110 deletions
|
|
@ -252,7 +252,7 @@ template forwardPacketT*(typeName: expr): stmt {.dirty, immediate.} =
|
|||
proc `pack typeName`*(p: var typeName; s: PStream) =
|
||||
writeData(s, addr p, sizeof(p))
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
type
|
||||
SomeEnum = enum
|
||||
A = 0'i8,
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ template forwardPacketT*(typeName: untyped; underlyingType: untyped) {.dirty.} =
|
|||
#writeData(s, addr p, sizeof(p))
|
||||
buffer.write(underlyingType(ord))
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
type
|
||||
SomeEnum = enum
|
||||
A = 0'i8,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ macro `?`(a: untyped): untyped =
|
|||
result = ($a[1].ident)[0].lit
|
||||
## echo(?F,?a,?t,?t,?y)
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
macro foo(x: untyped) =
|
||||
result = newNimNode(nnkStmtList)
|
||||
result.add(newNimNode(nnkCall).und(!!"echo", "Hello thar".lit))
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ proc writeLEStr*(s: PStream, str: string) =
|
|||
s.write(str.len.int16)
|
||||
s.write(str)
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
var testStream = newStringStream()
|
||||
|
||||
testStream.writeLEStr("Hello")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue