Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Oct 31, 2024
1 parent a7c60c3 commit 161b91c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion klang/src/parser/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn parse_line(line: Pair<Rule>) -> Result<Vec<Line>, ParseError> {
line_pair,
))),
})
.filter_map(|line| line)
.flatten()
.collect()
}

Expand Down
8 changes: 4 additions & 4 deletions klang/src/parser/passes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ fn get_function_signature(name: &TextWithArgs) -> (String, Vec<String>) {
if first {
first = false;
} else {
signature.push_str(" ");
signature.push(' ');
}
match &part.part_kind {
Some(PartKind::Text(text)) => {
signature.push_str(text);
}
Some(PartKind::FunctionArg(arg)) => {
signature.push_str("[");
signature.push('[');
signature.push_str(&arg.text);
signature.push_str("]");
signature.push(']');
params.push(arg.text.clone());
}
None => {}
Expand Down Expand Up @@ -180,7 +180,7 @@ fn substitute_text_with_args(
if first {
first = false;
} else {
result.push_str(" ");
result.push(' ');
}
match &part.part_kind {
Some(PartKind::Text(text)) => {
Expand Down

0 comments on commit 161b91c

Please sign in to comment.