diff --git a/src/lib.rs b/src/lib.rs index e35631a..5c4e59f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,6 +61,16 @@ pub struct Lexer { /// Instantiates Lexer and retrieves Tokens of given source. /// 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: /// ``` /// let source = "some source";