aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-09-26 18:04:47 +0200
committerDanielGavin <danielgavin5@hotmail.com>2023-09-26 18:04:47 +0200
commit5e5e5b7097017404a0505e556f2b78373bf7eb8f (patch)
tree3d501df3b2f240b3656506fa3c2e3f35493704dc /src
parente907cd5ffd8616180243d6226530d8686c86afaa (diff)
Have index expr return boolean as second result
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index b7ff01e..08512ba 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -1699,9 +1699,9 @@ internal_resolve_type_identifier :: proc(
true
} else {
if return_symbol, ok = resolve_generic_function(
- ast_context,
- v^,
- ); !ok {
+ ast_context,
+ v^,
+ ); !ok {
return_symbol, ok =
make_symbol_procedure_from_ast(
ast_context,
@@ -1805,9 +1805,9 @@ internal_resolve_type_identifier :: proc(
true
} else {
if return_symbol, ok = resolve_generic_function(
- ast_context,
- v^,
- ); !ok {
+ ast_context,
+ v^,
+ ); !ok {
return_symbol, ok =
make_symbol_procedure_from_ast(
ast_context,
@@ -3342,6 +3342,10 @@ get_generic_assignment :: proc(
if v.expr != nil {
append(results, value)
}
+ case ^ast.Index_Expr:
+ append(results, v)
+ b := make_bool_ast(ast_context, v.expr.pos, v.expr.end)
+ append(results, b)
case ^Type_Assertion:
if v.type != nil {
if unary, ok := v.type.derived.(^ast.Unary_Expr);