mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "Token.h"
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
|
||||
namespace JS {
|
||||
|
@ -20,8 +20,8 @@ public:
|
|||
|
||||
Token next();
|
||||
|
||||
String const& source() const { return m_source; };
|
||||
String const& filename() const { return m_filename; };
|
||||
DeprecatedString const& source() const { return m_source; };
|
||||
DeprecatedString const& filename() const { return m_filename; };
|
||||
|
||||
void disallow_html_comments() { m_allow_html_comments = false; };
|
||||
|
||||
|
@ -57,13 +57,13 @@ private:
|
|||
|
||||
TokenType consume_regex_literal();
|
||||
|
||||
String m_source;
|
||||
DeprecatedString m_source;
|
||||
size_t m_position { 0 };
|
||||
Token m_current_token;
|
||||
char m_current_char { 0 };
|
||||
bool m_eof { false };
|
||||
|
||||
String m_filename;
|
||||
DeprecatedString m_filename;
|
||||
size_t m_line_number { 1 };
|
||||
size_t m_line_column { 0 };
|
||||
|
||||
|
@ -80,8 +80,8 @@ private:
|
|||
Optional<size_t> m_hit_invalid_unicode;
|
||||
|
||||
static HashMap<FlyString, TokenType> s_keywords;
|
||||
static HashMap<String, TokenType> s_three_char_tokens;
|
||||
static HashMap<String, TokenType> s_two_char_tokens;
|
||||
static HashMap<DeprecatedString, TokenType> s_three_char_tokens;
|
||||
static HashMap<DeprecatedString, TokenType> s_two_char_tokens;
|
||||
static HashMap<char, TokenType> s_single_char_tokens;
|
||||
|
||||
struct ParsedIdentifiers : public RefCounted<ParsedIdentifiers> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue