Prism Ruby parser
Loading...
Searching...
No Matches
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
18typedef enum {
19 PM_COMMENT_INLINE,
20 PM_COMMENT_EMBDOC
22
25
32PRISM_EXPORTED_FUNCTION pm_location_t pm_comment_location(const pm_comment_t *comment) PRISM_NONNULL(1);
33
41PRISM_EXPORTED_FUNCTION pm_comment_type_t pm_comment_type(const pm_comment_t *comment) PRISM_NONNULL(1);
42
43#endif
The abstract syntax tree.
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.
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.
struct pm_comment_t pm_comment_t
An opaque pointer to a comment found while parsing.
Definition comments.h:24
pm_comment_type_t
This is the type of a comment that we've found while parsing.
Definition comments.h:18
This struct represents a slice in the source code, defined by an offset and a length.
Definition ast.h:559