blob: a5a6bdbbcad6368ea38c2799af23993bc5f38cc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* MRustC - Rust Compiler
* - By John Hodge (Mutabah/thePowersGang)
*
* include/ident.cpp
* - Identifiers with hygiene
*/
#include <iostream>
#include <ident.hpp>
#include <debug.hpp>
#include <common.hpp> // vector print
unsigned int Ident::Hygiene::g_next_scope = 0;
bool Ident::Hygiene::is_visible(const Hygiene& src) const
{
// HACK: Disable hygiene for now
return true;
//return x.scope_index == src.scope_index;
}
::std::ostream& operator<<(::std::ostream& os, const Ident& x) {
os << x.name;
return os;
}
::std::ostream& operator<<(::std::ostream& os, const Ident::Hygiene& x) {
os << "{" << x.scope_index << "}";
return os;
}
|