diff options
-rw-r--r-- | src/parse/lex.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index 829a62de..a3e8c0d0 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -31,8 +31,21 @@ Lexer::Lexer(::std::string filename): { throw ::std::runtime_error("Unable to open file"); } + if( this->getc() == '\xef' ) + { + if( this->getc() != '\xbb' ) + ; + if( this->getc() != '\xbf' ) + ; + m_line_ofs = 0; + } + else + { + this->ungetc(); + } } + #define LINECOMMENT -1 #define BLOCKCOMMENT -2 #define SINGLEQUOTE -3 |