Prism Ruby parser
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
comments.h File Reference

Types and functions related to comments found during parsing. More...

#include "prism/compiler/exported.h"
#include "prism/compiler/nodiscard.h"
#include "prism/compiler/nonnull.h"
#include "prism/ast.h"
#include <stddef.h>
Include dependency graph for comments.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct pm_comment_t pm_comment_t
 An opaque pointer to a comment found while parsing.
 

Enumerations

enum  pm_comment_type_t { PM_COMMENT_INLINE , PM_COMMENT_EMBDOC }
 This is the type of a comment that we've found while parsing.
 

Functions

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.
 

Detailed Description

Types and functions related to comments found during parsing.

Function Documentation

◆ pm_comment_location()

PRISM_EXPORTED_FUNCTION pm_location_t pm_comment_location ( const pm_comment_t *  comment)

Returns the location associated with the given comment.

Parameters
commentthe comment whose location we want to get
Returns
the location associated with the given comment

◆ pm_comment_type()

PRISM_EXPORTED_FUNCTION pm_comment_type_t pm_comment_type ( const pm_comment_t *  comment)

Returns the type associated with the given comment.

Parameters
commentthe comment whose type we want to get
Returns
the type associated with the given comment. This can either be PM_COMMENT_INLINE or PM_COMMENT_EMBDOC.