• Home
  • Raw
  • Download

Lines Matching refs:r

723 	r := &staticRule{
730 err = p.scope.AddRule(r)
735 return r
738 func (r *staticRule) packageContext() *packageContext {
739 return r.pctx
742 func (r *staticRule) name() string {
743 return r.name_
746 func (r *staticRule) fullName(pkgNames map[*packageContext]string) string {
747 if r.fullName_ != "" {
748 return r.fullName_
750 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
753 func (r *staticRule) memoizeFullName(pkgNames map[*packageContext]string) {
754 r.fullName_ = r.fullName(pkgNames)
757 func (r *staticRule) def(interface{}) (*ruleDef, error) {
758 def, err := parseRuleParams(r.scope(), &r.params)
760 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
765 func (r *staticRule) scope() *basicScope {
769 r.Lock()
770 defer r.Unlock()
772 if r.scope_ == nil {
773 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
775 return r.scope_
778 func (r *staticRule) isArg(argName string) bool {
779 return r.argNames[argName]
782 func (r *staticRule) String() string {
783 return r.pctx.pkgPath + "." + r.name_
852 func (r *ruleFunc) packageContext() *packageContext {
853 return r.pctx
856 func (r *ruleFunc) name() string {
857 return r.name_
860 func (r *ruleFunc) fullName(pkgNames map[*packageContext]string) string {
861 if r.fullName_ != "" {
862 return r.fullName_
864 return packageNamespacePrefix(pkgNames[r.pctx]) + r.name_
867 func (r *ruleFunc) memoizeFullName(pkgNames map[*packageContext]string) {
868 r.fullName_ = r.fullName(pkgNames)
871 func (r *ruleFunc) def(config interface{}) (*ruleDef, error) {
872 params, err := r.paramsFunc(config)
876 def, err := parseRuleParams(r.scope(), &params)
878 panic(fmt.Errorf("error parsing RuleParams for %s: %s", r, err))
883 func (r *ruleFunc) scope() *basicScope {
887 r.Lock()
888 defer r.Unlock()
890 if r.scope_ == nil {
891 r.scope_ = makeRuleScope(r.pctx.scope, r.argNames)
893 return r.scope_
896 func (r *ruleFunc) isArg(argName string) bool {
897 return r.argNames[argName]
900 func (r *ruleFunc) String() string {
901 return r.pctx.pkgPath + "." + r.name_
910 func (r *builtinRule) packageContext() *packageContext {
914 func (r *builtinRule) name() string {
915 return r.name_
918 func (r *builtinRule) fullName(pkgNames map[*packageContext]string) string {
919 return r.name_
922 func (r *builtinRule) memoizeFullName(pkgNames map[*packageContext]string) {
926 func (r *builtinRule) def(config interface{}) (*ruleDef, error) {
930 func (r *builtinRule) scope() *basicScope {
931 r.Lock()
932 defer r.Unlock()
934 if r.scope_ == nil {
935 r.scope_ = makeRuleScope(nil, nil)
937 return r.scope_
940 func (r *builtinRule) isArg(argName string) bool {
944 func (r *builtinRule) String() string {
945 return "<builtin>:" + r.name_