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 `:arf
--- ---
enum ro AffrontToGod:Int:4 enum ro AffrontToGod:Int:4
- bird0: - bird0
< )
28394 28394
9328 9328
398 398
9 9
> )
- bird1: - bird1
< (
23 23
932832 932832
398 398
2349 2349
> )
- bird2: - bird2
< (
1 1
2 2
3 3
4 4
> )
enum ro NamedColor:U32 enum ro NamedColor:U32
- red:<16711680> - red 16711680
- green:<65280> - green 65280
- blue:<255> - blue 255
enum ro ThisIsTerrible:Obj: enum ro ThisIsTerrible:Vector
- up
( (
.rw x:Int 0
.rw y:Int -1
) )
- up: - down
( (
.x:<0> 0
.y:<-1> 1
) )
- down: - left
( (
.x:<0> -1
.y:<1> 0
) )
- left: - right
( (
.x:<-1> 1
.y:<0> 0
)
- right:
(
.x:<1>
.y:<0>
) )
enum ro Weekday:Int enum ro Weekday:Int
- sunday - sunday

View File

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