public SpanMeta GetMeta(TextSpan span) { var node = SyntaxRoot.FindNode(span)?.GetExpression(); if (node != null) { var symbol = SemanticModel.GetSymbolInfo(node).Symbol ?? SemanticModel.GetDeclaredSymbol(node) ?? SemanticModel.GetTypeInfo(node).Type; return(new SpanMeta(node, symbol)); } var child = SyntaxRoot.ChildThatContainsPosition(span.Start); return(new SpanMeta(child.AsToken())); }