@@ -18,6 +18,10 @@ use crate::{
1818 LexerTypes , RTParserBuilder , RecoveryKind ,
1919 diagnostics:: { DiagnosticFormatter , SpannedDiagnosticFormatter } ,
2020} ;
21+
22+ #[ cfg( feature = "_unstable_api" ) ]
23+ use crate :: unstable_api:: UnstableApi ;
24+
2125use bincode:: { Decode , Encode , decode_from_slice, encode_to_vec} ;
2226use cfgrammar:: {
2327 Location , RIdx , Symbol ,
@@ -360,7 +364,8 @@ where
360364
361365 /// If set, specifies that this grammar should be built from a pre-validated AST
362366 /// instead of a `.y`` file. When this is specified, `grammar_path` will not be read.
363- pub fn grammar_ast ( mut self , valid_ast : ASTWithValidityInfo ) -> Self {
367+ #[ cfg( feature = "_unstable_api" ) ]
368+ pub fn grammar_ast ( mut self , valid_ast : ASTWithValidityInfo , _api_key : UnstableApi ) -> Self {
364369 self . from_ast = Some ( valid_ast) ;
365370 self
366371 }
@@ -376,7 +381,8 @@ where
376381 self
377382 }
378383
379- pub fn with_grammar_src ( mut self , src : String ) -> Self {
384+ #[ cfg( feature = "_unstable_api" ) ]
385+ pub fn with_grammar_src ( mut self , src : String , _api_key : UnstableApi ) -> Self {
380386 self . grammar_src = Some ( src) ;
381387 self
382388 }
0 commit comments