Rename ast to legacyAST in StandardCompiler

This commit is contained in:
Alex Beregszaszi 2017-04-19 18:53:39 +01:00
parent a24ac2f285
commit 6ae7a87b78
2 changed files with 8 additions and 5 deletions

View File

@ -121,7 +121,8 @@ Input Description
// //
// The available output types are as follows: // The available output types are as follows:
// abi - ABI // abi - ABI
// ast - AST of all source files // ast - AST of all source files (not supported atm)
// legacyAST - legacy AST of all source files
// why3 - Why3 translated output // why3 - Why3 translated output
// devdoc - Developer documentation (natspec) // devdoc - Developer documentation (natspec)
// userdoc - User documentation (natspec) // userdoc - User documentation (natspec)
@ -155,9 +156,9 @@ Input Description
"*": { "*": {
"*": [ "evm.sourceMap" ] "*": [ "evm.sourceMap" ]
}, },
// Enable the AST and Why3 output of every single file. // Enable the legacy AST and Why3 output of every single file.
"*": { "*": {
"": [ "ast", "why3" ] "": [ "legacyAST", "why3" ]
} }
} }
} }
@ -197,7 +198,9 @@ Output Description
// Identifier (used in source maps) // Identifier (used in source maps)
id: 1, id: 1,
// The AST object // The AST object
ast: {} ast: {},
// The legacy AST object
legacyAST: {}
} }
}, },
// This contains the contract-level outputs. It can be limited/filtered by the outputSelection settings. // This contains the contract-level outputs. It can be limited/filtered by the outputSelection settings.

View File

@ -301,7 +301,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
{ {
Json::Value sourceResult = Json::objectValue; Json::Value sourceResult = Json::objectValue;
sourceResult["id"] = sourceIndex++; sourceResult["id"] = sourceIndex++;
sourceResult["ast"] = ASTJsonConverter(m_compilerStack.ast(source), m_compilerStack.sourceIndices()).json(); sourceResult["legacyAST"] = ASTJsonConverter(m_compilerStack.ast(source), m_compilerStack.sourceIndices()).json();
output["sources"][source] = sourceResult; output["sources"][source] = sourceResult;
} }