mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
ran odinfmt
This commit is contained in:
@@ -242,9 +242,7 @@ format_value_decl :: proc(p: ^Printer, index: int) {
|
||||
if !align_next {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
find_last_token :: proc(format_tokens: [dynamic]Format_Token) -> Format_Token {
|
||||
@@ -254,14 +252,12 @@ find_last_token :: proc(format_tokens: [dynamic]Format_Token) -> Format_Token {
|
||||
if format_tokens[i].kind != .Comment {
|
||||
return format_tokens[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
panic("not possible");
|
||||
}
|
||||
|
||||
format_assignment :: proc(p: ^Printer, index: int) {
|
||||
|
||||
}
|
||||
|
||||
format_call :: proc(p: ^Printer, line_index: int, format_index: int) {
|
||||
@@ -292,7 +288,7 @@ format_call :: proc(p: ^Printer, line_index: int, format_index: int) {
|
||||
}
|
||||
|
||||
if !paren_found {
|
||||
panic("Should not be possible");;
|
||||
panic("Should not be possible");
|
||||
}
|
||||
|
||||
paren_count := 1;
|
||||
@@ -323,7 +319,6 @@ format_call :: proc(p: ^Printer, line_index: int, format_index: int) {
|
||||
if paren_count == 0 {
|
||||
done = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if line_index != 0 {
|
||||
@@ -389,7 +384,6 @@ format_keyword_to_brace :: proc(p: ^Printer, line_index: int, format_index: int,
|
||||
if brace_count == 1 {
|
||||
done = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if line_index != 0 {
|
||||
@@ -399,9 +393,7 @@ format_keyword_to_brace :: proc(p: ^Printer, line_index: int, format_index: int,
|
||||
if done {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
format_generic :: proc(p: ^Printer) {
|
||||
@@ -414,13 +406,12 @@ format_generic :: proc(p: ^Printer) {
|
||||
|
||||
for format_token, token_index in line.format_tokens {
|
||||
|
||||
if format_token.kind == .For || format_token.kind == .If
|
||||
|| format_token.kind == .When || format_token.kind == .Switch {
|
||||
if format_token.kind == .For || format_token.kind == .If ||
|
||||
format_token.kind == .When || format_token.kind == .Switch {
|
||||
format_keyword_to_brace(p, line_index, token_index, format_token.kind);
|
||||
} else if format_token.type == .Call {
|
||||
format_call(p, line_index, token_index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if .Switch_Stmt in line.types && p.config.align_switch {
|
||||
@@ -438,15 +429,10 @@ format_generic :: proc(p: ^Printer) {
|
||||
if .Assign in line.types {
|
||||
format_assignment(p, line_index);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
align_var_decls_and_assignments :: proc(p: ^Printer) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
align_switch_stmt :: proc(p: ^Printer, index: int) {
|
||||
|
||||
Reference in New Issue
Block a user