syntax: Move fn spanned into ast_util
This commit is contained in:
parent
bcbcbad774
commit
7fa7e56341
4 changed files with 8 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
import std::map::{hashmap};
|
||||
import ast::spanned;
|
||||
import ast_util::spanned;
|
||||
import parser::parser;
|
||||
|
||||
fn token_to_str(reader: reader, token: token::token) -> str {
|
||||
|
@ -27,10 +27,6 @@ fn expect(p: parser, t: token::token) {
|
|||
}
|
||||
}
|
||||
|
||||
fn spanned<T: copy>(lo: uint, hi: uint, node: T) -> spanned<T> {
|
||||
ret {node: node, span: ast_util::mk_sp(lo, hi)};
|
||||
}
|
||||
|
||||
fn parse_ident(p: parser) -> ast::ident {
|
||||
alt p.token {
|
||||
token::IDENT(i, _) { p.bump(); ret p.get_str(i); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue