mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove unneeded semicolons from the core library
This commit is contained in:
@@ -4,38 +4,38 @@ import "core:odin/printer"
|
||||
import "core:odin/parser"
|
||||
import "core:odin/ast"
|
||||
|
||||
default_style := printer.default_style;
|
||||
default_style := printer.default_style
|
||||
|
||||
simplify :: proc(file: ^ast.File) {
|
||||
|
||||
}
|
||||
|
||||
format :: proc(filepath: string, source: string, config: printer.Config, parser_flags := parser.Flags{}, allocator := context.allocator) -> (string, bool) {
|
||||
config := config;
|
||||
config := config
|
||||
|
||||
pkg := ast.Package {
|
||||
kind = .Normal,
|
||||
};
|
||||
}
|
||||
|
||||
file := ast.File {
|
||||
pkg = &pkg,
|
||||
src = source,
|
||||
fullpath = filepath,
|
||||
};
|
||||
|
||||
config.newline_limit = clamp(config.newline_limit, 0, 16);
|
||||
config.spaces = clamp(config.spaces, 1, 16);
|
||||
config.align_length_break = clamp(config.align_length_break, 0, 64);
|
||||
|
||||
p := parser.default_parser(parser_flags);
|
||||
|
||||
ok := parser.parse_file(&p, &file);
|
||||
|
||||
if !ok || file.syntax_error_count > 0 {
|
||||
return {}, false;
|
||||
}
|
||||
|
||||
prnt := printer.make_printer(config, allocator);
|
||||
config.newline_limit = clamp(config.newline_limit, 0, 16)
|
||||
config.spaces = clamp(config.spaces, 1, 16)
|
||||
config.align_length_break = clamp(config.align_length_break, 0, 64)
|
||||
|
||||
return printer.print(&prnt, &file), true;
|
||||
p := parser.default_parser(parser_flags)
|
||||
|
||||
ok := parser.parse_file(&p, &file)
|
||||
|
||||
if !ok || file.syntax_error_count > 0 {
|
||||
return {}, false
|
||||
}
|
||||
|
||||
prnt := printer.make_printer(config, allocator)
|
||||
|
||||
return printer.print(&prnt, &file), true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user