aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-07-14 18:12:46 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-07-14 18:12:46 +0200
commit755ee87a48db7eff9790a6e7d438a168cfaa5256 (patch)
treec05349f789bccc0c779f4bc8d1c2a3edf7ef0581
parent19378b74d067bd3016f55120c5d23d8d4408f191 (diff)
Fix odin core changes
-rw-r--r--src/common/ast.odin2
-rw-r--r--src/common/fuzzy.odin2
-rw-r--r--src/common/uri.odin10
-rw-r--r--src/odin/printer/printer.odin4
-rw-r--r--src/server/check.odin2
-rw-r--r--src/server/completion.odin2
-rw-r--r--src/server/requests.odin4
-rw-r--r--src/server/signature.odin2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/common/ast.odin b/src/common/ast.odin
index cb01c85..c3be1fe 100644
--- a/src/common/ast.odin
+++ b/src/common/ast.odin
@@ -712,7 +712,7 @@ node_equal_node :: proc(a, b: ^ast.Node) -> bool {
*/
node_to_string :: proc(node: ^ast.Node, remove_pointers := false) -> string {
- builder := strings.make_builder(context.temp_allocator)
+ builder := strings.builder_make(context.temp_allocator)
build_string(node, &builder, remove_pointers)
diff --git a/src/common/fuzzy.odin b/src/common/fuzzy.odin
index f6c8b11..adc6a98 100644
--- a/src/common/fuzzy.odin
+++ b/src/common/fuzzy.odin
@@ -118,7 +118,7 @@ make_fuzzy_matcher :: proc(pattern: string, allocator := context.temp_allocator)
fuzzy_to_acronym :: proc(word: string) -> (string, bool) {
- builder := strings.make_builder(context.temp_allocator)
+ builder := strings.builder_make(context.temp_allocator)
if len(word) <= 1 {
return "", false
diff --git a/src/common/uri.odin b/src/common/uri.odin
index b8f562b..4dbed0f 100644
--- a/src/common/uri.odin
+++ b/src/common/uri.odin
@@ -48,7 +48,7 @@ parse_uri :: proc(value: string, allocator: mem.Allocator) -> (Uri, bool) {
create_uri :: proc(path: string, allocator: mem.Allocator) -> Uri {
path_forward, _ := filepath.to_slash(path, context.temp_allocator)
- builder := strings.make_builder(allocator)
+ builder := strings.builder_make(allocator)
//bad
when ODIN_OS == .Windows {
@@ -79,7 +79,7 @@ delete_uri :: proc(uri: Uri) {
}
encode_percent :: proc(value: string, allocator: mem.Allocator) -> string {
- builder := strings.make_builder(allocator)
+ builder := strings.builder_make(allocator)
data := transmute([]u8)value
index: int
@@ -119,7 +119,7 @@ starts_with :: proc(value: string, starts_with: string) -> bool {
@(private)
decode_percent :: proc(value: string, allocator: mem.Allocator) -> (string, bool) {
- builder := strings.make_builder(allocator)
+ builder := strings.builder_make(allocator)
for i := 0; i < len(value); i += 1 {
if value[i] == '%' {
@@ -127,7 +127,7 @@ decode_percent :: proc(value: string, allocator: mem.Allocator) -> (string, bool
v, ok := strconv.parse_i64_of_base(value[i + 1:i + 3], 16)
if !ok {
- strings.destroy_builder(&builder)
+ strings.builder_destroy(&builder)
return "", false
}
@@ -135,7 +135,7 @@ decode_percent :: proc(value: string, allocator: mem.Allocator) -> (string, bool
i += 2
} else {
- strings.destroy_builder(&builder)
+ strings.builder_destroy(&builder)
return "", false
}
} else {
diff --git a/src/odin/printer/printer.odin b/src/odin/printer/printer.odin
index 2f25724..f97b87e 100644
--- a/src/odin/printer/printer.odin
+++ b/src/odin/printer/printer.odin
@@ -146,7 +146,7 @@ print :: proc {
print_expr :: proc(p: ^Printer, expr: ^ast.Expr) -> string {
p.document = empty();
p.document = cons(p.document, visit_expr(p, expr))
- p.string_builder = strings.make_builder(p.allocator)
+ p.string_builder = strings.builder_make(p.allocator)
context.allocator = p.allocator
list := make([dynamic]Tuple, p.allocator)
@@ -163,7 +163,7 @@ print_expr :: proc(p: ^Printer, expr: ^ast.Expr) -> string {
print_file :: proc(p: ^Printer, file: ^ast.File) -> string {
p.comments = file.comments
- p.string_builder = strings.make_builder(p.allocator)
+ p.string_builder = strings.builder_make(p.allocator)
p.src = file.src
context.allocator = p.allocator
diff --git a/src/server/check.odin b/src/server/check.odin
index 55a6042..1721cec 100644
--- a/src/server/check.odin
+++ b/src/server/check.odin
@@ -31,7 +31,7 @@ when ODIN_OS == .Windows {
code: u32
ok: bool
- collection_builder := strings.make_builder(context.temp_allocator)
+ collection_builder := strings.builder_make(context.temp_allocator)
for k, v in common.config.collections {
if k == "" || k == "core" || k == "vendor" {
diff --git a/src/server/completion.odin b/src/server/completion.odin
index f64e2a8..dc24ac6 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1187,7 +1187,7 @@ get_type_switch_completion :: proc(ast_context: ^AstContext, position_context: ^
}
get_core_insert_package_if_non_existent :: proc(ast_context: ^AstContext, pkg: string) -> (TextEdit, bool) {
- builder := strings.make_builder(context.temp_allocator)
+ builder := strings.builder_make(context.temp_allocator)
for imp in ast_context.imports {
if imp.base == pkg {
diff --git a/src/server/requests.odin b/src/server/requests.odin
index e2979b5..6201d03 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -158,13 +158,13 @@ thread_request_main :: proc(data: rawptr) {
read_and_parse_header :: proc (reader: ^Reader) -> (Header, bool) {
header: Header
- builder := strings.make_builder(context.temp_allocator)
+ builder := strings.builder_make(context.temp_allocator)
found_content_length := false
for true {
- strings.reset_builder(&builder)
+ strings.builder_reset(&builder)
if !read_until_delimiter(reader, '\n', &builder) {
log.error("Failed to read with delimiter")
diff --git a/src/server/signature.odin b/src/server/signature.odin
index bed0f59..0036bf2 100644
--- a/src/server/signature.odin
+++ b/src/server/signature.odin
@@ -51,7 +51,7 @@ ParameterInformation :: struct {
*/
build_procedure_symbol_signature :: proc(symbol: ^Symbol) {
if value, ok := symbol.value.(SymbolProcedureValue); ok {
- builder := strings.make_builder(context.temp_allocator)
+ builder := strings.builder_make(context.temp_allocator)
strings.write_string(&builder, "proc")
strings.write_string(&builder, "(")