• Home
  • Raw
  • Download

Lines Matching refs:r

661 	r := &staticRule{
668 err = p.scope.AddRule(r)
673 return r
676 func (r *staticRule) packageContext() *packageContext {
677 return r.pctx
680 func (r *staticRule) name() string {
681 return r.name_
684 func (r *staticRule) fullName(pkgNames map[*packageContext]string) string {
685 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
688 func (r *staticRule) def(interface{}) (*ruleDef, error) {
689 def, err := parseRuleParams(r.scope(), &r.params)
691 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
696 func (r *staticRule) scope() *basicScope {
700 r.Lock()
701 defer r.Unlock()
703 if r.scope_ == nil {
704 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
706 return r.scope_
709 func (r *staticRule) isArg(argName string) bool {
710 return r.argNames[argName]
713 func (r *staticRule) String() string {
714 return r.pctx.pkgPath + "." + r.name_
782 func (r *ruleFunc) packageContext() *packageContext {
783 return r.pctx
786 func (r *ruleFunc) name() string {
787 return r.name_
790 func (r *ruleFunc) fullName(pkgNames map[*packageContext]string) string {
791 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
794 func (r *ruleFunc) def(config interface{}) (*ruleDef, error) {
795 params, err := r.paramsFunc(config)
799 def, err := parseRuleParams(r.scope(), &params)
801 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
806 func (r *ruleFunc) scope() *basicScope {
810 r.Lock()
811 defer r.Unlock()
813 if r.scope_ == nil {
814 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
816 return r.scope_
819 func (r *ruleFunc) isArg(argName string) bool {
820 return r.argNames[argName]
823 func (r *ruleFunc) String() string {
824 return r.pctx.pkgPath + "." + r.name_
833 func (r *builtinRule) packageContext() *packageContext {
837 func (r *builtinRule) name() string {
838 return r.name_
841 func (r *builtinRule) fullName(pkgNames map[*packageContext]string) string {
842 return r.name_
845 func (r *builtinRule) def(config interface{}) (*ruleDef, error) {
849 func (r *builtinRule) scope() *basicScope {
850 r.Lock()
851 defer r.Unlock()
853 if r.scope_ == nil {
854 r.scope_ = makeRuleScope(nil, nil)
856 return r.scope_
859 func (r *builtinRule) isArg(argName string) bool {
863 func (r *builtinRule) String() string {
864 return "<builtin>:" + r.name_