rustc: Move ext to librustsyntax
This commit is contained in:
@@ -73,10 +73,17 @@ import base::*;
|
|||||||
import codemap::span;
|
import codemap::span;
|
||||||
import std::map;
|
import std::map;
|
||||||
import std::map::hashmap;
|
import std::map::hashmap;
|
||||||
import syntax::attr;
|
|
||||||
|
|
||||||
export expand;
|
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 ser_tps_map = map::hashmap<str, fn@(@ast::expr) -> [@ast::stmt]>;
|
||||||
type deser_tps_map = map::hashmap<str, fn@() -> @ast::expr>;
|
type deser_tps_map = map::hashmap<str, fn@() -> @ast::expr>;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import std::map::hashmap;
|
import std::map::hashmap;
|
||||||
import syntax::parse::parser;
|
import parse::parser;
|
||||||
import driver::diagnostic::span_handler;
|
import diagnostic::span_handler;
|
||||||
import codemap::{codemap, span, expn_info, expanded_from};
|
import codemap::{codemap, span, expn_info, expanded_from};
|
||||||
import std::map::str_hash;
|
import std::map::str_hash;
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import codemap::span;
|
import codemap::span;
|
||||||
import syntax::ext::base::ext_ctxt;
|
import base::ext_ctxt;
|
||||||
|
|
||||||
// NOTE: Moved from fmt.rs which had this fixme:
|
// NOTE: Moved from fmt.rs which had this fixme:
|
||||||
// FIXME: Cleanup the naming of these functions
|
// FIXME: Cleanup the naming of these functions
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import base::*;
|
import base::*;
|
||||||
import syntax::ast;
|
|
||||||
|
|
||||||
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
||||||
_body: ast::mac_body) -> @ast::expr {
|
_body: ast::mac_body) -> @ast::expr {
|
||||||
@@ -1,16 +1,11 @@
|
|||||||
import driver::session;
|
|
||||||
import driver::session::session;
|
|
||||||
|
|
||||||
import std::map::hashmap;
|
import std::map::hashmap;
|
||||||
|
|
||||||
import syntax::attr;
|
import ast::{crate, expr_, expr_mac, mac_invoc};
|
||||||
|
import fold::*;
|
||||||
import syntax::ast::{crate, expr_, expr_mac, mac_invoc};
|
import ext::base::*;
|
||||||
import syntax::fold::*;
|
import ext::qquote::{qq_helper};
|
||||||
import syntax::ext::base::*;
|
import parse::parser;
|
||||||
import syntax::ext::qquote::{qq_helper};
|
import parse::parser::parse_expr_from_source_str;
|
||||||
import syntax::parse::parser;
|
|
||||||
import syntax::parse::parser::parse_expr_from_source_str;
|
|
||||||
|
|
||||||
|
|
||||||
import codemap::{span, expanded_from};
|
import codemap::{span, expanded_from};
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
import extfmt::ct::*;
|
import extfmt::ct::*;
|
||||||
import base::*;
|
import base::*;
|
||||||
import codemap::span;
|
import codemap::span;
|
||||||
import syntax::ext::build::*;
|
import ext::build::*;
|
||||||
export expand_syntax_ext;
|
export expand_syntax_ext;
|
||||||
|
|
||||||
fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
|
fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import base::*;
|
import base::*;
|
||||||
import syntax::ast;
|
|
||||||
|
|
||||||
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
||||||
_body: ast::mac_body) -> @ast::expr {
|
_body: ast::mac_body) -> @ast::expr {
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import base::*;
|
import base::*;
|
||||||
import syntax::ast;
|
|
||||||
import io::writer_util;
|
import io::writer_util;
|
||||||
|
|
||||||
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import syntax::ast::{crate, expr_, mac_invoc,
|
import ast::{crate, expr_, mac_invoc,
|
||||||
mac_aq, mac_var};
|
mac_aq, mac_var};
|
||||||
import syntax::fold::*;
|
import fold::*;
|
||||||
import syntax::visit::*;
|
import visit::*;
|
||||||
import syntax::ext::base::*;
|
import ext::base::*;
|
||||||
import syntax::ext::build::*;
|
import ext::build::*;
|
||||||
import syntax::parse::parser;
|
import parse::parser;
|
||||||
import syntax::parse::parser::{parser, parse_from_source_str};
|
import parse::parser::{parser, parse_from_source_str};
|
||||||
|
|
||||||
import syntax::print::*;
|
import print::*;
|
||||||
import io::*;
|
import io::*;
|
||||||
|
|
||||||
import codemap::span;
|
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 {
|
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,
|
fn expand_ast(ecx: ext_ctxt, _sp: span,
|
||||||
@@ -26,4 +26,19 @@ mod parse {
|
|||||||
mod print {
|
mod print {
|
||||||
mod pp;
|
mod pp;
|
||||||
mod pprust;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -68,23 +68,7 @@ mod middle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod syntax;
|
||||||
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 front {
|
mod front {
|
||||||
mod config;
|
mod config;
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ export util;
|
|||||||
import rustsyntax::attr;
|
import rustsyntax::attr;
|
||||||
export attr;
|
export attr;
|
||||||
|
|
||||||
|
import rustsyntax::ext;
|
||||||
export ext;
|
export ext;
|
||||||
|
|||||||
Reference in New Issue
Block a user