mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Set handlers use unified jsonPrint with prettifier if needed
This commit is contained in:
parent
1bc1f8bdbb
commit
96376264e8
@ -6,6 +6,7 @@ Language Features:
|
||||
Compiler Features:
|
||||
* Peephole Optimizer: Remove operations without side effects before simple terminations.
|
||||
* Assembly-Json: Export: Include source list in `sourceList` field.
|
||||
* Commandline Interface: option ``--pretty-json`` works also with the following options: ``--abi``, ``--asm-json``, ``--ast-compact-json``, ``--devdoc``, ``--storage-layout``, ``--userdoc``.
|
||||
|
||||
|
||||
Bugfixes:
|
||||
|
@ -190,9 +190,9 @@ Json::Value ASTJsonConverter::inlineAssemblyIdentifierToJson(pair<yul::Identifie
|
||||
return tuple;
|
||||
}
|
||||
|
||||
void ASTJsonConverter::print(ostream& _stream, ASTNode const& _node)
|
||||
void ASTJsonConverter::print(ostream& _stream, ASTNode const& _node, util::JsonFormat const& _format)
|
||||
{
|
||||
_stream << util::jsonPrettyPrint(toJson(_node));
|
||||
_stream << util::jsonPrint(toJson(_node), _format);
|
||||
}
|
||||
|
||||
Json::Value ASTJsonConverter::toJson(ASTNode const& _node)
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <liblangutil/Exceptions.h>
|
||||
|
||||
#include <json/json.h>
|
||||
#include <libsolutil/JSON.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
@ -58,7 +59,7 @@ public:
|
||||
std::map<std::string, unsigned> _sourceIndices = std::map<std::string, unsigned>()
|
||||
);
|
||||
/// Output the json representation of the AST to _stream.
|
||||
void print(std::ostream& _stream, ASTNode const& _node);
|
||||
void print(std::ostream& _stream, ASTNode const& _node, util::JsonFormat const& _format);
|
||||
Json::Value toJson(ASTNode const& _node);
|
||||
template <class T>
|
||||
Json::Value toJson(std::vector<ASTPointer<T>> const& _nodes)
|
||||
|
@ -317,7 +317,7 @@ void CommandLineInterface::handleABI(string const& _contract)
|
||||
if (!m_options.compiler.outputs.abi)
|
||||
return;
|
||||
|
||||
string data = jsonCompactPrint(removeNullMembers(m_compiler->contractABI(_contract)));
|
||||
string data = jsonPrint(removeNullMembers(m_compiler->contractABI(_contract)), m_options.formatting.json);
|
||||
if (!m_options.output.dir.empty())
|
||||
createFile(m_compiler->filesystemFriendlyName(_contract) + ".abi", data);
|
||||
else
|
||||
@ -331,7 +331,7 @@ void CommandLineInterface::handleStorageLayout(string const& _contract)
|
||||
if (!m_options.compiler.outputs.storageLayout)
|
||||
return;
|
||||
|
||||
string data = jsonCompactPrint(removeNullMembers(m_compiler->storageLayout(_contract)));
|
||||
string data = jsonPrint(removeNullMembers(m_compiler->storageLayout(_contract)), m_options.formatting.json);
|
||||
if (!m_options.output.dir.empty())
|
||||
createFile(m_compiler->filesystemFriendlyName(_contract) + "_storage.json", data);
|
||||
else
|
||||
@ -361,12 +361,13 @@ void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contra
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
std::string output = jsonPrettyPrint(
|
||||
std::string output = jsonPrint(
|
||||
removeNullMembers(
|
||||
_natspecDev ?
|
||||
m_compiler->natspecDev(_contract) :
|
||||
m_compiler->natspecUser(_contract)
|
||||
)
|
||||
),
|
||||
m_options.formatting.json
|
||||
);
|
||||
|
||||
if (!m_options.output.dir.empty())
|
||||
@ -892,7 +893,7 @@ void CommandLineInterface::handleAst()
|
||||
{
|
||||
stringstream data;
|
||||
string postfix = "";
|
||||
ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(data, m_compiler->ast(sourceCode.first));
|
||||
ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(data, m_compiler->ast(sourceCode.first), m_options.formatting.json);
|
||||
postfix += "_json";
|
||||
boost::filesystem::path path(sourceCode.first);
|
||||
createFile(path.filename().string() + postfix + ".ast", data.str());
|
||||
@ -904,7 +905,7 @@ void CommandLineInterface::handleAst()
|
||||
for (auto const& sourceCode: m_fileReader.sourceUnits())
|
||||
{
|
||||
sout() << endl << "======= " << sourceCode.first << " =======" << endl;
|
||||
ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(sout(), m_compiler->ast(sourceCode.first));
|
||||
ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(sout(), m_compiler->ast(sourceCode.first), m_options.formatting.json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1146,7 +1147,7 @@ void CommandLineInterface::outputCompilationResults()
|
||||
{
|
||||
string ret;
|
||||
if (m_options.compiler.outputs.asmJson)
|
||||
ret = jsonPrettyPrint(removeNullMembers(m_compiler->assemblyJSON(contract)));
|
||||
ret = util::jsonPrint(removeNullMembers(m_compiler->assemblyJSON(contract)), m_options.formatting.json);
|
||||
else
|
||||
ret = m_compiler->assemblyString(contract, m_fileReader.sourceUnits());
|
||||
|
||||
|
@ -1 +1 @@
|
||||
--asm-json
|
||||
--asm-json --pretty-json
|
||||
|
1
test/cmdlineTests/asm_json_no_pretty_print/args
Normal file
1
test/cmdlineTests/asm_json_no_pretty_print/args
Normal file
@ -0,0 +1 @@
|
||||
--asm-json
|
9
test/cmdlineTests/asm_json_no_pretty_print/input.sol
Normal file
9
test/cmdlineTests/asm_json_no_pretty_print/input.sol
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
|
||||
contract C {
|
||||
function f(uint x) public pure {
|
||||
x += 42;
|
||||
require(x > 100);
|
||||
}
|
||||
}
|
4
test/cmdlineTests/asm_json_no_pretty_print/output
Normal file
4
test/cmdlineTests/asm_json_no_pretty_print/output
Normal file
File diff suppressed because one or more lines are too long
1
test/cmdlineTests/ast_compact_json_no_pretty_json/args
Normal file
1
test/cmdlineTests/ast_compact_json_no_pretty_json/args
Normal file
@ -0,0 +1 @@
|
||||
--ast-compact-json --allow-paths .
|
@ -0,0 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
|
||||
contract C {}
|
5
test/cmdlineTests/ast_compact_json_no_pretty_json/output
Normal file
5
test/cmdlineTests/ast_compact_json_no_pretty_json/output
Normal file
@ -0,0 +1,5 @@
|
||||
JSON AST (compact format):
|
||||
|
||||
|
||||
======= ast_compact_json_no_pretty_json/input.sol =======
|
||||
{"absolutePath":"ast_compact_json_no_pretty_json/input.sol","exportedSymbols":{"C":[2]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":2,"linearizedBaseContracts":[2],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":3,"src":"60:13:0","usedErrors":[]}],"src":"36:38:0"}
|
@ -1 +1 @@
|
||||
--ast-compact-json --base-path . --allow-paths .
|
||||
--ast-compact-json --pretty-json --base-path . --allow-paths .
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"contracts":
|
||||
{
|
||||
"pretty_json_combined/input.sol:C":
|
||||
"combined_json_abi/input.sol:C":
|
||||
{
|
||||
"abi": []
|
||||
}
|
1
test/cmdlineTests/combined_json_no_pretty_print/args
Normal file
1
test/cmdlineTests/combined_json_no_pretty_print/args
Normal file
@ -0,0 +1 @@
|
||||
--combined-json abi
|
@ -0,0 +1,3 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
contract C {}
|
1
test/cmdlineTests/combined_json_no_pretty_print/output
Normal file
1
test/cmdlineTests/combined_json_no_pretty_print/output
Normal file
@ -0,0 +1 @@
|
||||
{"contracts":{"combined_json_no_pretty_print/input.sol:C":{"abi":[]}},"version": "<VERSION REMOVED>"}
|
@ -1 +1 @@
|
||||
--combined-json ast --base-path . --allow-paths .
|
||||
--combined-json ast --pretty-json --base-path . --allow-paths .
|
||||
|
@ -1 +1,111 @@
|
||||
{"contracts":{"combined_json_with_base_path/c.sol:C":{}},"sourceList":["combined_json_with_base_path/c.sol","combined_json_with_base_path/input.sol"],"sources":{"combined_json_with_base_path/c.sol":{"AST":{"absolutePath":"combined_json_with_base_path/c.sol","exportedSymbols":{"C":[5]},"id":6,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":4,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":6,"src":"60:13:0","usedErrors":[]}],"src":"36:38:0"}},"combined_json_with_base_path/input.sol":{"AST":{"absolutePath":"combined_json_with_base_path/input.sol","exportedSymbols":{"C":[5]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:1"},{"absolutePath":"combined_json_with_base_path/c.sol","file":"./c.sol","id":2,"nameLocation":"-1:-1:-1","nodeType":"ImportDirective","scope":3,"sourceUnit":6,"src":"60:17:1","symbolAliases":[],"unitAlias":""}],"src":"36:42:1"}}},"version": "<VERSION REMOVED>"}
|
||||
{
|
||||
"contracts":
|
||||
{
|
||||
"combined_json_with_base_path/c.sol:C": {}
|
||||
},
|
||||
"sourceList":
|
||||
[
|
||||
"combined_json_with_base_path/c.sol",
|
||||
"combined_json_with_base_path/input.sol"
|
||||
],
|
||||
"sources":
|
||||
{
|
||||
"combined_json_with_base_path/c.sol":
|
||||
{
|
||||
"AST":
|
||||
{
|
||||
"absolutePath": "combined_json_with_base_path/c.sol",
|
||||
"exportedSymbols":
|
||||
{
|
||||
"C":
|
||||
[
|
||||
5
|
||||
]
|
||||
},
|
||||
"id": 6,
|
||||
"license": "GPL-3.0",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes":
|
||||
[
|
||||
{
|
||||
"id": 4,
|
||||
"literals":
|
||||
[
|
||||
"solidity",
|
||||
">=",
|
||||
"0.0"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "36:22:0"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"canonicalName": "C",
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"fullyImplemented": true,
|
||||
"id": 5,
|
||||
"linearizedBaseContracts":
|
||||
[
|
||||
5
|
||||
],
|
||||
"name": "C",
|
||||
"nameLocation": "69:1:0",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [],
|
||||
"scope": 6,
|
||||
"src": "60:13:0",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "36:38:0"
|
||||
}
|
||||
},
|
||||
"combined_json_with_base_path/input.sol":
|
||||
{
|
||||
"AST":
|
||||
{
|
||||
"absolutePath": "combined_json_with_base_path/input.sol",
|
||||
"exportedSymbols":
|
||||
{
|
||||
"C":
|
||||
[
|
||||
5
|
||||
]
|
||||
},
|
||||
"id": 3,
|
||||
"license": "GPL-3.0",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes":
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"literals":
|
||||
[
|
||||
"solidity",
|
||||
">=",
|
||||
"0.0"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "36:22:1"
|
||||
},
|
||||
{
|
||||
"absolutePath": "combined_json_with_base_path/c.sol",
|
||||
"file": "./c.sol",
|
||||
"id": 2,
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 3,
|
||||
"sourceUnit": 6,
|
||||
"src": "60:17:1",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
}
|
||||
],
|
||||
"src": "36:42:1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "<VERSION REMOVED>"
|
||||
}
|
||||
|
1
test/cmdlineTests/combined_json_with_devdoc/args
Normal file
1
test/cmdlineTests/combined_json_with_devdoc/args
Normal file
@ -0,0 +1 @@
|
||||
--combined-json devdoc --pretty-json --allow-paths .
|
8
test/cmdlineTests/combined_json_with_devdoc/input.sol
Normal file
8
test/cmdlineTests/combined_json_with_devdoc/input.sol
Normal file
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
|
||||
/// @dev This is devdoc.
|
||||
contract C {}
|
||||
|
||||
/// And this is a notice.
|
||||
contract D {}
|
25
test/cmdlineTests/combined_json_with_devdoc/output
Normal file
25
test/cmdlineTests/combined_json_with_devdoc/output
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"contracts":
|
||||
{
|
||||
"combined_json_with_devdoc/input.sol:C":
|
||||
{
|
||||
"devdoc":
|
||||
{
|
||||
"details": "This is devdoc.",
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
"combined_json_with_devdoc/input.sol:D":
|
||||
{
|
||||
"devdoc":
|
||||
{
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "<VERSION REMOVED>"
|
||||
}
|
1
test/cmdlineTests/combined_json_with_userdoc/args
Normal file
1
test/cmdlineTests/combined_json_with_userdoc/args
Normal file
@ -0,0 +1 @@
|
||||
--combined-json userdoc --pretty-json --allow-paths .
|
8
test/cmdlineTests/combined_json_with_userdoc/input.sol
Normal file
8
test/cmdlineTests/combined_json_with_userdoc/input.sol
Normal file
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
|
||||
/// @notice Description for users.
|
||||
contract C {}
|
||||
|
||||
/// @dev Description for developers.
|
||||
contract D {}
|
25
test/cmdlineTests/combined_json_with_userdoc/output
Normal file
25
test/cmdlineTests/combined_json_with_userdoc/output
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"contracts":
|
||||
{
|
||||
"combined_json_with_userdoc/input.sol:C":
|
||||
{
|
||||
"userdoc":
|
||||
{
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"notice": "Description for users.",
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
"combined_json_with_userdoc/input.sol:D":
|
||||
{
|
||||
"userdoc":
|
||||
{
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "<VERSION REMOVED>"
|
||||
}
|
@ -1 +1 @@
|
||||
--error-recovery --ast-compact-json --hashes
|
||||
--error-recovery --ast-compact-json --pretty-json --hashes
|
||||
|
10
test/cmdlineTests/standard_json_no_pretty_print/input.json
Normal file
10
test/cmdlineTests/standard_json_no_pretty_print/input.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; contract C {}"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
{"sources":{"A":{"id":0}}}
|
@ -1 +1 @@
|
||||
--storage-layout
|
||||
--storage-layout --pretty-json
|
||||
|
@ -1,4 +1,87 @@
|
||||
|
||||
======= storage_layout_user_defined/input.sol:C =======
|
||||
Contract Storage Layout:
|
||||
{"storage":[{"astId":7,"contract":"storage_layout_user_defined/input.sol:C","label":"a","offset":0,"slot":"0","type":"t_userDefinedValueType(MyInt128)2"},{"astId":10,"contract":"storage_layout_user_defined/input.sol:C","label":"b","offset":16,"slot":"0","type":"t_userDefinedValueType(MyInt128)2"},{"astId":13,"contract":"storage_layout_user_defined/input.sol:C","label":"c","offset":0,"slot":"1","type":"t_userDefinedValueType(MyInt128)2"},{"astId":16,"contract":"storage_layout_user_defined/input.sol:C","label":"d","offset":16,"slot":"1","type":"t_userDefinedValueType(MyInt8)4"},{"astId":19,"contract":"storage_layout_user_defined/input.sol:C","label":"e","offset":17,"slot":"1","type":"t_userDefinedValueType(MyInt8)4"},{"astId":22,"contract":"storage_layout_user_defined/input.sol:C","label":"f","offset":18,"slot":"1","type":"t_userDefinedValueType(MyInt8)4"},{"astId":25,"contract":"storage_layout_user_defined/input.sol:C","label":"g","offset":19,"slot":"1","type":"t_userDefinedValueType(MyInt8)4"},{"astId":28,"contract":"storage_layout_user_defined/input.sol:C","label":"h","offset":20,"slot":"1","type":"t_userDefinedValueType(MyInt8)4"}],"types":{"t_userDefinedValueType(MyInt128)2":{"encoding":"inplace","label":"MyInt128","numberOfBytes":"16"},"t_userDefinedValueType(MyInt8)4":{"encoding":"inplace","label":"MyInt8","numberOfBytes":"1"}}}
|
||||
{
|
||||
"storage":
|
||||
[
|
||||
{
|
||||
"astId": 7,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "a",
|
||||
"offset": 0,
|
||||
"slot": "0",
|
||||
"type": "t_userDefinedValueType(MyInt128)2"
|
||||
},
|
||||
{
|
||||
"astId": 10,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "b",
|
||||
"offset": 16,
|
||||
"slot": "0",
|
||||
"type": "t_userDefinedValueType(MyInt128)2"
|
||||
},
|
||||
{
|
||||
"astId": 13,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "c",
|
||||
"offset": 0,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt128)2"
|
||||
},
|
||||
{
|
||||
"astId": 16,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "d",
|
||||
"offset": 16,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt8)4"
|
||||
},
|
||||
{
|
||||
"astId": 19,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "e",
|
||||
"offset": 17,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt8)4"
|
||||
},
|
||||
{
|
||||
"astId": 22,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "f",
|
||||
"offset": 18,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt8)4"
|
||||
},
|
||||
{
|
||||
"astId": 25,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "g",
|
||||
"offset": 19,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt8)4"
|
||||
},
|
||||
{
|
||||
"astId": 28,
|
||||
"contract": "storage_layout_user_defined/input.sol:C",
|
||||
"label": "h",
|
||||
"offset": 20,
|
||||
"slot": "1",
|
||||
"type": "t_userDefinedValueType(MyInt8)4"
|
||||
}
|
||||
],
|
||||
"types":
|
||||
{
|
||||
"t_userDefinedValueType(MyInt128)2":
|
||||
{
|
||||
"encoding": "inplace",
|
||||
"label": "MyInt128",
|
||||
"numberOfBytes": "16"
|
||||
},
|
||||
"t_userDefinedValueType(MyInt8)4":
|
||||
{
|
||||
"encoding": "inplace",
|
||||
"label": "MyInt8",
|
||||
"numberOfBytes": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
--storage-layout
|
@ -0,0 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL v3
|
||||
pragma solidity >=0.0;
|
||||
|
||||
contract C {}
|
@ -0,0 +1,4 @@
|
||||
|
||||
======= storage_layout_user_defined_no_pretty_print/input.sol:C =======
|
||||
Contract Storage Layout:
|
||||
{"storage":[]}
|
@ -20,6 +20,7 @@
|
||||
#include <libsolidity/ast/ASTJsonConverter.h>
|
||||
#include <libsolutil/AnsiColorized.h>
|
||||
#include <libsolutil/CommonIO.h>
|
||||
#include <libsolutil/JSON.h>
|
||||
|
||||
#include <test/Common.h>
|
||||
#include <test/libsolidity/ASTJSONTest.h>
|
||||
@ -248,7 +249,7 @@ bool ASTJSONTest::runTest(
|
||||
for (size_t i = 0; i < m_sources.size(); i++)
|
||||
{
|
||||
ostringstream result;
|
||||
ASTJsonConverter(_compiler.state(), _sourceIndices).print(result, _compiler.ast(m_sources[i].first));
|
||||
ASTJsonConverter(_compiler.state(), _sourceIndices).print(result, _compiler.ast(m_sources[i].first), JsonFormat{ JsonFormat::Pretty });
|
||||
_variant.result += result.str();
|
||||
if (i != m_sources.size() - 1)
|
||||
_variant.result += ",";
|
||||
|
Loading…
Reference in New Issue
Block a user