static properties

This commit is contained in:
Fábio Santos
2015-10-27 00:51:47 +00:00
parent 5f7cb6939c
commit 9ffed2bea6
4 changed files with 50 additions and 4 deletions

View File

@@ -200,6 +200,20 @@ classes: {
expect_exact: "class SomeClass{constructor(){}foo(){}}class NoSemi{constructor(...args){}foo(){}}class ChildClass extends SomeClass{}var asExpression=class AsExpression{};var nameless=class{};"
}
class_statics: {
input: {
x = class {
static staticMethod() {}
static get foo() {}
static set bar() {}
static() { /* "static" can be a method name! */ }
get() { /* "get" can be a method name! */ }
set() { /* "set" can be a method name! */ }
}
}
expect_exact: "x=class{static staticMethod(){}static get foo(){}static set bar(){}static(){}get(){}set(){}};"
}
number_literals: {
input: {
0b1001;