aboutsummaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-03-13 14:07:29 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2026-03-13 14:09:53 +0200
commited7da0d9e31e8dd6847e2e603f0d1943330cf4d0 (patch)
tree16e4785bd92f43a37bed6b0028b0f239faa00d51 /src/parser.y
parent25b8db28cf87708808744b97774c2a8427e129e2 (diff)
downloadfwd-ed7da0d9e31e8dd6847e2e603f0d1943330cf4d0.tar.gz
fwd-ed7da0d9e31e8dd6847e2e603f0d1943330cf4d0.zip
add initial reference invalidation
+ Makes vec example actually memory safe, which is cool + Specify owner > sub relationships with ">" in closure parameter lists, uses the same group idea as closure calls + Relies on users implementing functions in a consistent manner, since you can kind of do whatever with pointers. Presumably there would be a stdlib of vec/map/set etc. which applications could then use and by proxy be memory safe. Although some more checks wouldn't hurt, I suppose? + Not sure I like having reference invalidation be 'just a move', seems to work alright but the semantics of it are a bit muddy.
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y
index 6210a95..776e1c9 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -289,6 +289,7 @@ type
rev_types
: rev_types "," type { $$ = $3; $$->n = $1; }
+ | rev_types ">" type { $$ = $3; $$->n = $1; own_type_group($1, $3); }
| type
types