diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-12 17:59:49 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-12 18:04:02 +0100 |
| commit | efb9df1ebd7ebe0232e202d0e065b08d6a593785 (patch) | |
| tree | c0e798a4f2529fb5cdb6512555676ba2bae0c5b6 /src/comp/syntax | |
| parent | 56fe4c2681f7ef467d8b3405279acbcfc6b0ebcf (diff) | |
Make driver::session::session no longer an object
Rather, it is now a struct where properties like opts are accessed directly, and the error-reporting methods are part of a static impl (with the same name as the type).
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ext/base.rs | 6 | ||||
| -rw-r--r-- | src/comp/syntax/ext/expand.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/syntax/ext/base.rs b/src/comp/syntax/ext/base.rs index 798e948a12e..0ace58ff953 100644 --- a/src/comp/syntax/ext/base.rs +++ b/src/comp/syntax/ext/base.rs @@ -33,10 +33,10 @@ fn syntax_expander_table() -> hashmap<str, syntax_extension> { ret syntax_expanders; } -obj ext_ctxt(sess: @session, +obj ext_ctxt(sess: session, mutable backtrace: codemap::opt_span) { - fn session() -> @session { ret sess; } + fn session() -> session { ret sess; } fn print_backtrace() { } @@ -80,7 +80,7 @@ obj ext_ctxt(sess: @session, } fn mk_ctxt(sess: session) -> ext_ctxt { - ret ext_ctxt(@sess, codemap::os_none); + ret ext_ctxt(sess, codemap::os_none); } fn expr_to_str(cx: ext_ctxt, expr: @ast::expr, error: str) -> str { diff --git a/src/comp/syntax/ext/expand.rs b/src/comp/syntax/ext/expand.rs index b69c1862df8..9a08b36af20 100644 --- a/src/comp/syntax/ext/expand.rs +++ b/src/comp/syntax/ext/expand.rs @@ -71,8 +71,8 @@ fn expand_crate(sess: session::session, c: @crate) -> @crate { with *afp}; let f = make_fold(f_pre); let cm = parse_expr_from_source_str("-", core_macros(), - sess.get_opts().cfg, - sess.get_parse_sess()); + sess.opts.cfg, + sess.parse_sess); // This is run for its side-effects on the expander env, // as it registers all the core macros as expanders. |
