Ruby
4.1.0dev (2026-10-27 revision db563a357875d4efbadec58b0fd8695ac9a82f42)
prism
magic_comments.h
Go to the documentation of this file.
1
6
#ifndef PRISM_MAGIC_COMMENTS_H
7
#define PRISM_MAGIC_COMMENTS_H
8
9
#include "
prism/compiler/exported.h
"
10
#include "
prism/compiler/nonnull.h
"
11
12
#include "prism/ast.h"
13
14
#include <stddef.h>
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
21
typedef
struct
pm_magic_comment_t
pm_magic_comment_t
;
22
29
PRISM_EXPORTED_FUNCTION
pm_location_t
pm_magic_comment_key
(
const
pm_magic_comment_t
*
magic_comment
)
PRISM_NONNULL
(1);
30
37
PRISM_EXPORTED_FUNCTION
pm_location_t
pm_magic_comment_value
(
const
pm_magic_comment_t
*
magic_comment
)
PRISM_NONNULL
(1);
38
47
PRISM_EXPORTED_FUNCTION
const
pm_magic_comment_t
*
pm_magic_comment_next
(
const
pm_magic_comment_t
*
magic_comment
)
PRISM_NONNULL
(1);
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
exported.h
PRISM_EXPORTED_FUNCTION
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition
exported.h:20
pm_magic_comment_value
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
pm_magic_comment_key
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
pm_magic_comment_next
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
nonnull.h
PRISM_NONNULL
#define PRISM_NONNULL(...)
Mark the parameters of a function as non-null.
Definition
nonnull.h:13
magic_comment
Definition
parse.c:21427
pm_location_t
This struct represents a slice in the source code, defined by an offset and a length.
Definition
ast.h:579
pm_magic_comment_t
Definition
magic_comments.h:12
Generated by
1.9.8