Ruby 4.1.0dev (2026-04-01 revision 9c827a49ccefc0b945b25a479cdd9ba0a156a21c)
comments.h
Go to the documentation of this file.
1
6#ifndef PRISM_COMMENTS_H
7#define PRISM_COMMENTS_H
8
12
13#include "prism/ast.h"
14
15#include <stddef.h>
16
18typedef enum {
19 PM_COMMENT_INLINE,
20 PM_COMMENT_EMBDOC
22
25
33
42
43#endif
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
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
This is the type of a comment that we've found while parsing.
Definition comments.h:18
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition exported.h:20
#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:554