Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1680)

Unified Diff: runtime/vm/json_stream.cc

Issue 1150303004: Switch to using SourceLocation universally in service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: post merge Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 2470d19c4ff47890b38f895e305b5fd0d0de8ee7..71d30a9b0168b73de9912b7c24e81e3a65d27c6c 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -577,6 +577,20 @@ void JSONObject::AddFixedServiceId(const char* format, ...) const {
}
+void JSONObject::AddLocation(const Script& script,
+ intptr_t token_pos,
+ intptr_t end_token_pos) {
+ JSONObject location(this, "location");
+ location.AddProperty("type", "SourceLocation");
+ location.AddProperty("script", script);
+ location.AddProperty("tokenPos", token_pos);
+ if (end_token_pos >= 0) {
+ location.AddProperty("endTokenPos", end_token_pos);
+ }
+}
+
+
+
void JSONObject::AddPropertyF(const char* name,
const char* format, ...) const {
stream_->PrintPropertyName(name);
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698