public CompletionItem(ExpressionInfo info, string token, Range replaceRange, string script, Action<string, int, int> insertionCallback) { this.info = info; this.token = token; this.replaceRange = replaceRange; this.script = script; this.insertionCallback = insertionCallback; }
public static string Replace(this string str, Range range, string replacement) { var builder = new StringBuilder(str.Length - range.NumberOfElements + replacement.Length); builder.Append(str.Substring(0, range.Start)); builder.Append(replacement); builder.Append(str.Substring(range.Start + range.NumberOfElements)); return builder.ToString(); }
public CodeCompletionResult(IEnumerable<ExpressionInfo> expressionInfos, Token activeToken, Range replaceRange) { ExpressionInfos = expressionInfos; ActiveToken = activeToken; ReplaceRange = replaceRange; }
public TokenResult(IEnumerable<Token> tokens, Range lastToken) { this.Tokens = tokens; this.LastTokenRange = lastToken; }