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

PPI::Token::BOM - Tokens representing Unicode byte order marks

Author

       Chris Dolan <cdolan@cpan.org>

Description

       This is a special token in that it can only occur at the beginning of documents.  If a BOM byte mark
       occurs elsewhere in a file, it should be treated as PPI::Token::Whitespace.  We recognize the byte order
       marks identified at this URL: <http://www.unicode.org/faq/utf_bom.html#BOM>

           UTF-32, big-endian     00 00 FE FF
           UTF-32, little-endian  FF FE 00 00
           UTF-16, big-endian     FE FF
           UTF-16, little-endian  FF FE
           UTF-8                  EF BB BF

       Note that as of this writing, PPI only has support for UTF-8 (namely, in POD and strings) and no support
       for UTF-16 or UTF-32.  We support the BOMs of the latter two for completeness only.

       The BOM is considered non-significant, like white space.

Inheritance

         PPI::Token::BOM
         isa PPI::Token
             isa PPI::Element

Methods

       There are no additional methods beyond those provided by the parent PPI::Token and PPI::Element classes.

Name

       PPI::Token::BOM - Tokens representing Unicode byte order marks

Support

       See the support section in the main module

See Also