pub struct Lexer { /* private fields */ }
Expand description

Parses tokens into text.

use apollo_parser::Lexer;

let query = "
{
    animal
    ...snackSelection
    ... on Pet {
      playmates {
        count
      }
    }
}
";
let lexer = Lexer::new(query);
assert_eq!(lexer.errors().len(), 0);

let tokens = lexer.tokens();

Implementations

Create a new instance of Lexer.

Get a reference to the lexer’s tokens.

Get a reference to the lexer’s tokens.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.