Ruby 4.1.0dev (2026-10-27 revision db563a357875d4efbadec58b0fd8695ac9a82f42)
magic_comments.h
Go to the documentation of this file.
1
6#ifndef PRISM_MAGIC_COMMENTS_H
7#define PRISM_MAGIC_COMMENTS_H
8
11
12#include "prism/ast.h"
13
14#include <stddef.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
22
30
38
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition exported.h:20
PRISM_EXPORTED_FUNCTION pm_location_t pm_magic_comment_value(const pm_magic_comment_t *magic_comment) PRISM_NONNULL(1)
Returns the location of the value associated with the given magic comment.
Definition parser.c:285
PRISM_EXPORTED_FUNCTION pm_location_t pm_magic_comment_key(const pm_magic_comment_t *magic_comment) PRISM_NONNULL(1)
Returns the location of the key associated with the given magic comment.
Definition parser.c:277
PRISM_EXPORTED_FUNCTION const pm_magic_comment_t * pm_magic_comment_next(const pm_magic_comment_t *magic_comment) PRISM_NONNULL(1)
Returns the magic comment that follows the given magic comment among the magic comments associated wi...
Definition parser.c:293
#define PRISM_NONNULL(...)
Mark the parameters of a function as non-null.
Definition nonnull.h:13
This struct represents a slice in the source code, defined by an offset and a length.
Definition ast.h:579