Lines Matching refs:r

662 	r := &staticRule{
669 err = p.scope.AddRule(r)
674 return r
677 func (r *staticRule) packageContext() *packageContext {
678 return r.pctx
681 func (r *staticRule) name() string {
682 return r.name_
685 func (r *staticRule) fullName(pkgNames map[*packageContext]string) string {
686 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
689 func (r *staticRule) def(interface{}) (*ruleDef, error) {
690 def, err := parseRuleParams(r.scope(), &r.params)
692 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
697 func (r *staticRule) scope() *basicScope {
701 r.Lock()
702 defer r.Unlock()
704 if r.scope_ == nil {
705 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
707 return r.scope_
710 func (r *staticRule) isArg(argName string) bool {
711 return r.argNames[argName]
714 func (r *staticRule) String() string {
715 return r.pctx.pkgPath + "." + r.name_
783 func (r *ruleFunc) packageContext() *packageContext {
784 return r.pctx
787 func (r *ruleFunc) name() string {
788 return r.name_
791 func (r *ruleFunc) fullName(pkgNames map[*packageContext]string) string {
792 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
795 func (r *ruleFunc) def(config interface{}) (*ruleDef, error) {
796 params, err := r.paramsFunc(config)
800 def, err := parseRuleParams(r.scope(), &params)
802 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
807 func (r *ruleFunc) scope() *basicScope {
811 r.Lock()
812 defer r.Unlock()
814 if r.scope_ == nil {
815 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
817 return r.scope_
820 func (r *ruleFunc) isArg(argName string) bool {
821 return r.argNames[argName]
824 func (r *ruleFunc) String() string {
825 return r.pctx.pkgPath + "." + r.name_
834 func (r *builtinRule) packageContext() *packageContext {
838 func (r *builtinRule) name() string {
839 return r.name_
842 func (r *builtinRule) fullName(pkgNames map[*packageContext]string) string {
843 return r.name_
846 func (r *builtinRule) def(config interface{}) (*ruleDef, error) {
850 func (r *builtinRule) scope() *basicScope {
851 r.Lock()
852 defer r.Unlock()
854 if r.scope_ == nil {
855 r.scope_ = makeRuleScope(nil, nil)
857 return r.scope_
860 func (r *builtinRule) isArg(argName string) bool {
864 func (r *builtinRule) String() string {
865 return "<builtin>:" + r.name_