mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #794 from chriseth/fixastsource
Fix segfault in ast output.
This commit is contained in:
		
						commit
						55858de1e9
					
				| @ -86,7 +86,7 @@ string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location) | ||||
| 
 | ||||
| ASTJsonConverter::ASTJsonConverter( | ||||
| 	ASTNode const& _ast, | ||||
| 	map<string, unsigned> const& _sourceIndices | ||||
| 	map<string, unsigned> _sourceIndices | ||||
| ): m_ast(&_ast), m_sourceIndices(_sourceIndices) | ||||
| { | ||||
| 	Json::Value children(Json::arrayValue); | ||||
|  | ||||
| @ -45,7 +45,7 @@ public: | ||||
| 	/// @a _sourceIndices is used to abbreviate source names in source locations.
 | ||||
| 	explicit ASTJsonConverter( | ||||
| 		ASTNode const& _ast, | ||||
| 		std::map<std::string, unsigned> const& _sourceIndices = std::map<std::string, unsigned>() | ||||
| 		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); | ||||
| @ -141,7 +141,7 @@ private: | ||||
| 	Json::Value m_astJson; | ||||
| 	std::stack<Json::Value*> m_jsonNodePtrs; | ||||
| 	ASTNode const* m_ast; | ||||
| 	std::map<std::string, unsigned> const& m_sourceIndices; | ||||
| 	std::map<std::string, unsigned> m_sourceIndices; | ||||
| }; | ||||
| 
 | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user