Updated enum correct test case

This commit is contained in:
Sasha Koshka 2022-09-27 17:05:13 -04:00
parent 870a33f4c2
commit 38409db74b
2 changed files with 25 additions and 30 deletions

View File

@ -7,55 +7,51 @@ func TestEnum (test *testing.T) {
`:arf
---
enum ro AffrontToGod:Int:4
- bird0:
<
- bird0
)
28394
9328
398
9
>
- bird1:
<
)
- bird1
(
23
932832
398
2349
>
- bird2:
<
)
- bird2
(
1
2
3
4
>
)
enum ro NamedColor:U32
- red:<16711680>
- green:<65280>
- blue:<255>
enum ro ThisIsTerrible:Obj:
(
.rw x:Int
.rw y:Int
)
- up:
- red 16711680
- green 65280
- blue 255
enum ro ThisIsTerrible:Vector
- up
(
.x:<0>
.y:<-1>
0
-1
)
- down:
- down
(
.x:<0>
.y:<1>
0
1
)
- left:
- left
(
.x:<-1>
.y:<0>
-1
0
)
- right:
- right
(
.x:<1>
.y:<0>
1
0
)
enum ro Weekday:Int
- sunday

View File

@ -2,7 +2,6 @@ package parser
import "git.tebibyte.media/arf/arf/lexer"
import "git.tebibyte.media/arf/arf/infoerr"
import "git.tebibyte.media/arf/arf/types"
// parseType parses a type notation of the form Name, {Name}, etc.
func (parser *ParsingOperation) parseType () (what Type, err error) {