@@ -65,6 +65,7 @@ enum ParserStackElement {
65
65
66
66
impl < ' a > Parser < ' a > {
67
67
pub fn new ( input : & ' a str , fail_fast : bool ) -> Result < Self , ParseErrors > {
68
+ let fail_fast = false ;
68
69
let lexer = match Lexer :: new ( input, fail_fast) {
69
70
Ok ( lexer) => lexer,
70
71
Err ( e) => return Err ( ParseErrors :: Lexer ( e) ) ,
@@ -221,6 +222,7 @@ impl<'a> Parser<'a> {
221
222
} => {
222
223
if let Some ( node) = node_opt {
223
224
if !* whitespace && node. match_comment ( ) . is_none ( ) {
225
+ dbg ! ( & node) ;
224
226
self . add_diagnostic ( ParseErrors :: ExpectedWhitespace , node. span ( ) . clone ( ) ) ?;
225
227
}
226
228
nodes. push ( node) ;
@@ -1074,6 +1076,7 @@ impl<'a> Parser<'a> {
1074
1076
}
1075
1077
1076
1078
pub fn parse ( input : & str ) -> ParseResult < Vec < PreSymbolicExpression > > {
1079
+ dbg ! ( input) ;
1077
1080
let mut parser = match Parser :: new ( input, true ) {
1078
1081
Ok ( parser) => parser,
1079
1082
Err ( e) => return Err ( ParseError :: new ( e) ) ,
@@ -1093,6 +1096,7 @@ pub fn parse_collect_diagnostics(
1093
1096
) -> ( Vec < PreSymbolicExpression > , Vec < Diagnostic > , bool ) {
1094
1097
// When not in fail_fast mode, Parser::new always returns Ok.
1095
1098
let mut parser = Parser :: new ( input, false ) . unwrap ( ) ;
1099
+ dbg ! ( input) ;
1096
1100
1097
1101
// When not in fail_fast mode, Parser::parse always returns Ok.
1098
1102
let stmts = parser. parse ( ) . unwrap ( ) ;
0 commit comments