diff options
| author | Kevin Atkinson <kevina@cs.utah.edu> | 2012-02-10 03:03:21 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-02-14 19:37:33 -0800 |
| commit | 74b4345a38412af92aa7a8bcfabcf143e407c79e (patch) | |
| tree | 4b4031c911fd44315ee26d2ea320e585805114d1 /src/comp/syntax/parse/parser.rs | |
| parent | ff6b71f78bd00a93a91691bb297d6a379cdc50fa (diff) | |
| download | rust-74b4345a38412af92aa7a8bcfabcf143e407c79e.tar.gz rust-74b4345a38412af92aa7a8bcfabcf143e407c79e.zip | |
Change file_substr to allow for external strings.
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 4d8a9dc02ba..ed89fce2ed2 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2,7 +2,7 @@ import std::{io, fs}; import either::{left, right}; import std::map::{hashmap, new_str_hash}; import token::can_begin_expr; -import codemap::span; +import codemap::{span,fss_none}; import util::interner; import ast::{node_id, spanned}; import ast_util::{mk_sp, ident_to_path}; @@ -2618,7 +2618,7 @@ fn parse_crate_from_source_file(input: str, cfg: ast::crate_cfg, fn parse_expr_from_source_str(name: str, source: @str, cfg: ast::crate_cfg, sess: parse_sess) -> @ast::expr { - let p = new_parser_from_source_str(sess, cfg, name, none, source); + let p = new_parser_from_source_str(sess, cfg, name, fss_none, source); let r = parse_expr(p); sess.chpos = p.reader.chpos; sess.byte_pos = sess.byte_pos + p.reader.pos; @@ -2640,7 +2640,7 @@ fn parse_from_source_str<T>(f: fn (p: parser) -> T, fn parse_crate_from_source_str(name: str, source: @str, cfg: ast::crate_cfg, sess: parse_sess) -> @ast::crate { - let p = new_parser_from_source_str(sess, cfg, name, none, source); + let p = new_parser_from_source_str(sess, cfg, name, fss_none, source); let r = parse_crate_mod(p, cfg); sess.chpos = p.reader.chpos; sess.byte_pos = sess.byte_pos + p.reader.pos; |
