+/* CDUMP */
+static bool tok_maybe_take_cdump_note(const tal_t *ctx,
+ struct parse_state *ps, const char **note)
+{
+ *note = NULL;
+ if (tok_take_if(&ps->toks, "CDUMP")) {
+ if (!tok_take_if(&ps->toks, "(")) {
+ complain(ps, "Expected ( after CDUMP");
+ return false;
+ }
+ *note = tok_take_expr_str(ctx, ps, ")");
+ if (!*note) {
+ complain(ps, "Expected ) after CDUMP(");
+ return false;
+ }
+ }
+ return true;
+}
+
+/* __attribute__((...)) */
+static bool tok_ignore_attribute(struct parse_state *ps)
+{
+ if (!tok_take_if(&ps->toks, "__attribute__"))
+ return true;
+
+ if (!tok_take_if(&ps->toks, "(") || !tok_take_if(&ps->toks, "(")) {
+ complain(ps, "Expected (( after __attribute__");
+ return false;
+ }
+
+ if (!tok_take_expr(ps, ")")) {
+ complain(ps, "Expected expression after __attribute__((");
+ return false;
+ }
+ if (!tok_take_if(&ps->toks, ")")) {
+ complain(ps, "Expected )) __attribute__((");
+ return false;
+ }
+ return true;
+}
+