Move functions from syntax::ast to syntax::ast_util

This leaves syntax::ast just defining the AST, which strikes me as somewhat
nicer
This commit is contained in:
Brian Anderson 2011-08-21 21:44:41 -07:00
parent a3affaa20f
commit 152cbaade7
33 changed files with 358 additions and 314 deletions

View file

@ -10,6 +10,8 @@ import std::option::none;
import std::ebml;
import std::map;
import syntax::ast::*;
import syntax::ast_util;
import syntax::ast_util::local_def;
import common::*;
import middle::trans_common::crate_ctxt;
import middle::ty;
@ -71,7 +73,7 @@ fn encode_native_module_item_paths(ebml_w: &ebml::writer, nmod: &native_mod,
fn encode_module_item_paths(ebml_w: &ebml::writer, module: &_mod,
path: &[str], index: &mutable [entry<str>]) {
for it: @item in module.items {
if !is_exported(it.ident, module) { cont; }
if !ast_util::is_exported(it.ident, module) { cont; }
alt it.node {
item_const(_, _) {
add_to_index(ebml_w, path, index, it.ident);