aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-20 20:00:37 +0800
committerChristian <c@ethdev.com>2014-10-20 22:23:49 +0800
commit309ac55e3665ba60fd72bb2e6084215b84af4b10 (patch)
tree731262f829c264eb97303cc0d71f5ba3bb0262b1 /main.cpp
parent8c0b7054f3849fcf2b611c4aa21af6a53dd4b57e (diff)
downloaddexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar.gz
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar.bz2
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar.lz
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar.xz
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.tar.zst
dexon-solidity-309ac55e3665ba60fd72bb2e6084215b84af4b10.zip
Pointer type cleanup: Use ASTPointer only for AST nodes and shared_ptr for type
pointer.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index a2b79146..e155b0fe 100644
--- a/main.cpp
+++ b/main.cpp
@@ -15,9 +15,9 @@ namespace dev
namespace solidity
{
-ptr<ContractDefinition> parseAST(std::string const& _source)
+ASTPointer<ContractDefinition> parseAST(std::string const& _source)
{
- ptr<Scanner> scanner = std::make_shared<Scanner>(CharStream(_source));
+ ASTPointer<Scanner> scanner = std::make_shared<Scanner>(CharStream(_source));
Parser parser;
return parser.parse(scanner);
}
@@ -73,7 +73,7 @@ int main(int argc, char** argv)
}
std::cout << "Parsing..." << std::endl;
// @todo catch exception
- dev::solidity::ptr<dev::solidity::ContractDefinition> ast = dev::solidity::parseAST(src);
+ dev::solidity::ASTPointer<dev::solidity::ContractDefinition> ast = dev::solidity::parseAST(src);
std::cout << "Syntax tree for the contract:" << std::endl;
dev::solidity::ASTPrinter printer(ast, src);
printer.print(std::cout);