Skip to content

Commit 5da76ac

Browse files
committed
---
yaml --- r: 15216 b: refs/heads/try c: 442d0a7 h: refs/heads/master v: v3
1 parent 2f8816a commit 5da76ac

File tree

11 files changed

+33
-36
lines changed

11 files changed

+33
-36
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 15947f8b193126234b2712beca739bc6c4abbf43
5+
refs/heads/try: 442d0a783ad28abe821d64a20e15a789254707ed
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/front/attr.rs renamed to branches/try/src/librustsyntax/attr.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import std::map;
44
import std::map::hashmap;
55
import either::either;
6-
import syntax::{ast, ast_util};
7-
import driver::diagnostic::span_handler;
6+
import diagnostic::span_handler;
87

98
export attr_meta;
109
export attr_metas;
@@ -169,10 +168,10 @@ fn eq(a: @ast::meta_item, b: @ast::meta_item) -> bool {
169168

170169
fn contains(haystack: [@ast::meta_item], needle: @ast::meta_item) -> bool {
171170
#debug("looking for %s",
172-
syntax::print::pprust::meta_item_to_str(*needle));
171+
print::pprust::meta_item_to_str(*needle));
173172
for item: @ast::meta_item in haystack {
174173
#debug("looking in %s",
175-
syntax::print::pprust::meta_item_to_str(*item));
174+
print::pprust::meta_item_to_str(*item));
176175
if eq(item, needle) { #debug("found it!"); ret true; }
177176
}
178177
#debug("found it not :(");

branches/try/src/rustc/syntax/parse/eval.rs renamed to branches/try/src/librustsyntax/parse/eval.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import front::attr;
2-
import syntax::ast;
3-
import syntax::parse::token;
4-
import syntax::parse::parser::{parser, new_parser_from_file,
5-
parse_inner_attrs_and_next,
6-
parse_mod_items, SOURCE_FILE};
1+
import attr;
2+
import parser::{parser, new_parser_from_file,
3+
parse_inner_attrs_and_next,
4+
parse_mod_items, SOURCE_FILE};
75

86
export eval_crate_directives_to_mod;
97

@@ -109,8 +107,8 @@ fn eval_crate_directive(cx: ctx, cdir: @ast::crate_directive, prefix: str,
109107
let m0 = parse_mod_items(p0, token::EOF, first_item_outer_attrs);
110108

111109
let i =
112-
syntax::parse::parser::mk_item(p0, cdir.span.lo, cdir.span.hi, id,
113-
ast::item_mod(m0), mod_attrs);
110+
parser::mk_item(p0, cdir.span.lo, cdir.span.hi, id,
111+
ast::item_mod(m0), mod_attrs);
114112
// Thread defids, chpos and byte_pos through the parsers
115113
cx.sess.chpos = p0.reader.chpos;
116114
cx.sess.byte_pos = cx.sess.byte_pos + p0.reader.pos;

branches/try/src/rustc/syntax/parse/parser.rs renamed to branches/try/src/librustsyntax/parse/parser.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import codemap::{span,fss_none};
66
import util::interner;
77
import ast::{node_id, spanned};
88
import ast_util::{mk_sp, ident_to_path};
9-
import front::attr;
109
import lexer::reader;
11-
import driver::diagnostic;
1210

1311
enum restriction {
1412
UNRESTRICTED,

branches/try/src/rustc/syntax/print/pprust.rs renamed to branches/try/src/librustsyntax/print/pprust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import parse::lexer;
2-
import syntax::codemap::codemap;
2+
import codemap::codemap;
33
import pp::{break_offset, word, printer,
44
space, zerobreak, hardbreak, breaks, consistent,
55
inconsistent, eof};
6-
import driver::diagnostic;
6+
import diagnostic;
77

88
// The ps is stored here to prevent recursive type.
99
enum ann_node {

branches/try/src/librustsyntax/rustsyntax.rc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use std;
88

9+
mod attr;
910
mod diagnostic;
1011
mod codemap;
1112
mod ast;
@@ -16,6 +17,13 @@ mod util {
1617
mod interner;
1718
}
1819
mod parse {
19-
mod token;
20+
mod eval;
2021
mod lexer;
22+
mod parser;
23+
mod token;
24+
}
25+
26+
mod print {
27+
mod pp;
28+
mod pprust;
2129
}

branches/try/src/rustc/front.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import rustsyntax::attr;
2+
export attr;
3+
4+
export config;
5+
export test;
6+
export core_inject;

branches/try/src/rustc/rustc.rc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ mod middle {
7070

7171

7272
mod syntax {
73-
mod parse {
74-
mod parser;
75-
mod eval;
76-
}
7773
mod ext {
7874
mod base;
7975
mod expand;
@@ -88,14 +84,9 @@ mod syntax {
8884
mod log_syntax;
8985
mod auto_serialize;
9086
}
91-
mod print {
92-
mod pprust;
93-
mod pp;
94-
}
9587
}
9688

9789
mod front {
98-
mod attr;
9990
mod config;
10091
mod test;
10192
mod core_inject;

branches/try/src/rustc/syntax.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ export visit;
1414
import rustsyntax::fold;
1515
export fold;
1616

17+
import rustsyntax::print;
18+
export print;
19+
20+
import rustsyntax::parse;
21+
export parse;
22+
1723
export ast;
1824
export ast_util;
1925
export visit;
2026
export fold;
21-
export parse;
2227
export ext;
23-
export print;
2428
export util;
2529

2630
mod util {

branches/try/src/rustc/syntax/parse.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)