Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 1 | //===--- JSONRPCDispatcher.cpp - Main JSON parser entry point -------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "JSONRPCDispatcher.h" |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 11 | #include "JSONExpr.h" |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 12 | #include "ProtocolHandlers.h" |
Sam McCall | 8567cb3 | 2017-11-02 09:21:51 +0000 | [diff] [blame] | 13 | #include "Trace.h" |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 14 | #include "llvm/ADT/SmallString.h" |
Sam McCall | 94362c6 | 2017-11-07 14:45:31 +0000 | [diff] [blame] | 15 | #include "llvm/ADT/StringExtras.h" |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 16 | #include "llvm/Support/SourceMgr.h" |
Ilya Biryukov | 687b92a | 2017-05-16 15:23:55 +0000 | [diff] [blame] | 17 | #include <istream> |
| 18 | |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 19 | using namespace clang; |
| 20 | using namespace clangd; |
| 21 | |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 22 | namespace { |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 23 | static Key<json::Expr> RequestID; |
| 24 | static Key<JSONOutput *> RequestOut; |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 25 | |
| 26 | // When tracing, we trace a request and attach the repsonse in reply(). |
| 27 | // Because the Span isn't available, we find the current request using Context. |
| 28 | class RequestSpan { |
| 29 | RequestSpan(json::obj *Args) : Args(Args) {} |
| 30 | std::mutex Mu; |
| 31 | json::obj *Args; |
Sam McCall | 24f0fa3 | 2018-01-26 11:23:33 +0000 | [diff] [blame] | 32 | static Key<std::unique_ptr<RequestSpan>> RSKey; |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 33 | |
| 34 | public: |
| 35 | // Return a context that's aware of the enclosing request, identified by Span. |
| 36 | static Context stash(const trace::Span &Span) { |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 37 | return Context::current().derive( |
| 38 | RSKey, std::unique_ptr<RequestSpan>(new RequestSpan(Span.Args))); |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | // If there's an enclosing request and the tracer is interested, calls \p F |
| 42 | // with a json::obj where request info can be added. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 43 | template <typename Func> static void attach(Func &&F) { |
| 44 | auto *RequestArgs = Context::current().get(RSKey); |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 45 | if (!RequestArgs || !*RequestArgs || !(*RequestArgs)->Args) |
| 46 | return; |
| 47 | std::lock_guard<std::mutex> Lock((*RequestArgs)->Mu); |
| 48 | F(*(*RequestArgs)->Args); |
| 49 | } |
| 50 | }; |
Sam McCall | 24f0fa3 | 2018-01-26 11:23:33 +0000 | [diff] [blame] | 51 | Key<std::unique_ptr<RequestSpan>> RequestSpan::RSKey; |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 52 | } // namespace |
| 53 | |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 54 | void JSONOutput::writeMessage(const json::Expr &Message) { |
| 55 | std::string S; |
| 56 | llvm::raw_string_ostream OS(S); |
| 57 | if (Pretty) |
| 58 | OS << llvm::formatv("{0:2}", Message); |
| 59 | else |
| 60 | OS << Message; |
| 61 | OS.flush(); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 62 | |
Benjamin Kramer | d0b2ccd | 2017-02-10 14:08:40 +0000 | [diff] [blame] | 63 | std::lock_guard<std::mutex> Guard(StreamMutex); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 64 | // Log without headers. |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 65 | Logs << "--> " << S << '\n'; |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 66 | Logs.flush(); |
| 67 | |
| 68 | // Emit message with header. |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 69 | Outs << "Content-Length: " << S.size() << "\r\n\r\n" << S; |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 70 | Outs.flush(); |
| 71 | } |
| 72 | |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 73 | void JSONOutput::log(const Twine &Message) { |
| 74 | trace::log(Message); |
Benjamin Kramer | e14bd42 | 2017-02-15 16:44:11 +0000 | [diff] [blame] | 75 | std::lock_guard<std::mutex> Guard(StreamMutex); |
Sam McCall | 318fbeb | 2017-11-30 23:21:34 +0000 | [diff] [blame] | 76 | Logs << Message << '\n'; |
Benjamin Kramer | e14bd42 | 2017-02-15 16:44:11 +0000 | [diff] [blame] | 77 | Logs.flush(); |
| 78 | } |
| 79 | |
Ilya Biryukov | e6dbb58 | 2017-10-10 09:08:47 +0000 | [diff] [blame] | 80 | void JSONOutput::mirrorInput(const Twine &Message) { |
| 81 | if (!InputMirror) |
| 82 | return; |
| 83 | |
| 84 | *InputMirror << Message; |
| 85 | InputMirror->flush(); |
| 86 | } |
| 87 | |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 88 | void clangd::reply(json::Expr &&Result) { |
| 89 | auto ID = Context::current().get(RequestID); |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 90 | if (!ID) { |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 91 | log("Attempted to reply to a notification!"); |
Sam McCall | 8a5dded | 2017-10-12 13:29:58 +0000 | [diff] [blame] | 92 | return; |
| 93 | } |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 94 | RequestSpan::attach([&](json::obj &Args) { Args["Reply"] = Result; }); |
| 95 | Context::current() |
| 96 | .getExisting(RequestOut) |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 97 | ->writeMessage(json::obj{ |
| 98 | {"jsonrpc", "2.0"}, |
| 99 | {"id", *ID}, |
| 100 | {"result", std::move(Result)}, |
| 101 | }); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 102 | } |
| 103 | |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 104 | void clangd::replyError(ErrorCode code, const llvm::StringRef &Message) { |
| 105 | log("Error " + Twine(static_cast<int>(code)) + ": " + Message); |
| 106 | RequestSpan::attach([&](json::obj &Args) { |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 107 | Args["Error"] = |
| 108 | json::obj{{"code", static_cast<int>(code)}, {"message", Message.str()}}; |
| 109 | }); |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 110 | |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 111 | if (auto ID = Context::current().get(RequestID)) { |
| 112 | Context::current() |
| 113 | .getExisting(RequestOut) |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 114 | ->writeMessage(json::obj{ |
| 115 | {"jsonrpc", "2.0"}, |
| 116 | {"id", *ID}, |
| 117 | {"error", |
| 118 | json::obj{{"code", static_cast<int>(code)}, {"message", Message}}}, |
| 119 | }); |
Sam McCall | 8a5dded | 2017-10-12 13:29:58 +0000 | [diff] [blame] | 120 | } |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 121 | } |
| 122 | |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 123 | void clangd::call(StringRef Method, json::Expr &&Params) { |
Marc-Andre Laperle | e7ec16a | 2017-11-03 13:39:15 +0000 | [diff] [blame] | 124 | // FIXME: Generate/Increment IDs for every request so that we can get proper |
| 125 | // replies once we need to. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 126 | RequestSpan::attach([&](json::obj &Args) { |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 127 | Args["Call"] = json::obj{{"method", Method.str()}, {"params", Params}}; |
| 128 | }); |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 129 | Context::current() |
| 130 | .getExisting(RequestOut) |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 131 | ->writeMessage(json::obj{ |
| 132 | {"jsonrpc", "2.0"}, |
| 133 | {"id", 1}, |
| 134 | {"method", Method}, |
| 135 | {"params", std::move(Params)}, |
| 136 | }); |
Marc-Andre Laperle | e7ec16a | 2017-11-03 13:39:15 +0000 | [diff] [blame] | 137 | } |
| 138 | |
Sam McCall | 8a5dded | 2017-10-12 13:29:58 +0000 | [diff] [blame] | 139 | void JSONRPCDispatcher::registerHandler(StringRef Method, Handler H) { |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 140 | assert(!Handlers.count(Method) && "Handler already registered!"); |
| 141 | Handlers[Method] = std::move(H); |
| 142 | } |
| 143 | |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 144 | bool JSONRPCDispatcher::call(const json::Expr &Message, JSONOutput &Out) const { |
| 145 | // Message must be an object with "jsonrpc":"2.0". |
| 146 | auto *Object = Message.asObject(); |
| 147 | if (!Object || Object->getString("jsonrpc") != Optional<StringRef>("2.0")) |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 148 | return false; |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 149 | // ID may be any JSON value. If absent, this is a notification. |
Sam McCall | dd0566b | 2017-11-06 15:40:30 +0000 | [diff] [blame] | 150 | llvm::Optional<json::Expr> ID; |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 151 | if (auto *I = Object->get("id")) |
| 152 | ID = std::move(*I); |
| 153 | // Method must be given. |
| 154 | auto Method = Object->getString("method"); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 155 | if (!Method) |
| 156 | return false; |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 157 | // Params should be given, use null if not. |
| 158 | json::Expr Params = nullptr; |
| 159 | if (auto *P = Object->get("params")) |
| 160 | Params = std::move(*P); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 161 | |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 162 | auto I = Handlers.find(*Method); |
| 163 | auto &Handler = I != Handlers.end() ? I->second : UnknownHandler; |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 164 | |
Ilya Biryukov | ee27d2e | 2017-12-14 15:04:59 +0000 | [diff] [blame] | 165 | // Create a Context that contains request information. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 166 | WithContextValue WithRequestOut(RequestOut, &Out); |
| 167 | llvm::Optional<WithContextValue> WithID; |
Ilya Biryukov | ee27d2e | 2017-12-14 15:04:59 +0000 | [diff] [blame] | 168 | if (ID) |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 169 | WithID.emplace(RequestID, *ID); |
Ilya Biryukov | ee27d2e | 2017-12-14 15:04:59 +0000 | [diff] [blame] | 170 | |
| 171 | // Create a tracing Span covering the whole request lifetime. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 172 | trace::Span Tracer(*Method); |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 173 | if (ID) |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 174 | SPAN_ATTACH(Tracer, "ID", *ID); |
| 175 | SPAN_ATTACH(Tracer, "Params", Params); |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 176 | |
Sam McCall | 1b475a1 | 2018-01-26 09:00:30 +0000 | [diff] [blame] | 177 | // Stash a reference to the span args, so later calls can add metadata. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 178 | WithContext WithRequestSpan(RequestSpan::stash(Tracer)); |
| 179 | Handler(std::move(Params)); |
Benjamin Kramer | bb1cdb6 | 2017-02-07 10:28:20 +0000 | [diff] [blame] | 180 | return true; |
| 181 | } |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 182 | |
| 183 | void clangd::runLanguageServerLoop(std::istream &In, JSONOutput &Out, |
| 184 | JSONRPCDispatcher &Dispatcher, |
| 185 | bool &IsDone) { |
| 186 | while (In.good()) { |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 187 | // A Language Server Protocol message starts with a set of HTTP headers, |
| 188 | // delimited by \r\n, and terminated by an empty line (\r\n). |
| 189 | unsigned long long ContentLength = 0; |
| 190 | while (In.good()) { |
| 191 | std::string Line; |
| 192 | std::getline(In, Line); |
| 193 | if (!In.good() && errno == EINTR) { |
| 194 | In.clear(); |
| 195 | continue; |
| 196 | } |
| 197 | |
Ilya Biryukov | e6dbb58 | 2017-10-10 09:08:47 +0000 | [diff] [blame] | 198 | Out.mirrorInput(Line); |
| 199 | // Mirror '\n' that gets consumed by std::getline, but is not included in |
| 200 | // the resulting Line. |
| 201 | // Note that '\r' is part of Line, so we don't need to mirror it |
| 202 | // separately. |
| 203 | if (!In.eof()) |
| 204 | Out.mirrorInput("\n"); |
| 205 | |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 206 | llvm::StringRef LineRef(Line); |
| 207 | |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 208 | // We allow comments in headers. Technically this isn't part |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 209 | // of the LSP specification, but makes writing tests easier. |
| 210 | if (LineRef.startswith("#")) |
| 211 | continue; |
| 212 | |
| 213 | // Content-Type is a specified header, but does nothing. |
| 214 | // Content-Length is a mandatory header. It specifies the length of the |
| 215 | // following JSON. |
| 216 | // It is unspecified what sequence headers must be supplied in, so we |
| 217 | // allow any sequence. |
| 218 | // The end of headers is signified by an empty line. |
| 219 | if (LineRef.consume_front("Content-Length: ")) { |
| 220 | if (ContentLength != 0) { |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 221 | log("Warning: Duplicate Content-Length header received. " |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 222 | "The previous value for this message (" + |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 223 | llvm::Twine(ContentLength) + ") was ignored.\n"); |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | llvm::getAsUnsignedInteger(LineRef.trim(), 0, ContentLength); |
| 227 | continue; |
| 228 | } else if (!LineRef.trim().empty()) { |
| 229 | // It's another header, ignore it. |
| 230 | continue; |
| 231 | } else { |
| 232 | // An empty line indicates the end of headers. |
| 233 | // Go ahead and read the JSON. |
| 234 | break; |
| 235 | } |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 236 | } |
| 237 | |
Benjamin Kramer | 1d05379 | 2017-10-27 17:06:41 +0000 | [diff] [blame] | 238 | // Guard against large messages. This is usually a bug in the client code |
| 239 | // and we don't want to crash downstream because of it. |
| 240 | if (ContentLength > 1 << 30) { // 1024M |
| 241 | In.ignore(ContentLength); |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 242 | log("Skipped overly large message of " + Twine(ContentLength) + |
| 243 | " bytes.\n"); |
Benjamin Kramer | 1d05379 | 2017-10-27 17:06:41 +0000 | [diff] [blame] | 244 | continue; |
| 245 | } |
| 246 | |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 247 | if (ContentLength > 0) { |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 248 | std::vector<char> JSON(ContentLength); |
Sam McCall | 8567cb3 | 2017-11-02 09:21:51 +0000 | [diff] [blame] | 249 | llvm::StringRef JSONRef; |
| 250 | { |
Sam McCall | 8567cb3 | 2017-11-02 09:21:51 +0000 | [diff] [blame] | 251 | In.read(JSON.data(), ContentLength); |
| 252 | Out.mirrorInput(StringRef(JSON.data(), In.gcount())); |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 253 | |
Sam McCall | 8567cb3 | 2017-11-02 09:21:51 +0000 | [diff] [blame] | 254 | // If the stream is aborted before we read ContentLength bytes, In |
| 255 | // will have eofbit and failbit set. |
| 256 | if (!In) { |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 257 | log("Input was aborted. Read only " + llvm::Twine(In.gcount()) + |
| 258 | " bytes of expected " + llvm::Twine(ContentLength) + ".\n"); |
Sam McCall | 8567cb3 | 2017-11-02 09:21:51 +0000 | [diff] [blame] | 259 | break; |
| 260 | } |
| 261 | |
| 262 | JSONRef = StringRef(JSON.data(), ContentLength); |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 263 | } |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 264 | |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 265 | if (auto Doc = json::parse(JSONRef)) { |
| 266 | // Log the formatted message. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 267 | log(llvm::formatv(Out.Pretty ? "<-- {0:2}\n" : "<-- {0}\n", *Doc)); |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 268 | // Finally, execute the action for this JSON message. |
| 269 | if (!Dispatcher.call(*Doc, Out)) |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 270 | log("JSON dispatch failed!\n"); |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 271 | } else { |
| 272 | // Parse error. Log the raw message. |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 273 | log("<-- " + JSONRef + "\n"); |
| 274 | log(llvm::Twine("JSON parse error: ") + |
| 275 | llvm::toString(Doc.takeError()) + "\n"); |
Sam McCall | ec10902 | 2017-11-28 09:37:43 +0000 | [diff] [blame] | 276 | } |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 277 | |
| 278 | // If we're done, exit the loop. |
| 279 | if (IsDone) |
| 280 | break; |
Ilya Biryukov | 1fab4f8 | 2017-09-04 12:28:15 +0000 | [diff] [blame] | 281 | } else { |
Sam McCall | d1a7a37 | 2018-01-31 13:40:48 +0000 | [diff] [blame^] | 282 | log("Warning: Missing Content-Length header, or message has zero " |
Ilya Biryukov | 940901e | 2017-12-13 12:51:22 +0000 | [diff] [blame] | 283 | "length.\n"); |
Ilya Biryukov | afb5554 | 2017-05-16 14:40:30 +0000 | [diff] [blame] | 284 | } |
| 285 | } |
| 286 | } |