@@ -116,7 +116,7 @@ impl<Pat> RuleTypeMethods for Rule<Pat> {
116
116
117
117
fn field_type ( & self , path : & [ usize ] ) -> Src {
118
118
match self {
119
- Rule :: Empty | Rule :: Eat ( _) | Rule :: NegativeLookahead ( _ ) => {
119
+ Rule :: Empty | Rule :: Eat ( _) => {
120
120
assert_eq ! ( path, [ ] ) ;
121
121
quote ! ( ( ) )
122
122
}
@@ -199,7 +199,6 @@ impl<Pat: Ord + Hash + RustInputPat> RuleRuleMapMethods<Pat> for Rule<Pat> {
199
199
match self {
200
200
Rule :: Empty => "" . to_string ( ) ,
201
201
Rule :: Eat ( pat) => pat. rust_matcher ( ) . to_pretty_string ( ) ,
202
- Rule :: NegativeLookahead ( pat) => format ! ( "!{}" , pat. rust_matcher( ) . to_pretty_string( ) ) ,
203
202
Rule :: Call ( r) => r. clone ( ) ,
204
203
Rule :: Concat ( [ left, right] ) => format ! (
205
204
"({} {})" ,
@@ -246,7 +245,7 @@ impl<Pat: Ord + Hash + RustInputPat> RuleRuleMapMethods<Pat> for Rule<Pat> {
246
245
rules : & RuleMap < ' _ , Pat > ,
247
246
) -> ParseNodeShape < ParseNodeKind > {
248
247
match & * * rc_self {
249
- Rule :: Empty | Rule :: Eat ( _) | Rule :: NegativeLookahead ( _ ) => ParseNodeShape :: Opaque ,
248
+ Rule :: Empty | Rule :: Eat ( _) => ParseNodeShape :: Opaque ,
250
249
Rule :: Call ( _) => unreachable ! ( ) ,
251
250
Rule :: Concat ( [ left, right] ) => {
252
251
ParseNodeShape :: Split ( left. parse_node_kind ( rules) , right. parse_node_kind ( rules) )
@@ -802,10 +801,6 @@ impl<Pat: Ord + Hash + RustInputPat> RuleGenerateMethods<Pat> for Rule<Pat> {
802
801
let pat = pat. rust_matcher ( ) ;
803
802
check ( quote ! ( let Some ( _range) = p. input_consume_left( _range, & ( #pat) ) ) ) . apply ( cont)
804
803
}
805
- ( Rule :: NegativeLookahead ( pat) , _) => {
806
- let pat = pat. rust_matcher ( ) ;
807
- check ( quote ! ( !p. input_lookahead_left( _range, & ( #pat) ) ) ) . apply ( cont)
808
- }
809
804
( Rule :: Call ( r) , _) => call ( Rc :: new ( CodeLabel :: NamedRule ( r. clone ( ) ) ) ) . apply ( cont) ,
810
805
( Rule :: Concat ( [ left, right] ) , None ) => {
811
806
( left. generate_parse ( None ) + right. generate_parse ( None ) ) . apply ( cont)
@@ -902,7 +897,6 @@ impl<Pat: Ord + Hash + RustInputPat> RuleGenerateMethods<Pat> for Rule<Pat> {
902
897
match self {
903
898
Rule :: Empty
904
899
| Rule :: Eat ( _)
905
- | Rule :: NegativeLookahead ( _)
906
900
| Rule :: Call ( _)
907
901
| Rule :: RepeatMany ( ..)
908
902
| Rule :: RepeatMore ( ..) => {
0 commit comments