aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2024-06-02 10:10:18 +0200
committerDanielGavin <danielgavin5@hotmail.com>2024-06-02 10:10:18 +0200
commitb3ed829bd3623748a34b9031e27e8c693a226232 (patch)
treecacb063fd878a41af5ae60026143d405f2f60f6d /src
parent9083bc3f61bfb728256c5b80d42327ccc9c95f2c (diff)
Don't crash in get_node_length, instead just return zero.
Diffstat (limited to 'src')
-rw-r--r--src/odin/printer/visit.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin
index 7e83086..cbf63ed 100644
--- a/src/odin/printer/visit.odin
+++ b/src/odin/printer/visit.odin
@@ -2948,7 +2948,7 @@ get_node_length :: proc(node: ^ast.Node) -> int {
strings.rune_count(v.field.name) \
)
case:
- panic(fmt.aprintf("unhandled get_node_length case %v", node.derived))
+ return 0
}
}