diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-11-14 22:27:53 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-11-15 14:24:53 -0800 |
| commit | 4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736 (patch) | |
| tree | 6109fe27f2ae9a5d984aeb72c97d41efc15f104d /src/libsyntax/parse/eval.rs | |
| parent | b1dff40bae94dd0fd1e4846fd7b76723d0a3f9f9 (diff) | |
| download | rust-4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736.tar.gz rust-4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736.zip | |
Refactor the lexer to use FilePos types
Diffstat (limited to 'src/libsyntax/parse/eval.rs')
| -rw-r--r-- | src/libsyntax/parse/eval.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs index bfbec5c530f..47dbc0cd6ee 100644 --- a/src/libsyntax/parse/eval.rs +++ b/src/libsyntax/parse/eval.rs @@ -1,8 +1,8 @@ +use parse::update_parse_sess_position; use parser::{Parser, SOURCE_FILE}; use attr::parser_attr; export eval_crate_directives_to_mod; -export update_parse_sess_position; type ctx = @{sess: parse::parse_sess, @@ -74,13 +74,6 @@ fn parse_companion_mod(cx: ctx, prefix: &Path, suffix: &Option<Path>) } } -fn update_parse_sess_position(sess: &parse_sess, r: &lexer::string_reader) { - sess.pos = FilePos { - ch: r.chpos, - byte: sess.pos.byte + r.pos - }; -} - fn cdir_path_opt(default: ~str, attrs: ~[ast::attribute]) -> ~str { match ::attr::first_attr_value_str_by_name(attrs, ~"path") { Some(d) => d, |
