Commit 8b50e686e757d052f66f98ddf2e155455bb1d781

Baptiste 2024-07-31T15:32:14

buf_parse: wip

diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index 9bcd003..757d94a 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -1053,7 +1053,7 @@ sw buf_parse_call_op_unary (s_buf *buf, s_call *dest)
   if ((r = buf_ignore_spaces(buf)) < 0)
     goto clean;
   result += r;
-  if ((r = buf_parse_tag_primary(buf, &tmp.arguments->tag)) <= 0)
+  if ((r = buf_parse_tag(buf, &tmp.arguments->tag)) <= 0)
     goto clean;
   result += r;
   *dest = tmp;
@@ -3952,6 +3952,7 @@ sw buf_parse_tag_primary (s_buf *buf, s_tag *dest)
     result += r;
   }
   if ((r = buf_parse_tag_call_access(buf, dest)) != 0 ||
+      (r = buf_parse_tag_call_op_unary(buf, dest)) != 0 ||
       (r = buf_parse_tag_primary_2(buf, dest)) != 0)
     goto end;
   goto restore;
@@ -3998,7 +3999,6 @@ sw buf_parse_tag_primary_2 (s_buf *buf, s_tag *dest)
       (r = buf_parse_tag_if(buf, dest)) != 0 ||
       (r = buf_parse_tag_call(buf, dest)) != 0 ||
       (r = buf_parse_tag_call_paren(buf, dest)) != 0 ||
-      (r = buf_parse_tag_call_op_unary(buf, dest)) != 0 ||
       (r = buf_parse_tag_quote(buf, dest)) != 0 ||
       (r = buf_parse_tag_bool(buf, dest)) != 0 ||
       (r = buf_parse_tag_character(buf, dest)) != 0 ||
diff --git a/libkc3/buf_parse.h b/libkc3/buf_parse.h
index e251030..264decb 100644
--- a/libkc3/buf_parse.h
+++ b/libkc3/buf_parse.h
@@ -111,6 +111,7 @@ sw buf_parse_tag_brackets (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_call (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_call_access (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_call_op (s_buf *buf, s_tag *dest);
+sw buf_parse_tag_call_op_unary (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_call_paren (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_cfn (s_buf *buf, s_tag *dest);
 sw buf_parse_tag_character (s_buf *buf, s_tag *dest);