add hygiene support functions

This commit is contained in:
John Clements
2013-06-04 14:56:33 -07:00
parent ecdb6e4722
commit 5a158f1d19
4 changed files with 78 additions and 27 deletions

View File

@@ -54,7 +54,8 @@ pub fn string_to_item_and_sess (source_str : @~str) -> (Option<@ast::item>,@mut
(p.parse_item(~[]),ps)
}
pub fn string_to_stmt (source_str : @~str) -> @ast::stmt {
// parse a string, return a stmt
pub fn string_to_stmt(source_str : @~str) -> @ast::stmt {
string_to_parser(source_str).parse_stmt(~[])
}