add-bool #22

Merged
sashakoshka merged 10 commits from add-bool into main 2025-10-14 23:19:17 -06:00
2 changed files with 3 additions and 0 deletions
Showing only changes of commit 770f6b05b4 - Show all commits

View File

@@ -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:

View File

@@ -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