1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibGUI: Use CharacterTypes.h and constexpr functions in {INI,GML}Lexer

This commit is contained in:
Max Wipfli 2021-06-04 00:02:12 +02:00 committed by Ali Mohammad Pur
parent e10278402f
commit e7b5dbe1ac
2 changed files with 14 additions and 14 deletions

View file

@ -5,8 +5,8 @@
*/
#include "INILexer.h"
#include <AK/CharacterTypes.h>
#include <AK/Vector.h>
#include <ctype.h>
namespace GUI {
@ -61,16 +61,16 @@ Vector<IniToken> IniLexer::lex()
IniToken token;
token.m_type = type;
token.m_start = token_start_position;
token.m_end = m_previous_position;
token.m_end = m_position;
tokens.append(token);
};
while (m_index < m_input.length()) {
auto ch = peek();
if (isspace(ch)) {
if (is_ascii_space(ch)) {
begin_token();
while (isspace(peek()))
while (is_ascii_space(peek()))
consume();
commit_token(IniToken::Type::Whitespace);
continue;