@@ -517,33 +517,33 @@ impl<Sink: TokenSink> XmlTokenizer<Sink> {
517
517
518
518
// Shorthand for common state machine behaviors.
519
519
macro_rules! shorthand (
520
- ( $me: ident : emit $c: expr ) => ( $me. emit_char( $c) ; ) ;
521
- ( $me: ident : create_tag $kind: ident $c: expr ) => ( $me. create_tag( $kind, $c) ; ) ;
522
- ( $me: ident : push_tag $c: expr ) => ( $me. current_tag_name. push_char( $c) ; ) ;
523
- ( $me: ident : discard_tag $input: expr ) => ( $me. discard_tag( $input) ; ) ;
524
- ( $me: ident : discard_char ) => ( $me. discard_char( ) ; ) ;
525
- ( $me: ident : push_temp $c: expr ) => ( $me. temp_buf. push_char( $c) ; ) ;
526
- ( $me: ident : emit_temp ) => ( $me. emit_temp_buf( ) ; ) ;
527
- ( $me: ident : clear_temp ) => ( $me. clear_temp_buf( ) ; ) ;
528
- ( $me: ident : create_attr $c: expr ) => ( $me. create_attribute( $c) ; ) ;
529
- ( $me: ident : push_name $c: expr ) => ( $me. current_attr_name. push_char( $c) ; ) ;
530
- ( $me: ident : push_value $c: expr ) => ( $me. current_attr_value. push_char( $c) ; ) ;
531
- ( $me: ident : append_value $c: expr ) => ( $me. current_attr_value. push_tendril( $c) ; ) ;
532
- ( $me: ident : push_comment $c: expr ) => ( $me. current_comment. push_char( $c) ; ) ;
533
- ( $me: ident : append_comment $c: expr ) => ( $me. current_comment. push_slice( $c) ; ) ;
534
- ( $me: ident : emit_comment ) => ( $me. emit_current_comment( ) ; ) ;
535
- ( $me: ident : clear_comment ) => ( $me. current_comment. clear( ) ; ) ;
536
- ( $me: ident : create_doctype ) => ( $me. current_doctype = Doctype :: new( ) ; ) ;
537
- ( $me: ident : push_doctype_name $c: expr ) => ( option_push( & mut $me. current_doctype. name, $c) ; ) ;
538
- ( $me: ident : push_doctype_id $k: ident $c: expr ) => ( option_push( $me. doctype_id( $k) , $c) ; ) ;
539
- ( $me: ident : clear_doctype_id $k: ident ) => ( $me. clear_doctype_id( $k) ; ) ;
540
- ( $me: ident : emit_doctype ) => ( $me. emit_current_doctype( ) ; ) ;
541
- ( $me: ident : error ) => ( $me. bad_char_error( ) ; ) ;
542
- ( $me: ident : error_eof ) => ( $me. bad_eof_error( ) ; ) ;
543
- ( $me: ident : create_pi $c: expr ) => ( $me. create_pi( $c) ; ) ;
544
- ( $me: ident : push_pi_target $c: expr ) => ( $me. current_pi_target. push_char( $c) ; ) ;
545
- ( $me: ident : push_pi_data $c: expr ) => ( $me. current_pi_data. push_char( $c) ; ) ;
546
- ( $me: ident : set_empty_tag ) => ( $me. set_empty_tag( ) ; ) ;
520
+ ( $me: ident : emit $c: expr ) => ( $me. emit_char( $c) ) ;
521
+ ( $me: ident : create_tag $kind: ident $c: expr ) => ( $me. create_tag( $kind, $c) ) ;
522
+ ( $me: ident : push_tag $c: expr ) => ( $me. current_tag_name. push_char( $c) ) ;
523
+ ( $me: ident : discard_tag $input: expr ) => ( $me. discard_tag( $input) ) ;
524
+ ( $me: ident : discard_char ) => ( $me. discard_char( ) ) ;
525
+ ( $me: ident : push_temp $c: expr ) => ( $me. temp_buf. push_char( $c) ) ;
526
+ ( $me: ident : emit_temp ) => ( $me. emit_temp_buf( ) ) ;
527
+ ( $me: ident : clear_temp ) => ( $me. clear_temp_buf( ) ) ;
528
+ ( $me: ident : create_attr $c: expr ) => ( $me. create_attribute( $c) ) ;
529
+ ( $me: ident : push_name $c: expr ) => ( $me. current_attr_name. push_char( $c) ) ;
530
+ ( $me: ident : push_value $c: expr ) => ( $me. current_attr_value. push_char( $c) ) ;
531
+ ( $me: ident : append_value $c: expr ) => ( $me. current_attr_value. push_tendril( $c) ) ;
532
+ ( $me: ident : push_comment $c: expr ) => ( $me. current_comment. push_char( $c) ) ;
533
+ ( $me: ident : append_comment $c: expr ) => ( $me. current_comment. push_slice( $c) ) ;
534
+ ( $me: ident : emit_comment ) => ( $me. emit_current_comment( ) ) ;
535
+ ( $me: ident : clear_comment ) => ( $me. current_comment. clear( ) ) ;
536
+ ( $me: ident : create_doctype ) => ( $me. current_doctype = Doctype :: new( ) ) ;
537
+ ( $me: ident : push_doctype_name $c: expr ) => ( option_push( & mut $me. current_doctype. name, $c) ) ;
538
+ ( $me: ident : push_doctype_id $k: ident $c: expr ) => ( option_push( $me. doctype_id( $k) , $c) ) ;
539
+ ( $me: ident : clear_doctype_id $k: ident ) => ( $me. clear_doctype_id( $k) ) ;
540
+ ( $me: ident : emit_doctype ) => ( $me. emit_current_doctype( ) ) ;
541
+ ( $me: ident : error ) => ( $me. bad_char_error( ) ) ;
542
+ ( $me: ident : error_eof ) => ( $me. bad_eof_error( ) ) ;
543
+ ( $me: ident : create_pi $c: expr ) => ( $me. create_pi( $c) ) ;
544
+ ( $me: ident : push_pi_target $c: expr ) => ( $me. current_pi_target. push_char( $c) ) ;
545
+ ( $me: ident : push_pi_data $c: expr ) => ( $me. current_pi_data. push_char( $c) ) ;
546
+ ( $me: ident : set_empty_tag ) => ( $me. set_empty_tag( ) ) ;
547
547
) ;
548
548
549
549
// Tracing of tokenizer actions. This adds significant bloat and compile time,
@@ -615,7 +615,7 @@ macro_rules! go (
615
615
( $me: ident : eof ) => ( { $me. emit_eof( ) ; return false ; } ) ;
616
616
617
617
// If nothing else matched, it's a single command
618
- ( $me: ident : $( $cmd: tt) + ) => ( sh_trace!( $me: $( $cmd) +) ; ) ;
618
+ ( $me: ident : $( $cmd: tt) + ) => ( sh_trace!( $me: $( $cmd) +) ) ;
619
619
620
620
// or nothing.
621
621
( $me: ident : ) => ( ( ) ) ;
0 commit comments