Permalink
Browse files

drop support for new string-literal from stage 0

  • Loading branch information...
NotFound committed May 27, 2012
1 parent 577cdc4 commit 77eebb718edce82c92d204635df79ea4748f23e2
Showing with 4 additions and 29 deletions.
  1. +1 −4 t/basic/05new.t
  2. +2 −2 t/instanceof.t
  3. +1 −23 winxedst0.cpp
View
@@ -6,7 +6,7 @@ using extern Test.More plan, ok, is, is_null;
function main()
{
- plan(10);
+ plan(9);
var obj;
@@ -30,9 +30,6 @@ function main()
ok(obj instanceof Bar, "new with empty argument list with constructor");
is(obj.b, "Hi", "constructor is invoked");
- obj = new "String";
- ok(obj instanceof "String", "new with string literal");
-
obj = new ["Integer"];
ok(obj instanceof "Integer", "new with key");
View
@@ -4,7 +4,7 @@
using extern Test.More plan, is;
-class MyArray : "ResizablePMCArray"
+class MyArray : [ "ResizablePMCArray" ]
{
}
@@ -16,7 +16,7 @@ function main [main] ()
{
plan(4);
- var a = new "ResizableBooleanArray";
+ var a = new [ "ResizableBooleanArray" ];
int check= a instanceof "ResizableBooleanArray";
is (check, 1, "is own type");
check= a instanceof "FixedPMCArray";
View
@@ -1183,7 +1183,6 @@ BaseStatement *addtomulti(BaseStatement *oldst, BaseStatement *newst)
enum ClassSpecifierType
{
CLASSSPECIFIER_invalid,
- CLASSSPECIFIER_str,
CLASSSPECIFIER_parrotkey,
CLASSSPECIFIER_id
};
@@ -6053,25 +6052,6 @@ class MethodStatement : public FunctionStatement
//**********************************************************************
-class ClassSpecifierStr : public ClassSpecifier
-{
-public:
- ClassSpecifierStr(const Token &t) :
- ClassSpecifier(t),
- name(t.pirliteralstring())
- {
- }
- ClassSpecifierType reftype() const { return CLASSSPECIFIER_str; }
-private:
- void emit(Emit &e)
- {
- e << "[ " << name << " ]";
- }
- std::string basename() const { return name; }
- std::string name;
-};
-
-
class ClassSpecifierParrotKey : public ClassSpecifier
{
public:
@@ -6144,9 +6124,7 @@ class ClassSpecifierId : public ClassSpecifier
ClassSpecifier *parseClassSpecifier(const Token &start, Tokenizer &tk,
BlockBase &owner)
{
- if (start.isliteralstring())
- return new ClassSpecifierStr(start);
- else if (start.isidentifier ())
+ if (start.isidentifier ())
return new ClassSpecifierId(start, tk, owner);
else if (start.isop('['))
return new ClassSpecifierParrotKey(start, tk);

0 comments on commit 77eebb7

Please sign in to comment.