summaryrefslogtreecommitdiff
path: root/src/ast/ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-06-04 13:21:22 +0800
committerJohn Hodge <tpg@mutabah.net>2018-06-04 13:21:22 +0800
commit42bdc18d4ba8f9fd19109050eb83bb6615539a75 (patch)
tree88501e01485038ad879160383b60c2e02b97f96e /src/ast/ast.cpp
parent8d99deade68a9c995101fd5944f9011fcf3dccc7 (diff)
downloadmrust-42bdc18d4ba8f9fd19109050eb83bb6615539a75.tar.gz
All - Ensure that all files have a header comment, remove some dead code
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r--src/ast/ast.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index 4fdf8f9d..e4fe49da 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -1,4 +1,9 @@
/*
+ * MRustC - Rust Compiler
+ * - By John Hodge (Mutabah/thePowersGang)
+ *
+ * ast/ast.cpp
+ * - Implementation of the various AST classes
*/
#include "ast.hpp"
#include "crate.hpp"
@@ -236,16 +241,6 @@ bool Impl::has_named_item(const ::std::string& name) const
return os << impl.m_def;
}
-::rust::option<char> ImplRef::find_named_item(const ::std::string& name) const
-{
- if( this->impl.has_named_item(name) ) {
- return ::rust::Some(' ');
- }
- else {
- return ::rust::None<char>();
- }
-}
-
::std::ostream& operator<<(::std::ostream& os, const UseStmt& x)
{
os << "Use(" << x.path << ")";
@@ -311,7 +306,7 @@ void Module::add_macro(bool is_exported, ::std::string name, MacroRulesPtr macro
m_macros.push_back( Named<MacroRulesPtr>( mv$(name), mv$(macro), is_exported ) );
}
void Module::add_macro_import(::std::string name, const MacroRules& mr) {
- m_macro_import_res.push_back( NamedNS<const MacroRules*>( mv$(name), &mr, false ) );
+ m_macro_import_res.push_back( Named<const MacroRules*>( mv$(name), &mr, false ) );
}
Item Item::clone() const