Fix quoting of properties

- Make AST_ConciseMethod child of AST_ObjectProperty.
- Fix some typos.
This commit is contained in:
Anthony Van de Gejuchte
2016-07-29 03:18:21 +02:00
committed by Richard van Velzen
parent 67461666dc
commit 1c15d0db45
7 changed files with 257 additions and 58 deletions

View File

@@ -248,6 +248,26 @@ classes_can_have_computed_static: {
}
}
class_methods_and_getters_with_keep_quoted_props_enabled: {
beautify = {
quote_style: 3,
keep_quoted_props: true,
}
input: {
class clss {
a() {}
"b"() {}
get c() { return "c"}
get "d"() { return "d"}
set e(a) { doSomething(a); }
set 'f'(a) { doSomething(b); }
static g() {}
static "h"() {}
}
}
expect_exact: 'class clss{a(){}"b"(){}get c(){return"c"}get"d"(){return"d"}set e(a){doSomething(a)}set\'f\'(a){doSomething(b)}static g(){}static"h"(){}}'
}
new_target: {
input: {
new.target;