Documentation
¶
Index ¶
- func Accept[T node.Node](s *ParseState, nodeFunc node.NewNodeFunc[T]) T
- func Error(s *ParseState, err error) error
- func IsAnyKind(t tokenize.Token, k ...tokenize.TokenKind) bool
- func IsAnySpecial(t tokenize.Token, r ...rune) bool
- func IsIdentifier(t tokenize.Token, ignoreCase bool, pattern ...string) bool
- func IsKeyword(t tokenize.Token, code node.KeywordCode) bool
- func ParseIdentifier(s *ParseState) (node.IdentifierNode, error)
- func ParseKeyword(s *ParseState) (node.KeywordNode, error)
- func ParsePath(s *ParseState) (node.PathNode, error)
- func ParseStructField(s *ParseState) (node.StructTypeFieldNode, error)
- func ParseType(s *ParseState) (node.TypeNode, error)
- func ParseTypeSize(s *ParseState) (node.TypeSizeNode, error)
- type ParseState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accept ¶
func Accept[T node.Node](s *ParseState, nodeFunc node.NewNodeFunc[T]) T
func Error ¶
func Error(s *ParseState, err error) error
func ParseIdentifier ¶
func ParseIdentifier(s *ParseState) (node.IdentifierNode, error)
func ParseKeyword ¶
func ParseKeyword(s *ParseState) (node.KeywordNode, error)
func ParseStructField ¶
func ParseStructField(s *ParseState) (node.StructTypeFieldNode, error)
func ParseTypeSize ¶
func ParseTypeSize(s *ParseState) (node.TypeSizeNode, error)
Types ¶
type ParseState ¶
type ParseState struct {
// contains filtered or unexported fields
}
func NewParseState ¶
func NewParseState(input []tokenize.Token) *ParseState
func (*ParseState) Child ¶
func (s *ParseState) Child() *ParseState
func (*ParseState) Len ¶
func (s *ParseState) Len() int
func (*ParseState) Move ¶
func (s *ParseState) Move(offset int)
func (*ParseState) SkipSpacesAndComments ¶
func (s *ParseState) SkipSpacesAndComments()
Click to show internal directories.
Click to hide internal directories.