aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-11-07 14:48:38 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2021-11-07 14:48:38 +0100
commit75c285df42289f366c3a44dc8e68c24cffc3d750 (patch)
tree9ee98d9c8e07b10b9ff207f1f1568ad02e5c4bf6 /src
parent917290ea36927e59b13b72b9e0c53a5fce463098 (diff)
Add new matrix type
Diffstat (limited to 'src')
-rw-r--r--src/common/ast.odin2
-rw-r--r--src/index/clone.odin3
-rw-r--r--src/server/response.odin6
3 files changed, 8 insertions, 3 deletions
diff --git a/src/common/ast.odin b/src/common/ast.odin
index 742a477..21d6665 100644
--- a/src/common/ast.odin
+++ b/src/common/ast.odin
@@ -399,6 +399,8 @@ free_ast_node :: proc(node: ^ast.Node, allocator: mem.Allocator) {
free_ast(n.value, allocator);
case Multi_Pointer_Type:
free_ast(n.elem, allocator);
+ case Matrix_Type:
+ free_ast(n.elem, allocator);
case:
panic(fmt.aprintf("free Unhandled node kind: %T", n));
}
diff --git a/src/index/clone.odin b/src/index/clone.odin
index ece39d2..6fe3b63 100644
--- a/src/index/clone.odin
+++ b/src/index/clone.odin
@@ -248,6 +248,9 @@ clone_node :: proc(node: ^ast.Node, allocator: mem.Allocator, unique_strings: ^m
case Multi_Pointer_Type:
r := cast(^Multi_Pointer_Type)res;
r.elem = clone_type(r.elem, allocator, unique_strings);
+ case Matrix_Type:
+ r := cast(^Matrix_Type)res;
+ r.elem = clone_type(r.elem, allocator, unique_strings);
case:
panic(fmt.aprintf("Clone type Unhandled node kind: %T", node.derived));
}
diff --git a/src/server/response.odin b/src/server/response.odin
index 0d9cf2e..c132532 100644
--- a/src/server/response.odin
+++ b/src/server/response.odin
@@ -7,7 +7,7 @@ send_notification :: proc (notification: Notification, writer: ^Writer) -> bool
data, error := json.marshal(notification, context.temp_allocator);
- header := fmt.tprintf("Content-Length: {}\r\n\r\n", len(data));
+ header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data));
if error != .None {
return false;
@@ -28,7 +28,7 @@ send_response :: proc (response: ResponseMessage, writer: ^Writer) -> bool {
data, error := json.marshal(response, context.temp_allocator);
- header := fmt.tprintf("Content-Length: {}\r\n\r\n", len(data));
+ header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data));
if error != .None {
return false;
@@ -49,7 +49,7 @@ send_error :: proc (response: ResponseMessageError, writer: ^Writer) -> bool {
data, error := json.marshal(response, context.temp_allocator);
- header := fmt.tprintf("Content-Length: {}\r\n\r\n", len(data));
+ header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data));
if error != .None {
return false;