@@ -39,9 +39,9 @@ fn next_state(s: State) -> Option<State> {
39
39
40
40
pub fn expand_asm ( cx : & mut ExtCtxt , sp : Span , tts : & [ ast:: token_tree ] )
41
41
-> 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 ( ) ) ;
45
45
46
46
let mut asm = @"";
47
47
let mut asm_str_style = None ;
@@ -66,9 +66,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
66
66
asm_str_style = Some ( style) ;
67
67
}
68
68
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 {
72
72
73
73
if outputs. len ( ) != 0 {
74
74
p. eat ( & token:: COMMA ) ;
@@ -77,10 +77,10 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
77
77
let ( constraint, _str_style) = p. parse_str ( ) ;
78
78
79
79
if constraint. starts_with ( "+" ) {
80
- cx. span_unimpl ( * p. last_span ,
80
+ cx. span_unimpl ( p. last_span ,
81
81
"'+' (read+write) output operand constraint modifier" ) ;
82
82
} 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 '='" ) ;
84
84
}
85
85
86
86
p. expect ( & token:: LPAREN ) ;
@@ -91,9 +91,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
91
91
}
92
92
}
93
93
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 {
97
97
98
98
if inputs. len ( ) != 0 {
99
99
p. eat ( & token:: COMMA ) ;
@@ -102,9 +102,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
102
102
let ( constraint, _str_style) = p. parse_str ( ) ;
103
103
104
104
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 '='" ) ;
106
106
} 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 '+'" ) ;
108
108
}
109
109
110
110
p. expect ( & token:: LPAREN ) ;
@@ -116,9 +116,9 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
116
116
}
117
117
Clobbers => {
118
118
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 {
122
122
123
123
if clobs. len ( ) != 0 {
124
124
p. eat ( & token:: COMMA ) ;
@@ -142,16 +142,16 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
142
142
dialect = ast:: asm_intel;
143
143
}
144
144
145
- if * p. token == token:: COMMA {
145
+ if p. token == token:: COMMA {
146
146
p. eat ( & token:: COMMA ) ;
147
147
}
148
148
}
149
149
}
150
150
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 {
155
155
p. bump ( ) ;
156
156
match next_state ( state) {
157
157
Some ( x) => x,
@@ -160,7 +160,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
160
160
break
161
161
}
162
162
}
163
- } else if * p. token == token:: MOD_SEP {
163
+ } else if p. token == token:: MOD_SEP {
164
164
p. bump ( ) ;
165
165
let s = match next_state ( state) {
166
166
Some ( x) => x,
@@ -176,7 +176,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::token_tree])
176
176
break
177
177
}
178
178
}
179
- } else if * p. token == token:: EOF {
179
+ } else if p. token == token:: EOF {
180
180
continue_ = false ;
181
181
break ;
182
182
} else {
0 commit comments