GetMacroCall returns the original ast.Expr value for the given expression if it was generated via a macro replacement. Note, parsing options must be enabled to track macro calls before this method will return a value.
(id int64)
| 319 | // |
| 320 | // Note, parsing options must be enabled to track macro calls before this method will return a value. |
| 321 | func (s *SourceInfo) GetMacroCall(id int64) (Expr, bool) { |
| 322 | e, found := s.MacroCalls()[id] |
| 323 | return e, found |
| 324 | } |
| 325 | |
| 326 | // SetMacroCall records a macro call at a specific location. |
| 327 | func (s *SourceInfo) SetMacroCall(id int64, e Expr) { |