very small change

This commit is contained in:
2024-04-13 20:40:33 +02:00
parent 3e545e462d
commit e0c88f1d60
2 changed files with 23 additions and 27 deletions
-7
View File
@@ -172,7 +172,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
'{' => {
is_match = true;
code = code.strip_prefix("{").unwrap_or(code);
inner_string += "{";
if svl == 0 {
bracket_vec.push('{');
}
@@ -180,8 +179,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
'}' => {
is_match = true;
code = code.strip_prefix("}").unwrap_or(code);
println!("{code} 585");
inner_string += "}";
if bracket_vec[svl-1] == '{' {
bracket_vec.pop();
tokens.push(Token {
@@ -197,7 +194,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
'(' => {
is_match = true;
code = code.strip_prefix("(").unwrap_or(code);
inner_string += "(";
if svl == 0 {
bracket_vec.push('(');
}
@@ -205,7 +201,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
')' => {
is_match = true;
code = code.strip_prefix(")").unwrap_or(code);
inner_string += ")";
if bracket_vec[svl-1] == '(' {
bracket_vec.pop();
tokens.push(Token {
@@ -221,7 +216,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
'[' => {
is_match = true;
code = code.strip_prefix("[").unwrap_or(code);
inner_string += "[";
if svl == 0 {
bracket_vec.push('[');
@@ -230,7 +224,6 @@ pub fn lex(mut code: &str, use_whitespace: bool) -> Vec<Token> {
']' => {
is_match = true;
code = code.strip_prefix("]").unwrap_or(code);
inner_string += "]";
if bracket_vec[svl-1] == '[' {
bracket_vec.pop();
tokens.push(Token {