Prism Ruby parser
Loading...
Searching...
No Matches
Functions
stream.h File Reference

Functions for parsing streams. More...

#include "prism/compiler/exported.h"
#include "prism/compiler/nonnull.h"
#include "prism/arena.h"
#include "prism/options.h"
#include "prism/parser.h"
#include "prism/source.h"
Include dependency graph for stream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PRISM_EXPORTED_FUNCTION pm_node_tpm_parse_stream (pm_parser_t **parser, pm_arena_t *arena, pm_source_t *source, const pm_options_t *options) PRISM_NONNULL(1
 Parse a stream of Ruby source and return the tree.
 

Detailed Description

Functions for parsing streams.

Function Documentation

◆ pm_parse_stream()

PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream ( pm_parser_t **  parser,
pm_arena_t arena,
pm_source_t source,
const pm_options_t options 
)

Parse a stream of Ruby source and return the tree.

Parameters
parserThe out parameter to write the parser to.
arenaThe arena to use for all AST-lifetime allocations.
sourceThe source to use, created via pm_source_stream_new.
optionsThe optional options to use when parsing.
Returns
The AST representing the source.