rustc: Move ext to librustsyntax

This commit is contained in:
Brian Anderson 2012-03-29 13:48:05 -07:00
parent 14e9f58b50
commit 106c9faa59
14 changed files with 45 additions and 46 deletions

View File

@ -73,10 +73,17 @@ import base::*;
import codemap::span;
import std::map;
import std::map::hashmap;
import syntax::attr;
export expand;
// Transitional reexports so qquote can find the paths it is looking for
mod syntax {
import ext;
export ext;
import parse;
export parse;
}
type ser_tps_map = map::hashmap<str, fn@(@ast::expr) -> [@ast::stmt]>;
type deser_tps_map = map::hashmap<str, fn@() -> @ast::expr>;

View File

@ -1,6 +1,6 @@
import std::map::hashmap;
import syntax::parse::parser;
import driver::diagnostic::span_handler;
import parse::parser;
import diagnostic::span_handler;
import codemap::{codemap, span, expn_info, expanded_from};
import std::map::str_hash;

View File

@ -1,5 +1,5 @@
import codemap::span;
import syntax::ext::base::ext_ctxt;
import base::ext_ctxt;
// NOTE: Moved from fmt.rs which had this fixme:
// FIXME: Cleanup the naming of these functions

View File

@ -1,5 +1,4 @@
import base::*;
import syntax::ast;
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
_body: ast::mac_body) -> @ast::expr {

View File

@ -1,16 +1,11 @@
import driver::session;
import driver::session::session;
import std::map::hashmap;
import syntax::attr;
import syntax::ast::{crate, expr_, expr_mac, mac_invoc};
import syntax::fold::*;
import syntax::ext::base::*;
import syntax::ext::qquote::{qq_helper};
import syntax::parse::parser;
import syntax::parse::parser::parse_expr_from_source_str;
import ast::{crate, expr_, expr_mac, mac_invoc};
import fold::*;
import ext::base::*;
import ext::qquote::{qq_helper};
import parse::parser;
import parse::parser::parse_expr_from_source_str;
import codemap::{span, expanded_from};

View File

@ -8,7 +8,7 @@
import extfmt::ct::*;
import base::*;
import codemap::span;
import syntax::ext::build::*;
import ext::build::*;
export expand_syntax_ext;
fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: ast::mac_arg,

View File

@ -1,5 +1,4 @@
import base::*;
import syntax::ast;
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
_body: ast::mac_body) -> @ast::expr {

View File

@ -1,5 +1,4 @@
import base::*;
import syntax::ast;
import io::writer_util;
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,

View File

@ -1,13 +1,13 @@
import syntax::ast::{crate, expr_, mac_invoc,
import ast::{crate, expr_, mac_invoc,
mac_aq, mac_var};
import syntax::fold::*;
import syntax::visit::*;
import syntax::ext::base::*;
import syntax::ext::build::*;
import syntax::parse::parser;
import syntax::parse::parser::{parser, parse_from_source_str};
import fold::*;
import visit::*;
import ext::base::*;
import ext::build::*;
import parse::parser;
import parse::parser::{parser, parse_from_source_str};
import syntax::print::*;
import print::*;
import io::*;
import codemap::span;
@ -127,7 +127,7 @@ fn visit_aq_ty(node: @ast::ty, &&cx: aq_ctxt, v: vt<aq_ctxt>) {
}
fn is_space(c: char) -> bool {
syntax::parse::lexer::is_whitespace(c)
parse::lexer::is_whitespace(c)
}
fn expand_ast(ecx: ext_ctxt, _sp: span,

View File

@ -26,4 +26,19 @@ mod parse {
mod print {
mod pp;
mod pprust;
}
}
mod ext {
mod base;
mod expand;
mod qquote;
mod build;
mod fmt;
mod env;
mod simplext;
mod concat_idents;
mod ident_to_str;
mod log_syntax;
mod auto_serialize;
}

View File

@ -68,23 +68,7 @@ mod middle {
}
}
mod syntax {
mod ext {
mod base;
mod expand;
mod qquote;
mod build;
mod fmt;
mod env;
mod simplext;
mod concat_idents;
mod ident_to_str;
mod log_syntax;
mod auto_serialize;
}
}
mod syntax;
mod front {
mod config;

View File

@ -26,4 +26,5 @@ export util;
import rustsyntax::attr;
export attr;
import rustsyntax::ext;
export ext;