c2nim tool added
This commit is contained in:
parent
c441cdb64c
commit
d10973adb0
28 changed files with 3498 additions and 66 deletions
16
tests/accept/compile/tenum3.nim
Normal file
16
tests/accept/compile/tenum3.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Test enum with explicit size
|
||||
|
||||
type
|
||||
TEnumHole {.size: sizeof(int).} = enum
|
||||
eA = 0,
|
||||
eB = 4,
|
||||
eC = 5
|
||||
|
||||
var
|
||||
e: TEnumHole = eB
|
||||
|
||||
case e
|
||||
of eA: echo "A"
|
||||
of eB: echo "B"
|
||||
of eC: echo "C"
|
||||
|
||||
|
|
@ -3,6 +3,7 @@ tambsym2.nim;7
|
|||
tambsys.nim;
|
||||
tarray.nim;10012
|
||||
tarray2.nim;[16, 25, 36]
|
||||
tarray3.nim;3
|
||||
tassert.nim;assertion failure!this shall be always written
|
||||
tbind1.nim;3
|
||||
tbind3.nim;1
|
||||
|
|
|
|||
|
7
tests/accept/run/tarray3.nim
Normal file
7
tests/accept/run/tarray3.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# simple check for two dimensional arrays
|
||||
|
||||
const
|
||||
myData = [[1,2,3], [4, 5, 6]]
|
||||
|
||||
echo myData[0][2] #OUT 3
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue