|
Ruby 4.1.0dev (2026-10-28 revision 130c9ec44bd35c7319cdc99c301419188510e3a9)
|
Types and functions related to magic comments found during parsing. More...
#include "prism/compiler/exported.h"#include "prism/compiler/nonnull.h"#include "prism/ast.h"#include <stddef.h>

Go to the source code of this file.
Typedefs | |
| typedef struct pm_magic_comment_t | pm_magic_comment_t |
| An opaque pointer to a magic comment found while parsing. | |
Functions | |
| 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. | |
| 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. | |
| 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 with the parser that found it. | |
Types and functions related to magic comments found during parsing.
Definition in file magic_comments.h.
| typedef struct pm_magic_comment_t pm_magic_comment_t |
An opaque pointer to a magic comment found while parsing.
Definition at line 21 of file magic_comments.h.
| PRISM_EXPORTED_FUNCTION pm_location_t pm_magic_comment_key | ( | const pm_magic_comment_t * | magic_comment | ) |
Returns the location of the key associated with the given magic comment.
| magic_comment | the magic comment whose key location we want to get |
Returns the location of the key associated with the given magic comment.
Definition at line 277 of file parser.c.
Referenced by pm_magic_comment_key().
| PRISM_EXPORTED_FUNCTION const pm_magic_comment_t * pm_magic_comment_next | ( | const pm_magic_comment_t * | magic_comment | ) |
Returns the magic comment that follows the given magic comment among the magic comments associated with the parser that found it.
| magic_comment | the magic comment whose successor we want to get |
Returns the magic comment that follows the given magic comment among the magic comments associated with the parser that found it.
Definition at line 293 of file parser.c.
Referenced by pm_magic_comment_next().
| PRISM_EXPORTED_FUNCTION pm_location_t pm_magic_comment_value | ( | const pm_magic_comment_t * | magic_comment | ) |
Returns the location of the value associated with the given magic comment.
| magic_comment | the magic comment whose value location we want to get |
Returns the location of the value associated with the given magic comment.
Definition at line 285 of file parser.c.
Referenced by pm_magic_comment_value().