Lines Matching refs:p

86 func (p *packageContext) getScope() *basicScope {
87 return p.scope
112 p := &packageContext{
119 packageContexts[pkgPath] = p
121 return p
218 func (p *packageContext) Import(pkgPath string) {
225 err := p.scope.AddImport(importPkg.shortName, importPkg.scope)
234 func (p *packageContext) ImportAs(as, pkgPath string) {
246 err = p.scope.AddImport(as, importPkg.scope)
268 func (p *packageContext) StaticVariable(name, value string) Variable {
276 pctx: p,
280 err = p.scope.AddVariable(v)
338 func (p *packageContext) VariableFunc(name string,
349 pctx: p,
353 err = p.scope.AddVariable(v)
372 func (p *packageContext) VariableConfigMethod(name string,
392 pctx: p,
396 err = p.scope.AddVariable(v)
511 func (p *packageContext) StaticPool(name string, params PoolParams) Pool {
520 pctx: p,
524 err = p.scope.AddPool(pool)
532 func (p *staticPool) packageContext() *packageContext {
533 return p.pctx
536 func (p *staticPool) name() string {
537 return p.name_
540 func (p *staticPool) fullName(pkgNames map[*packageContext]string) string {
541 if p.fullName_ != "" {
542 return p.fullName_
544 return packageNamespacePrefix(pkgNames[p.pctx]) + p.name_
547 func (p *staticPool) memoizeFullName(pkgNames map[*packageContext]string) {
548 p.fullName_ = p.fullName(pkgNames)
551 func (p *staticPool) def(config interface{}) (*poolDef, error) {
552 def, err := parsePoolParams(p.pctx.scope, &p.params)
554 panic(fmt.Errorf("error parsing PoolParams for %s: %s", p, err))
559 func (p *staticPool) String() string {
560 return p.pctx.pkgPath + "." + p.name_
580 func (p *packageContext) PoolFunc(name string, f func(interface{}) (PoolParams,
591 pctx: p,
595 err = p.scope.AddPool(pool)
603 func (p *poolFunc) packageContext() *packageContext {
604 return p.pctx
607 func (p *poolFunc) name() string {
608 return p.name_
611 func (p *poolFunc) fullName(pkgNames map[*packageContext]string) string {
612 if p.fullName_ != "" {
613 return p.fullName_
615 return packageNamespacePrefix(pkgNames[p.pctx]) + p.name_
618 func (p *poolFunc) memoizeFullName(pkgNames map[*packageContext]string) {
619 p.fullName_ = p.fullName(pkgNames)
622 func (p *poolFunc) def(config interface{}) (*poolDef, error) {
623 params, err := p.paramsFunc(config)
627 def, err := parsePoolParams(p.pctx.scope, &params)
629 panic(fmt.Errorf("error parsing PoolParams for %s: %s", p, err))
634 func (p *poolFunc) String() string {
635 return p.pctx.pkgPath + "." + p.name_
642 func (p *builtinPool) packageContext() *packageContext {
646 func (p *builtinPool) name() string {
647 return p.name_
650 func (p *builtinPool) fullName(pkgNames map[*packageContext]string) string {
651 return p.name_
654 func (p *builtinPool) memoizeFullName(pkgNames map[*packageContext]string) {
658 func (p *builtinPool) def(config interface{}) (*poolDef, error) {
669 func (p *builtinPool) String() string {
670 return "<builtin>:" + p.name_
701 func (p *packageContext) StaticRule(name string, params RuleParams,
724 pctx: p,
730 err = p.scope.AddRule(r)
815 func (p *packageContext) RuleFunc(name string, f func(interface{}) (RuleParams,
838 pctx: p,
844 err = p.scope.AddRule(rule)
955 func (p *packageContext) AddNinjaFileDeps(deps ...string) {
956 p.ninjaFileDeps = append(p.ninjaFileDeps, deps...)