Skip to content

Commit 431ff45

Browse files
author
Chris Guimaraes
committed
whitespace issue
1 parent 1b3db84 commit 431ff45

File tree

1 file changed

+4
-0
lines changed
  • clarity/src/vm/ast/parser/v2

1 file changed

+4
-0
lines changed

clarity/src/vm/ast/parser/v2/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ enum ParserStackElement {
6565

6666
impl<'a> Parser<'a> {
6767
pub fn new(input: &'a str, fail_fast: bool) -> Result<Self, ParseErrors> {
68+
let fail_fast = false;
6869
let lexer = match Lexer::new(input, fail_fast) {
6970
Ok(lexer) => lexer,
7071
Err(e) => return Err(ParseErrors::Lexer(e)),
@@ -221,6 +222,7 @@ impl<'a> Parser<'a> {
221222
} => {
222223
if let Some(node) = node_opt {
223224
if !*whitespace && node.match_comment().is_none() {
225+
dbg!(&node);
224226
self.add_diagnostic(ParseErrors::ExpectedWhitespace, node.span().clone())?;
225227
}
226228
nodes.push(node);
@@ -1074,6 +1076,7 @@ impl<'a> Parser<'a> {
10741076
}
10751077

10761078
pub fn parse(input: &str) -> ParseResult<Vec<PreSymbolicExpression>> {
1079+
dbg!(input);
10771080
let mut parser = match Parser::new(input, true) {
10781081
Ok(parser) => parser,
10791082
Err(e) => return Err(ParseError::new(e)),
@@ -1093,6 +1096,7 @@ pub fn parse_collect_diagnostics(
10931096
) -> (Vec<PreSymbolicExpression>, Vec<Diagnostic>, bool) {
10941097
// When not in fail_fast mode, Parser::new always returns Ok.
10951098
let mut parser = Parser::new(input, false).unwrap();
1099+
dbg!(input);
10961100

10971101
// When not in fail_fast mode, Parser::parse always returns Ok.
10981102
let stmts = parser.parse().unwrap();

0 commit comments

Comments
 (0)