pub fn new(source: &'a str) -> Self {
        Self {
            iter: SourceIter::new(source),
            modes: LexerModes::default(),
            buffer: VecDeque::new(),
        }
    }
/// Construct a new lexer over the given source.
///
/// # Examples
///
/// ```rust
/// use rune::Lexer;
/// use rune::ast;
/// use runestick::span;
///
/// assert_eq! {
///     Lexer::new("fn").next().unwrap().unwrap(),
///     ast::Token {
///         kind: ast::Kind::Fn,
///         span: span!(0, 2),
///     }
/// };
///
/// assert_eq! {
///     Lexer::new("name").next().unwrap().unwrap(),
///     ast::Token {
///         kind: ast::Kind::Ident(ast::StringSource::Text),
///         span: span!(0, 4),
///     }
/// };
/// ```
Construct a new lexer over the given source.
Construct a new lexer over the given source .
pub fn new(source: &'a str) -> Self {
        Self {
            iter: SourceIter::new(source),
            modes: LexerModes::default(),
            buffer: VecDeque::new(),
        }
    }
pub fn new ( source : & ' a str ) -> Self { Self { iter : SourceIter :: new ( source ) , modes : LexerModes :: default ( ) , buffer : VecDeque :: new ( ) , } }
Construct a new lexer over the given source.
Construct a new lexer over the given source .
source
&'a str
source
&'a str
examples
```rust
use rune::Lexer;
use rune::ast;
use runestick::span.




` ` ` rust use rune :: Lexer ; use rune :: ast ; use runestick :: span .