gofmt
This commit is contained in:
parent
05d8ec6a16
commit
2a2d8653b3
|
@ -1,15 +0,0 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
A buffer count is a mechanism by which to keep track of which byte one
|
||||
is reading or writing to/from the wire.
|
||||
|
||||
It's an abstraction over the fact that while such a counter is usually
|
||||
fixed, it can be made variable based on values at run-time.
|
||||
*/
|
||||
|
||||
type BufCount struct {
|
||||
Fixed int
|
||||
Exprs []*Expression
|
||||
}
|
||||
|
|
@ -273,4 +273,3 @@ func (e *SumOf) String() string {
|
|||
func (e *SumOf) Initialize(p *Protocol) {
|
||||
e.Name = SrcName(e.Name)
|
||||
}
|
||||
|
||||
|
|
|
@ -167,4 +167,3 @@ type Bitcase struct {
|
|||
Fields []Field
|
||||
Expr Expression
|
||||
}
|
||||
|
||||
|
|
|
@ -408,4 +408,3 @@ func (f *SwitchField) Define(c *Context) {
|
|||
func (f *SwitchField) Read(c *Context) {
|
||||
c.Putln("// reading switch field: %s (%s)", f.Name, f.Expr)
|
||||
}
|
||||
|
||||
|
|
|
@ -62,4 +62,3 @@ func main() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
|
||||
// Morph cascades down all of the XML and calls each type's corresponding
|
||||
// Morph function with itself as an argument (the context).
|
||||
func (x *XML) Morph(c *Context) {
|
||||
// Start the header...
|
||||
c.Putln("package xgb")
|
||||
c.Putln("/*")
|
||||
c.Putln("\tX protocol API for '%s.xml'.", c.xml.Header)
|
||||
c.Putln("\tThis file is automatically generated. Edit at your own peril!")
|
||||
c.Putln("\tGenerated on %s",
|
||||
time.Now().Format("Jan 2, 2006 at 3:04:05pm MST"))
|
||||
c.Putln("*/")
|
||||
c.Putln("")
|
||||
|
||||
x.Imports.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Enums.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Xids.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.XidUnions.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.TypeDefs.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Structs.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Unions.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Requests.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Errors.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.ErrorCopies.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.Events.Morph(c)
|
||||
c.Putln("")
|
||||
|
||||
x.EventCopies.Morph(c)
|
||||
c.Putln("")
|
||||
}
|
|
@ -53,4 +53,3 @@ func (r *Reply) Initialize(p *Protocol) {
|
|||
field.Initialize(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,4 +19,3 @@ func (s1 Size) Add(s2 Size) Size {
|
|||
func (s1 Size) Multiply(s2 Size) Size {
|
||||
return Size{newBinaryOp("*", s1, s2)}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
translation.go provides a 'Translate' method on every XML type that converts
|
||||
the XML type into our "better" representation.
|
||||
|
|
|
@ -146,4 +146,3 @@ type XMLError struct {
|
|||
Number int `xml:"number,attr"`
|
||||
Fields XMLFields `xml:",any"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
A series of fields should be taken as "structure contents", and *not*
|
||||
just the single 'field' elements. Namely, 'fields' subsumes 'field'
|
||||
|
|
Loading…
Reference in New Issue