Rename strings.Builder procedures to be consistent with the rest of the core library

This commit is contained in:
gingerBill
2022-07-11 11:50:08 +01:00
parent 9e376fbda7
commit c90b7c38f1
12 changed files with 106 additions and 144 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ print :: proc(p: ^Printer, file: ^ast.File) -> string {
fix_lines(p)
builder := strings.make_builder(0, 5 * mem.Megabyte, p.allocator)
builder := strings.builder_make(0, 5 * mem.Megabyte, p.allocator)
last_line := 0
+3 -3
View File
@@ -71,7 +71,7 @@ push_comment :: proc(p: ^Printer, comment: tokenizer.Token) -> int {
return 0
} else {
builder := strings.make_builder(context.temp_allocator)
builder := strings.builder_make(context.temp_allocator)
c_len := len(comment.text)
trim_space := true
@@ -90,12 +90,12 @@ push_comment :: proc(p: ^Printer, comment: tokenizer.Token) -> int {
continue
case c == '\r' && comment.text[min(c_len - 1, i + 1)] == '\n':
append(&multilines, strings.to_string(builder))
builder = strings.make_builder(context.temp_allocator)
builder = strings.builder_make(context.temp_allocator)
trim_space = true
i += 1
case c == '\n':
append(&multilines, strings.to_string(builder))
builder = strings.make_builder(context.temp_allocator)
builder = strings.builder_make(context.temp_allocator)
trim_space = true
case c == '/' && comment.text[min(c_len - 1, i + 1)] == '*':
strings.write_string(&builder, "/*")