lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::ParserResult Class Reference

Equivalent of lib_ruby_parser::ParserResult More...

#include <parser_result.hpp>

Public Member Functions

 ~ParserResult ()
 
 ParserResult (const ParserResult &)=delete
 
ParserResultoperator= (ParserResult const &)=delete
 
 ParserResult (ParserResult &&)=default
 
ParserResultoperator= (ParserResult &&)=default
 

Public Attributes

Nodeast
 Final AST, nullable. More...
 
TokenList tokens
 List of tokens, empty if parser_options.record_tokens was set to false. More...
 
DiagnosticList diagnostics
 List of diagnostics (errors/warnings) More...
 
CommentList comments
 List of comments. More...
 
MagicCommentList magic_comments
 List of magic comments. More...
 
DecodedInput input
 

Detailed Description

Constructor & Destructor Documentation

◆ ~ParserResult()

lib_ruby_parser::ParserResult::~ParserResult ( )

◆ ParserResult() [1/2]

lib_ruby_parser::ParserResult::ParserResult ( const ParserResult )
delete

◆ ParserResult() [2/2]

lib_ruby_parser::ParserResult::ParserResult ( ParserResult &&  )
default

Member Function Documentation

◆ operator=() [1/2]

ParserResult& lib_ruby_parser::ParserResult::operator= ( ParserResult &&  )
default

◆ operator=() [2/2]

ParserResult& lib_ruby_parser::ParserResult::operator= ( ParserResult const &  )
delete

Member Data Documentation

◆ ast

Node* lib_ruby_parser::ParserResult::ast

Final AST, nullable.

◆ comments

CommentList lib_ruby_parser::ParserResult::comments

List of comments.

◆ diagnostics

DiagnosticList lib_ruby_parser::ParserResult::diagnostics

List of diagnostics (errors/warnings)

◆ input

DecodedInput lib_ruby_parser::ParserResult::input

Decoded input

Sometimes source code has a magic encoding comment that forces us to re-encode given source to other encoding.

In such cases source code on the byte level is different and so all locations (Loc) refer to that new re-encode byte ranges.

Thus, always use this re-encoded byte array to compute source code of any location.

◆ magic_comments

MagicCommentList lib_ruby_parser::ParserResult::magic_comments

List of magic comments.

◆ tokens

TokenList lib_ruby_parser::ParserResult::tokens

List of tokens, empty if parser_options.record_tokens was set to false.


The documentation for this class was generated from the following file: