@@ -29,18 +29,29 @@ const RECOVERY_TIME_BUDGET: u64 = 60_000; // milliseconds
2929#[ cfg( not( test) ) ]
3030const RECOVERY_TIME_BUDGET : u64 = 500 ; // milliseconds
3131
32- /// A generic parse tree.
33- #[ derive( Debug , Clone , PartialEq ) ]
34- pub enum Node < LexemeT : Lexeme < StorageT > , StorageT > {
35- /// Terminals store a single lexeme.
36- Term { lexeme : LexemeT } ,
37- /// Nonterminals reference a rule and have zero or more `Node`s as children.
38- Nonterm {
39- ridx : RIdx < StorageT > ,
40- nodes : Vec < Node < LexemeT , StorageT > > ,
41- } ,
32+ #[ deprecated(
33+ since = "0.14" ,
34+ note = "Use the version of `Node` exported from your `lrpar_mod!`"
35+ ) ]
36+ pub type Node < T , S > = _deprecated_moved_:: Node < T , S > ;
37+
38+ #[ doc( hidden) ]
39+ pub mod _deprecated_moved_ {
40+ use super :: * ;
41+ /// A generic parse tree.
42+ #[ derive( Debug , Clone , PartialEq ) ]
43+ pub enum Node < LexemeT : Lexeme < StorageT > , StorageT > {
44+ /// Terminals store a single lexeme.
45+ Term { lexeme : LexemeT } ,
46+ /// Nonterminals reference a rule and have zero or more `Node`s as children.
47+ Nonterm {
48+ ridx : RIdx < StorageT > ,
49+ nodes : Vec < Node < LexemeT , StorageT > > ,
50+ } ,
51+ }
4252}
4353
54+ #[ allow( deprecated) ]
4455impl < LexemeT : Lexeme < StorageT > , StorageT : ' static + PrimInt + Unsigned > Node < LexemeT , StorageT >
4556where
4657 usize : AsPrimitive < StorageT > ,
@@ -210,6 +221,7 @@ where
210221 since = "0.14" ,
211222 note = "Deprecated with `parse_generictree` there is no direct replacement, besides a custom action"
212223) ]
224+ #[ allow( deprecated) ]
213225/// The action which implements [`cfgrammar::yacc::YaccOriginalActionKind::GenericParseTree`].
214226/// Usually you should just use the action kind directly. But you can also call this from
215227/// within a custom action to return a generic parse tree with custom behavior.
@@ -529,6 +541,7 @@ where
529541 /// Note that if `lexeme_prefix` is specified, `laidx` will still be incremented, and thus
530542 /// `end_laidx` *must* be set to `laidx + 1` in order that the parser doesn't skip the real
531543 /// lexeme at position `laidx`.
544+ #[ allow( deprecated) ]
532545 pub ( super ) fn lr_cactus (
533546 & self ,
534547 lexeme_prefix : Option < LexerTypesT :: LexemeT > ,
@@ -927,6 +940,7 @@ where
927940 since = "0.14" ,
928941 note = "Use `parse_map` to return a `lrpar::Node` instead"
929942 ) ]
943+ #[ allow( deprecated) ]
930944 /// Parse input, and (if possible) return a generic parse tree. See the arguments for
931945 /// [`parse_actions`](#method.parse_actions) for more details about the return value.
932946 pub fn parse_generictree (
@@ -1082,6 +1096,7 @@ pub(crate) mod test {
10821096 test_utils:: { TestLexError , TestLexeme , TestLexerTypes } ,
10831097 } ;
10841098
1099+ #[ allow( deprecated) ]
10851100 pub ( crate ) fn do_parse < ' input > (
10861101 rcvry_kind : RecoveryKind ,
10871102 lexs : & str ,
@@ -1101,6 +1116,7 @@ pub(crate) mod test {
11011116 do_parse_with_costs ( rcvry_kind, lexs, grms, input, & HashMap :: new ( ) )
11021117 }
11031118
1119+ #[ allow( deprecated) ]
11041120 fn do_parse_with_costs < ' input > (
11051121 rcvry_kind : RecoveryKind ,
11061122 lexs : & str ,
0 commit comments