Compare commits

..

No commits in common. "419c3651bf26d20cc9de7433ae27bc1e219cfed7" and "b7bdaba69418ba0e7e169f697d5d47bde6c3cd2e" have entirely different histories.

4 changed files with 1 additions and 11 deletions

View File

@ -627,7 +627,7 @@ func (this *Generator) generateDecodeValue(typ Type, typeName, valueSource, tagS
case TypeTable:
// KTV: <length: UN> (<key: U16> <tag: Tag> <value>)*
nn, err := this.iprintf(
"nn, err = tape.DecodeAnyInto(decoder, %s, %s)\n",
"nn, err = tape.DecodeAny(decoder, %s, %s)\n",
valueSource, tagSource)
n += nn; if err != nil { return n, err }
nn, err = this.generateErrorCheck()

View File

@ -116,7 +116,6 @@ func (this *parser) parseType() (Type, error) {
case "String": return TypeString { }, this.Next()
case "Buffer": return TypeBuffer { }, this.Next()
case "Table": return TypeTable { }, this.Next()
case "Any": return TypeAny { }, this.Next()
}
return this.parseTypeNamed()
case TokenLBracket:

View File

@ -31,7 +31,6 @@ func TestParse(test *testing.T) {
0x0002: Field { Name: "Followers", Type: TypeInt { Bits: 32 } },
},
}
correct.Types["Anything"] = TypeAny { }
test.Log("CORRECT:", &correct)
got, err := ParseReader("test.pdl", strings.NewReader(`
@ -49,8 +48,6 @@ func TestParse(test *testing.T) {
0001 Bio String,
0002 Followers U32,
}
Anything Any
`))
if err != nil { test.Fatal(parse.Format(err)) }
test.Log("GOT: ", got)

View File

@ -99,12 +99,6 @@ func (typ TypeNamed) String() string {
return typ.Name
}
type TypeAny struct { }
func (typ TypeAny) String() string {
return "Any"
}
func HashType(typ Type) [16]byte {
// TODO: if we ever want to make the compiler more efficient, this would
// be a good place to start, complex string concatenation in a hot path