summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/LiteralParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/LiteralParser.h')
-rw-r--r--Source/JavaScriptCore/runtime/LiteralParser.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/runtime/LiteralParser.h b/Source/JavaScriptCore/runtime/LiteralParser.h
index abe3f95b7..c0f308ee5 100644
--- a/Source/JavaScriptCore/runtime/LiteralParser.h
+++ b/Source/JavaScriptCore/runtime/LiteralParser.h
@@ -29,7 +29,7 @@
#include "Identifier.h"
#include "JSGlobalObjectFunctions.h"
#include "JSValue.h"
-#include "UString.h"
+#include <wtf/text/WTFString.h>
namespace JSC {
@@ -67,7 +67,7 @@ struct LiteralParserToken {
TokenType type;
const CharType* start;
const CharType* end;
- UString stringBuffer;
+ String stringBuffer;
union {
double numberToken;
struct {
@@ -94,13 +94,13 @@ public:
{
}
- UString getErrorMessage()
+ String getErrorMessage()
{
if (!m_lexer.getErrorMessage().isEmpty())
return String::format("JSON Parse error: %s", m_lexer.getErrorMessage().ascii().data()).impl();
if (!m_parseErrorMessage.isEmpty())
return String::format("JSON Parse error: %s", m_parseErrorMessage.ascii().data()).impl();
- return "JSON Parse error: Unable to parse JSON string";
+ return ASCIILiteral("JSON Parse error: Unable to parse JSON string");
}
JSValue tryLiteralParse()
@@ -133,10 +133,10 @@ private:
return m_currentToken;
}
- UString getErrorMessage() { return m_lexErrorMessage; }
+ String getErrorMessage() { return m_lexErrorMessage; }
private:
- UString m_lexErrorMessage;
+ String m_lexErrorMessage;
template <ParserMode mode> TokenType lex(LiteralParserToken<CharType>&);
ALWAYS_INLINE TokenType lexIdentifier(LiteralParserToken<CharType>&);
template <ParserMode mode, char terminator> ALWAYS_INLINE TokenType lexString(LiteralParserToken<CharType>&);
@@ -153,7 +153,7 @@ private:
ExecState* m_exec;
typename LiteralParser<CharType>::Lexer m_lexer;
ParserMode m_mode;
- UString m_parseErrorMessage;
+ String m_parseErrorMessage;
static unsigned const MaximumCachableCharacter = 128;
FixedArray<Identifier, MaximumCachableCharacter> m_shortIdentifiers;
FixedArray<Identifier, MaximumCachableCharacter> m_recentIdentifiers;