public static void CheckString(IInterpolatedStringExpression literalExpression, DefaultHighlightingConsumer consumer, StringSettings settings, ISolution _solution, IContextBoundSettingsStore _settingsStore, IDaemonProcess _daemonProcess = null) { //ConstantValue val = literalExpression.ConstantValue; // Ignore it unless it's something we're re-evalutating if (_daemonProcess != null && !_daemonProcess.IsRangeInvalidated(literalExpression.GetDocumentRange())) { return; } foreach (var tokenNode in literalExpression.StringLiterals) { if (tokenNode == null) { continue; } var tokenType = tokenNode.GetTokenType(); if (tokenType == CSharpTokenType.INTERPOLATED_STRING_VERBATIM || tokenType == CSharpTokenType.INTERPOLATED_STRING_VERBATIM_START || tokenType == CSharpTokenType.INTERPOLATED_STRING_VERBATIM_MIDDLE || tokenType == CSharpTokenType.INTERPOLATED_STRING_VERBATIM_END ) { if (settings.IgnoreVerbatimStrings) { return; } } else if (tokenType != CSharpTokenType.INTERPOLATED_STRING_REGULAR_START && tokenType != CSharpTokenType.INTERPOLATED_STRING_REGULAR_MIDDLE && tokenType != CSharpTokenType.INTERPOLATED_STRING_REGULAR_END && tokenType != CSharpTokenType.INTERPOLATED_STRING_REGULAR) { continue; } ISpellChecker spellChecker = SpellCheckManager.GetSpellChecker(_settingsStore, _solution, settings.DictionaryNames); StringSpellChecker.SpellCheck( literalExpression.GetDocumentRange() .Document, tokenNode, spellChecker, _solution, consumer, _settingsStore, settings); } }
public virtual void VisitInterpolatedStringExpression(IInterpolatedStringExpression operation) { DefaultVisit(operation); }
public override void VisitInterpolatedStringExpression(IInterpolatedStringExpression operation) { base.VisitInterpolatedStringExpression(operation); }
public override IOperation VisitInterpolatedStringExpression(IInterpolatedStringExpression operation, object argument) { return(new InterpolatedStringExpression(VisitArray(operation.Parts), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue, operation.IsImplicit)); }