Skip to content

Commit 7b830dc

Browse files
committed
Add BOM check
1 parent d1811c7 commit 7b830dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/parser/src/lexer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ where
236236
lxr.window.slide();
237237
lxr.window.slide();
238238
lxr.window.slide();
239+
// Check if BOM exists
240+
if let Some('\u{feff}') = lxr.window[0] {
241+
lxr.window.slide();
242+
}
239243
// Start at top row (=1) left column (=1)
240244
lxr.location.reset();
241245
lxr

0 commit comments

Comments
 (0)