parser

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MethodInfo

type MethodInfo struct {
	Name             string
	PosStart, PosEnd int
}

type ObjCClass

type ObjCClass struct {
	// These fields are extracted from the header file
	Name       string
	Parent     string
	Protocols  []string
	Properties []Property // These are also extracted form the implementation file

	// These fields are extracted from the implementation file
	NSCodingInfo struct {
		InitWithCoder   MethodInfo
		EncodeWithCoder MethodInfo
	}
	NSCopyingInfo struct {
		CopyWithZone MethodInfo
	}
}

func NewObjCClass

func NewObjCClass(className string, hInterfaceBytes, mInterfaceBytes, implBytes []byte, implBytesOffset int) ObjCClass

func (*ObjCClass) ConformsAnyProtocol

func (oc *ObjCClass) ConformsAnyProtocol(protocols ...string) bool

func (*ObjCClass) ConformsProtocol

func (oc *ObjCClass) ConformsProtocol(protocol string) bool

func (*ObjCClass) IsDirectChildOfNSObject

func (oc *ObjCClass) IsDirectChildOfNSObject() bool

type ObjCClassFile

type ObjCClassFile struct {
	HName, MName string
	Classes      []ObjCClass
}

type Parser

type Parser struct {
	IncludeTag, ExcludeTag, HeaderFileExt, ImplFileExt string
}

func NewParser

func NewParser() Parser

func (Parser) GetParseableFiles

func (p Parser) GetParseableFiles(rootPath string) []string

func (Parser) Parse

func (p Parser) Parse(headerFileName string) (*ObjCClassFile, error)

type Property

type Property struct {
	Name, Class string
	Attributes  []string
	IsPointer   bool
}

func (*Property) CoderType

func (p *Property) CoderType() string

func (*Property) IsObject

func (p *Property) IsObject() bool

func (*Property) IsReadonly

func (p *Property) IsReadonly() bool

func (*Property) IsWeak

func (p *Property) IsWeak() bool

func (*Property) WriteAccessor added in v0.5.2

func (p *Property) WriteAccessor() string

Returns either the property or the ivar accessor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL