@@ -39,9 +39,9 @@ fn next_state(s: State) -> Option<State> {
3939
4040pub fn expand_asm ( cx : & mut ExtCtxt , sp : Span , tts : & [ ast:: token_tree ] )
4141 -> base:: MacResult {
42- let p = parse:: new_parser_from_tts ( cx. parse_sess ( ) ,
43- cx. cfg ( ) ,
44- tts. to_owned ( ) ) ;
42+ let mut p = parse:: new_parser_from_tts ( cx. parse_sess ( ) ,
43+ cx. cfg ( ) ,
44+ tts. to_owned ( ) ) ;
4545
4646 let mut asm = @"";
4747 let mut asm_str_style = None ;
@@ -66,9 +66,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
6666 asm_str_style = Some ( style) ;
6767 }
6868 Outputs => {
69- while * p. token != token:: EOF &&
70- * p. token != token:: COLON &&
71- * p. token != token:: MOD_SEP {
69+ while p. token != token:: EOF &&
70+ p. token != token:: COLON &&
71+ p. token != token:: MOD_SEP {
7272
7373 if outputs. len ( ) != 0 {
7474 p. eat ( & token:: COMMA ) ;
@@ -77,10 +77,10 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
7777 let ( constraint, _str_style) = p. parse_str ( ) ;
7878
7979 if constraint. starts_with ( "+" ) {
80- cx. span_unimpl ( * p. last_span ,
80+ cx. span_unimpl ( p. last_span ,
8181 "'+' (read+write) output operand constraint modifier" ) ;
8282 } else if !constraint. starts_with ( "=" ) {
83- cx. span_err ( * p. last_span , "output operand constraint lacks '='" ) ;
83+ cx. span_err ( p. last_span , "output operand constraint lacks '='" ) ;
8484 }
8585
8686 p. expect ( & token:: LPAREN ) ;
@@ -91,9 +91,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
9191 }
9292 }
9393 Inputs => {
94- while * p. token != token:: EOF &&
95- * p. token != token:: COLON &&
96- * p. token != token:: MOD_SEP {
94+ while p. token != token:: EOF &&
95+ p. token != token:: COLON &&
96+ p. token != token:: MOD_SEP {
9797
9898 if inputs. len ( ) != 0 {
9999 p. eat ( & token:: COMMA ) ;
@@ -102,9 +102,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
102102 let ( constraint, _str_style) = p. parse_str ( ) ;
103103
104104 if constraint. starts_with ( "=" ) {
105- cx. span_err ( * p. last_span , "input operand constraint contains '='" ) ;
105+ cx. span_err ( p. last_span , "input operand constraint contains '='" ) ;
106106 } else if constraint. starts_with ( "+" ) {
107- cx. span_err ( * p. last_span , "input operand constraint contains '+'" ) ;
107+ cx. span_err ( p. last_span , "input operand constraint contains '+'" ) ;
108108 }
109109
110110 p. expect ( & token:: LPAREN ) ;
@@ -116,9 +116,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
116116 }
117117 Clobbers => {
118118 let mut clobs = ~[ ] ;
119- while * p. token != token:: EOF &&
120- * p. token != token:: COLON &&
121- * p. token != token:: MOD_SEP {
119+ while p. token != token:: EOF &&
120+ p. token != token:: COLON &&
121+ p. token != token:: MOD_SEP {
122122
123123 if clobs. len ( ) != 0 {
124124 p. eat ( & token:: COMMA ) ;
@@ -142,16 +142,16 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
142142 dialect = ast:: asm_intel;
143143 }
144144
145- if * p. token == token:: COMMA {
145+ if p. token == token:: COMMA {
146146 p. eat ( & token:: COMMA ) ;
147147 }
148148 }
149149 }
150150
151- while * p. token == token:: COLON ||
152- * p. token == token:: MOD_SEP ||
153- * p. token == token:: EOF {
154- state = if * p. token == token:: COLON {
151+ while p. token == token:: COLON ||
152+ p. token == token:: MOD_SEP ||
153+ p. token == token:: EOF {
154+ state = if p. token == token:: COLON {
155155 p. bump ( ) ;
156156 match next_state ( state) {
157157 Some ( x) => x,
@@ -160,7 +160,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
160160 break
161161 }
162162 }
163- } else if * p. token == token:: MOD_SEP {
163+ } else if p. token == token:: MOD_SEP {
164164 p. bump ( ) ;
165165 let s = match next_state ( state) {
166166 Some ( x) => x,
@@ -176,7 +176,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
176176 break
177177 }
178178 }
179- } else if * p. token == token:: EOF {
179+ } else if p. token == token:: EOF {
180180 continue_ = false ;
181181 break ;
182182 } else {
0 commit comments