Documentation
¶
Index ¶
- Variables
- func BindingStructs(structs []*Struct, mFuncsPointer *[]*MFunc)
- func ClearAnnotation(bs []byte) []byte
- func ClearEmptyLine(bs []byte) []byte
- func ClearLineComment(bs []byte) []byte
- func ClearMultiComment(bs []byte) []byte
- func ClenCode(bs []byte) []byte
- func FindAllConsts(content []byte) (consts []string)
- func FindAllImports(content []byte) (imports []string)
- func FindAllVars(content []byte) (vars []string)
- func FindPackage(content []byte) string
- type GFunc
- type Interface
- type MFunc
- type Struct
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Null = []byte("") LineComment = regexp.MustCompile(`//.*`) MultiComment = regexp.MustCompile(`/\*(\n|.)*?\*/`) EmptyLineCompile = regexp.MustCompile(`(?m)^\s*$[\r\n]*|[\r\n]+\s+\z`) AnnotationCompile = regexp.MustCompile("`(\\w+:\"\\w+\"\\s*)`") PackageCmp = regexp.MustCompile(`(?m)^package (\w+)`) ImportBlockCmp = regexp.MustCompile(`(?m)^import (\((\s+(\w+ )?("([\w/.]+)"))+\s*\)|"([\w/.]+)")`) ImportBlockSubCmp = regexp.MustCompile(`"([\w/.]+)"`) VarLineCmp = regexp.MustCompile(`(?m)^var (\w+(?: (?:` + paramType + `)?(?: = .+?)?){?\s+$`) VarBlockCmp = regexp.MustCompile(`(?m)^var \((\s+\w+([\t ]+(` + paramType + `)?([\t ]+=[\t ]+.+)?)+\s*\)`) VarBlockLineCmp = regexp.MustCompile(`[\t ](\w+(?:[\t ]+(?:` + paramType + `)?(?:[\t ]+=[\t ]+[^\n\r]+)?)`) ConstLineCmp = regexp.MustCompile(`(?m)^const (\w+(?: (?:` + paramType + `)?(?: = .+?)?)\s+$`) ConstBlockCmp = regexp.MustCompile(`(?m)^const \((\s+\w+([\t ]+(` + paramType + `)?([\t ]+=[\t ]+.+?)?)+\s*\)`) ConstBlockLineCmp = VarBlockLineCmp TypeCmp = regexp.MustCompile(`(?m)^type (\w+) ((?:` + paramType + `)\s+$`) TypeSuperCmp = regexp.MustCompile(`(?m)^[\t ]+(\w+)\s*$`) StructCmp = regexp.MustCompile(`(?m)^(?:type |[\t ]+)(\w+) struct\s?\{((?:\s+\w+(?:, \w+)*?(?:[\t ]+(?:` + paramType + `)?)+)\s*}`) StructFieldCmp = regexp.MustCompile(`(?m)^[\t ]+(\w+(?:, \w+)*)[\t ]+((?:(?:` + paramType + `)+)\s*$`) StructFuncCmp = regexp.MustCompile(`(?m)^func \((\*?\w+? ?\*?\w+?)\) (\w+)(\((?:\w+(?:, \w+)*? (?:chan |[\w\[\].*]|\{})+(?:, )?)*\)[\t ]*\(?(?:\w*?(?:, \w+)*? ?(?:chan |[\w\[\].*]|\{})*(?:, )?)*\)?)\s*?\{`) InterfaceCmp = regexp.MustCompile(`(?m)^(?:type |[\t ]+)(\w+) interface\s?\{((?:\s*\w*(?:` + funcParamList + `)?)*)\s*}`) InterfaceLineCmp = regexp.MustCompile(`[\t ]+(\w+)(\(.*?\))(.*)?`) InterfaceDepsCmp = regexp.MustCompile(`\w+(?:, \w+)*? ((?:` + paramType + `)(?:, )?`) FuncGlobalCmp = regexp.MustCompile(`(?m)^func (\w+)(` + funcParamList + `)\s*?\{`) )
Functions ¶
func BindingStructs ¶
BindingStructs 检索并绑定成员函数,每次匹配都会移除@mFuncsPointer列表中的元素
func ClearAnnotation ¶
func ClearEmptyLine ¶
func ClearLineComment ¶
func ClearMultiComment ¶
func FindAllConsts ¶
func FindAllImports ¶
func FindAllVars ¶
func FindPackage ¶
Types ¶
type GFunc ¶
func FindAllGFuncs ¶
type Interface ¶
func FindAllInterfaces ¶
type MFunc ¶
func FindAllMFuncs ¶
Click to show internal directories.
Click to hide internal directories.