summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/LiteralParser.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/runtime/LiteralParser.h
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
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;