Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/JSONHelper.java @ 16153:e8eeee2176ff
fix JSON output format
author | Christian Wirth <christian.wirth@oracle.com> |
---|---|
date | Fri, 20 Jun 2014 15:25:07 +0200 |
parents | da0847068801 |
children | 0e092c1ecd64 |
comparison
equal
deleted
inserted
replaced
16152:da0847068801 | 16153:e8eeee2176ff |
---|---|
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 public static void dumpNewNode(Node newNode) { | 49 public static void dumpNewNode(Node newNode) { |
50 if (AstJsonDumpBuilder != null) { | 50 if (AstJsonDumpBuilder != null) { |
51 AstJsonDumpBuilder.append("{ \"action\": \"createNode\", \"newId\": \"" + getID(newNode) + "\", \"newType\": \"" + getType(newNode) + "\"" + "\"newDescription\": \"" + | 51 AstJsonDumpBuilder.append("{ \"action\": \"createNode\", \"newId\": \"" + getID(newNode) + "\", \"type\": \"" + getType(newNode) + "\", \"description\": \"" + newNode.getDescription() + |
52 newNode.getDescription() + "\"" + "\"newLanguage\": \"" + newNode.getLanguage() + "\"" + getSourceSectionInfo(newNode) + " },\n"); | 52 "\", \"language\": \"" + newNode.getLanguage() + "\"" + getSourceSectionInfo(newNode) + " },\n"); |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 private static String getSourceSectionInfo(Node newNode) { | 56 private static String getSourceSectionInfo(Node newNode) { |
57 SourceSection sourceSection = newNode.getSourceSection(); | 57 SourceSection sourceSection = newNode.getSourceSection(); |