18 lines
267 B
Go
18 lines
267 B
Go
|
package annotation
|
||
|
|
||
|
import (
|
||
|
"regexp"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
AnnotationTag = "annotation"
|
||
|
|
||
|
NameTag = "@name"
|
||
|
DefaultTag = "@default"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
AnnotationRGX = regexp.MustCompile(`@((?s).*?)\(((?s).*?)\)`)
|
||
|
AnnotationBodyRGX = regexp.MustCompile(`'([^\\\\']|\\')*'`)
|
||
|
)
|