Struct lib_ruby_parser::ParserResult[][src]

#[repr(C)]pub struct ParserResult {
    pub ast: MaybePtr<Node>,
    pub tokens: List<Token>,
    pub diagnostics: List<Diagnostic>,
    pub comments: List<Comment>,
    pub magic_comments: List<MagicComment>,
    pub input: Input,
}

Combination of all data that Parser can give you

Fields

ast: MaybePtr<Node>

Abstract Syntax Tree that was constructed from you code. Contains None if the code gives no AST nodes

tokens: List<Token>

List of tokens returned by a Lexer and consumed by a Parser. Empty unless ParserOptions::record_tokens is set to true.

diagnostics: List<Diagnostic>

List of all diagnostics (errors and warings) that have been recorded during lexing and parsing

comments: List<Comment>

List of comments extracted from the source code.

magic_comments: List<MagicComment>

List of magic comments extracted from the source code.

input: Input

Input that was used for parsing.

Note: this input is not necessary the same byte array that you passed to Parser::parse. If encoding of the input is not UTF-8 or ASCII-8BIT/BINARY Parser invokes decoder that usually produces a different sequence of bytes.

Pass this data to Loc::source, otherwise you’ll get incorrect source ranges.

Trait Implementations

impl Debug for ParserResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.