generate: Parse Bool type
This commit is contained in:
parent
2ee954e18f
commit
770f6b05b4
@ -132,6 +132,7 @@ func (this *parser) parseType() (Type, error) {
|
||||
case "Buffer": return TypeBuffer { }, this.Next()
|
||||
case "Table": return TypeTable { }, this.Next()
|
||||
case "Any": return TypeAny { }, this.Next()
|
||||
case "Bool": return TypeBool { }, this.Next()
|
||||
}
|
||||
return this.parseTypeNamed()
|
||||
case TokenLBracket:
|
||||
|
||||
@ -33,6 +33,7 @@ func TestParse(test *testing.T) {
|
||||
0x0000: Field { Name: "Name", Type: TypeString { } },
|
||||
0x0001: Field { Name: "Bio", Type: TypeString { } },
|
||||
0x0002: Field { Name: "Followers", Type: TypeInt { Bits: 32 } },
|
||||
0x0003: Field { Name: "Bouncy", Type: TypeBool { } },
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -61,6 +62,7 @@ func TestParse(test *testing.T) {
|
||||
0000 Name String,
|
||||
0001 Bio String,
|
||||
0002 Followers U32,
|
||||
0003 Bouncy Bool,
|
||||
}
|
||||
|
||||
Anything Any
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user