public async System.Threading.Tasks.Task <Dictionary <string, string> > CMReorderParserRules(JToken arg) { CMReorderParserRulesParams request = arg.ToObject <CMReorderParserRulesParams>(); Document document = CheckDoc(request.TextDocument); int pos = request.Pos; LspAntlr.ReorderType type = request.Type; if (trace) { System.Console.Error.WriteLine("<-- CMReorderParserRules"); System.Console.Error.WriteLine(arg.ToString()); (int, int)bs = LanguageServer.Module.GetLineColumn(pos, document); System.Console.Error.WriteLine(""); } Dictionary <string, string> changes = LanguageServer.Transform.ReorderParserRules(pos, document, type); return(changes); }
public Dictionary <string, string> CMReorderParserRulesServer(string ffn, int pos, ReorderType reorder_type) { try { if (_rpc == null) { return(null); } CMReorderParserRulesParams p = new CMReorderParserRulesParams(); Uri uri = new Uri(ffn); p.TextDocument = uri; p.Pos = pos; p.Type = reorder_type; Dictionary <string, string> result = _rpc.InvokeAsync <Dictionary <string, string> >("CMReorderParserRules", p).Result; return(result); } catch (Exception) { } return(null); }