Merge pull request #23 from abhinav/iota-types

ast: Specify types for iota-based constants
This commit is contained in:
Yusuke Inuzuka 2019-08-25 17:49:14 +09:00 committed by GitHub
commit d7e925c896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -4,9 +4,10 @@ package ast
import (
"bytes"
"fmt"
"strings"
textm "github.com/yuin/goldmark/text"
"github.com/yuin/goldmark/util"
"strings"
)
// A NodeType indicates what type a node belongs to.
@ -412,7 +413,7 @@ type WalkStatus int
const (
// WalkStop indicates no more walking needed.
WalkStop = iota + 1
WalkStop WalkStatus = iota + 1
// WalkSkipChildren indicates that Walk wont walk on children of current
// node.

View file

@ -2,8 +2,9 @@ package ast
import (
"fmt"
textm "github.com/yuin/goldmark/text"
"strings"
textm "github.com/yuin/goldmark/text"
)
// A BaseBlock struct implements the Node interface.
@ -397,7 +398,7 @@ type HTMLBlockType int
const (
// HTMLBlockType1 represents type 1 html blocks
HTMLBlockType1 = iota + 1
HTMLBlockType1 HTMLBlockType = iota + 1
// HTMLBlockType2 represents type 2 html blocks
HTMLBlockType2
// HTMLBlockType3 represents type 3 html blocks

View file

@ -447,7 +447,7 @@ type AutoLinkType int
const (
// AutoLinkEmail indicates that an autolink is an email address.
AutoLinkEmail = iota + 1
AutoLinkEmail AutoLinkType = iota + 1
// AutoLinkURL indicates that an autolink is a generic URL.
AutoLinkURL
)