| Class | Lisp::Format::Lexer |
| In: |
lib/facet/lisp-format.rb
|
| Parent: | Object |
Given a format string, this class lexes it and returns directives it finds. This includes gathering parameters and modifiers for the coming directives. The necessary information to create a directive is gathered and then passed to Directives::Factory#build. Error checking is performed, so that incomplete parameters are caught and malformed modifiers are supressed.
Read the next token, given the previous one in previous, and return it. This may either be a ‘real’ directive created by Directives::Factory#build, or a Literal created in-line. If no more tokens remain, nil is returned.
Read modifiers to the coming directive. Raises ModifierError if a specific modifier is given more than once.