Ruby
4.1.0dev (2026-04-01 revision 9c827a49ccefc0b945b25a479cdd9ba0a156a21c)
prism
comments.h
Go to the documentation of this file.
1
6
#ifndef PRISM_COMMENTS_H
7
#define PRISM_COMMENTS_H
8
9
#include "
prism/compiler/exported.h
"
10
#include "
prism/compiler/nodiscard.h
"
11
#include "
prism/compiler/nonnull.h
"
12
13
#include "prism/ast.h"
14
15
#include <stddef.h>
16
18
typedef
enum
{
19
PM_COMMENT_INLINE,
20
PM_COMMENT_EMBDOC
21
}
pm_comment_type_t
;
22
24
typedef
struct
pm_comment_t
pm_comment_t
;
25
32
PRISM_EXPORTED_FUNCTION
pm_location_t
pm_comment_location
(
const
pm_comment_t
*comment)
PRISM_NONNULL
(1);
33
41
PRISM_EXPORTED_FUNCTION
pm_comment_type_t
pm_comment_type
(
const
pm_comment_t
*comment)
PRISM_NONNULL
(1);
42
43
#endif
pm_comment_location
PRISM_EXPORTED_FUNCTION pm_location_t pm_comment_location(const pm_comment_t *comment) PRISM_NONNULL(1)
Returns the location associated with the given comment.
Definition
parser.c:158
pm_comment_type
PRISM_EXPORTED_FUNCTION pm_comment_type_t pm_comment_type(const pm_comment_t *comment) PRISM_NONNULL(1)
Returns the type associated with the given comment.
Definition
parser.c:166
pm_comment_type_t
pm_comment_type_t
This is the type of a comment that we've found while parsing.
Definition
comments.h:18
exported.h
PRISM_EXPORTED_FUNCTION
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition
exported.h:20
nodiscard.h
nonnull.h
PRISM_NONNULL
#define PRISM_NONNULL(...)
Mark the parameters of a function as non-null.
Definition
nonnull.h:13
pm_comment_t
Definition
comments.h:9
pm_location_t
This struct represents a slice in the source code, defined by an offset and a length.
Definition
ast.h:554
Generated by
1.9.8