logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

AtteanX::API::Lexer - Role defining common functionality for lexers.

Attributes

       "file"
       "linebuffer"
       "line"
       "column"
       "buffer"
       "start_column"
       "start_line"

Author

       Gregory Todd Williams  "<gwilliams@cpan.org>"

Bugs

       Please   report   any   bugs   or   feature   requests   to   through   the   GitHub   web  interface  at
       <https://github.com/kasei/attean/issues>.

Description

       The AtteanX::API::Lexer role provides a common interface and implementation for lexer implementations,
       allowing line-based buffer filling, and consuming of characters, constant strings, and fixed-length
       buffers.

Methods

       "fill_buffer"
           Fills the buffer with a new line from the underlying filehandle.

       "check_for_bom"
           Remove a BOM character if one appears at the start of the buffer.

       get_char_safe( $char )
           Consume  the  single character $char from the buffer.  Throw an error if $char is not at the start of
           the buffer.

       get_char( $char )
           Consume and return a single character from the buffer.

       peek_char( $char )
           Return a single character from the start of the buffer.

       read_word( $word )
           Consume the string $word from the start of the buffer.  Throw an error if $word is not at  the  start
           of the buffer.

       read_length( $length )
           Consume and return $length characters  from the start of the buffer.

Name

       AtteanX::API::Lexer - Role defining common functionality for lexers.

See Also

Version

       This document describes AtteanX::API::Lexer version 0.035

See Also