Docs
This commit is contained in:
parent
aa5f27e057
commit
75ea815ba5
10
src/lib.rs
10
src/lib.rs
|
@ -61,6 +61,16 @@ pub struct Lexer {
|
||||||
|
|
||||||
/// Instantiates Lexer and retrieves Tokens of given source.
|
/// Instantiates Lexer and retrieves Tokens of given source.
|
||||||
/// Returns Arc<[Token]>
|
/// Returns Arc<[Token]>
|
||||||
|
/// # Example:
|
||||||
|
/// ```
|
||||||
|
/// let lexed: Arc<[Token]> = lex!(r#"
|
||||||
|
/// #version 440
|
||||||
|
/// uniform float time;
|
||||||
|
/// void main() {
|
||||||
|
/// gl_FragColor = vec4(1.0, 0.5, 0.2, 1.0);
|
||||||
|
/// }
|
||||||
|
/// "#);
|
||||||
|
/// ```
|
||||||
/// Equivalent to:
|
/// Equivalent to:
|
||||||
/// ```
|
/// ```
|
||||||
/// let source = "some source";
|
/// let source = "some source";
|
||||||
|
|
Loading…
Reference in a new issue