Browse Source

Fix more comptime vars

master
Macoy Madson 11 months ago
parent
commit
5b52499a4e
  1. 6
      src/RemoteCommands.cake

6
src/RemoteCommands.cake

@ -90,8 +90,8 @@
(defun-comptime set-remote-command-definitions (environment (ref EvaluatorEnvironment)
&return bool)
(get-or-create-comptime-var num-remote-commands-installed int 0)
(get-or-create-comptime-var remote-commands
(get-or-create-comptime-var environment num-remote-commands-installed int 0)
(get-or-create-comptime-var environment remote-commands
(template (in std unordered_map) (in std string)
(addr (const Token))))
(unless (> (call-on-ptr size remote-commands) (deref num-remote-commands-installed))
@ -173,7 +173,7 @@
(add-compile-time-hook post-references-resolved set-remote-command-definitions)
(defmacro define-remote-command (name symbol arguments array &rest body any)
(get-or-create-comptime-var remote-commands
(get-or-create-comptime-var environment remote-commands
(template (in std unordered_map) (in std string)
(addr (const Token))))
(set (at (path name > contents) (deref remote-commands)) (addr (at startTokenIndex tokens)))

Loading…
Cancel
Save