Skip to content

Commit

Permalink
Fix luajit || check
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Jun 22, 2024
1 parent 3e2a896 commit eec8848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion full-moon/src/ast/parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ fn parse_stmt(state: &mut ParserState) -> ParserResult<StmtVariant> {
#[cfg(any(feature = "lua52", feature = "luajit"))]
TokenType::Symbol {
symbol: Symbol::TwoColons,
} if state.lua_version().has_lua52() | state.lua_version().has_luajit() => {
} if state.lua_version().has_lua52() || state.lua_version().has_luajit() => {
let left_colons = state.consume().unwrap();

let name = match state.current() {
Expand Down
4 changes: 2 additions & 2 deletions full-moon/src/tokenizer/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl Lexer {
if matches!(self.source.current(), Some('x' | 'X')) {
let hex_character = self.source.next().unwrap();
self.read_hex_number(hex_character, start_position)
} else if (self.lua_version.has_luau() | self.lua_version.has_luajit())
} else if (self.lua_version.has_luau() || self.lua_version.has_luajit())
&& matches!(self.source.current(), Some('b' | 'B'))
{
let binary_character = self.source.next().unwrap();
Expand Down Expand Up @@ -1041,7 +1041,7 @@ impl Lexer {
binary_character: char,
start_position: Position,
) -> Option<LexerResult<Token>> {
debug_assert!(self.lua_version.has_luau() | self.lua_version.has_luajit());
debug_assert!(self.lua_version.has_luau() || self.lua_version.has_luajit());

let mut number = String::from_iter(['0', binary_character]);

Expand Down

0 comments on commit eec8848

Please sign in to comment.