diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/html/parse.go | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/html/parse.go')
-rw-r--r-- | libgo/go/html/parse.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/go/html/parse.go b/libgo/go/html/parse.go index 54f7e2e..c9f0165 100644 --- a/libgo/go/html/parse.go +++ b/libgo/go/html/parse.go @@ -6,7 +6,6 @@ package html import ( "io" - "os" "strings" ) @@ -240,7 +239,7 @@ func (p *parser) reconstructActiveFormattingElements() { // read reads the next token. This is usually from the tokenizer, but it may // be the synthesized end tag implied by a self-closing tag. -func (p *parser) read() os.Error { +func (p *parser) read() error { if p.hasSelfClosingToken { p.hasSelfClosingToken = false p.tok.Type = EndTagToken @@ -1136,7 +1135,7 @@ func afterAfterBodyIM(p *parser) (insertionMode, bool) { // Parse returns the parse tree for the HTML from the given Reader. // The input is assumed to be UTF-8 encoded. -func Parse(r io.Reader) (*Node, os.Error) { +func Parse(r io.Reader) (*Node, error) { p := &parser{ tokenizer: NewTokenizer(r), doc: &Node{ @@ -1150,7 +1149,7 @@ func Parse(r io.Reader) (*Node, os.Error) { for { if consumed { if err := p.read(); err != nil { - if err == os.EOF { + if err == io.EOF { break } return nil, err |