Added constructor
git-svn-id: svn://10.0.0.236/trunk@58644 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
868917d9e3
commit
fe868e35ad
@ -31,3 +31,9 @@ JS::StringAtom &JS::StringAtomTable::operator[](const String &s)
|
||||
else
|
||||
return ht.insert(r, s);
|
||||
}
|
||||
|
||||
|
||||
JS::World::World()
|
||||
{
|
||||
initKeywords(*this);
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
#include "utilities.h"
|
||||
#include "hash.h"
|
||||
#include "parser.h"
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
@ -35,7 +36,9 @@ namespace JavaScript {
|
||||
|
||||
class StringAtom: public String {
|
||||
public:
|
||||
explicit StringAtom(const String &s): String(s) {}
|
||||
Token::Kind tokenKind; // Token::Kind if this is a keyword; Token::Id if not
|
||||
|
||||
explicit StringAtom(const String &s): String(s), tokenKind(Token::Id) {}
|
||||
private:
|
||||
StringAtom(const StringAtom&); // No copy constructor
|
||||
void operator=(const StringAtom&); // No assignment operator
|
||||
@ -55,7 +58,10 @@ namespace JavaScript {
|
||||
|
||||
|
||||
class World {
|
||||
public:
|
||||
StringAtomTable identifiers;
|
||||
|
||||
World();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -31,3 +31,9 @@ JS::StringAtom &JS::StringAtomTable::operator[](const String &s)
|
||||
else
|
||||
return ht.insert(r, s);
|
||||
}
|
||||
|
||||
|
||||
JS::World::World()
|
||||
{
|
||||
initKeywords(*this);
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
#include "utilities.h"
|
||||
#include "hash.h"
|
||||
#include "parser.h"
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
@ -35,7 +36,9 @@ namespace JavaScript {
|
||||
|
||||
class StringAtom: public String {
|
||||
public:
|
||||
explicit StringAtom(const String &s): String(s) {}
|
||||
Token::Kind tokenKind; // Token::Kind if this is a keyword; Token::Id if not
|
||||
|
||||
explicit StringAtom(const String &s): String(s), tokenKind(Token::Id) {}
|
||||
private:
|
||||
StringAtom(const StringAtom&); // No copy constructor
|
||||
void operator=(const StringAtom&); // No assignment operator
|
||||
@ -55,7 +58,10 @@ namespace JavaScript {
|
||||
|
||||
|
||||
class World {
|
||||
public:
|
||||
StringAtomTable identifiers;
|
||||
|
||||
World();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user