Lines Matching refs:x
34 func (x *Assignment) Dump() string {
36 if x.Target != nil {
37 target = x.Target.Dump() + ": "
39 return target + x.Name.Dump() + " " + x.Type + " " + x.Value.Dump()
42 func (x *Assignment) Pos() Pos {
43 if x.Target != nil {
44 return x.Target.Pos()
46 return x.Name.Pos()
49 func (x *Assignment) End() Pos { return x.Value.End() }
56 func (x *Comment) Dump() string {
57 return "#" + x.Comment
60 func (x *Comment) Pos() Pos { return x.CommentPos }
61 func (x *Comment) End() Pos { return Pos(int(x.CommentPos) + len(x.Comment)) }
70 func (x *Directive) Dump() string {
71 return x.Name + " " + x.Args.Dump()
74 func (x *Directive) Pos() Pos { return x.NamePos }
75 func (x *Directive) End() Pos {
76 if x.EndPos != NoPos {
77 return x.EndPos
79 return x.Args.End()
89 func (x *Rule) Dump() string {
91 if x.Recipe != "" {
92 recipe = "\n" + x.Recipe
94 return "rule: " + x.Target.Dump() + ": " + x.Prerequisites.Dump() + recipe
97 func (x *Rule) Pos() Pos { return x.Target.Pos() }
98 func (x *Rule) End() Pos { return Pos(int(x.RecipePos) + len(x.Recipe)) }
104 func (x *Variable) Pos() Pos { return x.Name.Pos() }
105 func (x *Variable) End() Pos { return x.Name.End() }
107 func (x *Variable) Dump() string {
108 return "$(" + x.Name.Dump() + ")"