private LocationInfo GetLoc(FunctionDefinition node) { var s = node.Header; var e = node.GetEnd(_tree); return(new LocationInfo( _filename, s.Line, s.Column, e.Line, e.Column )); }
internal LocationInfo GetLoc(FunctionDefinition node) { if (node == null || node.StartIndex >= node.EndIndex) { return(null); } var start = node.NameExpression?.GetStart(_ast) ?? node.GetStart(_ast); var end = node.GetEnd(_ast); return(new LocationInfo(_filePath, start.Line, start.Column, end.Line, end.Column)); }
public override bool Walk(FunctionDefinition node) { var start = node.GetStart(_root); var end = node.GetEnd(_root); if (start.Line <= _line && end.Line >= _line) { FunctionName = node.Name; } return(base.Walk(node)); }