Decorated classes/methods start where the decorator starts

This commit is contained in:
Peeyush Kushwaha
2017-06-22 01:45:27 +05:30
parent 04b40868f9
commit e1972baff5
13 changed files with 27 additions and 21 deletions

View File

@@ -30,11 +30,11 @@
"body": [
{
"type": "ClassDeclaration",
"start": 12,
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 2,
"line": 1,
"column": 0
},
"end": {

View File

@@ -30,11 +30,11 @@
"body": [
{
"type": "ClassDeclaration",
"start": 5,
"start": 0,
"end": 19,
"loc": {
"start": {
"line": 2,
"line": 1,
"column": 0
},
"end": {

View File

@@ -76,12 +76,12 @@
},
"init": {
"type": "ClassExpression",
"start": 15,
"start": 10,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 15
"column": 10
},
"end": {
"line": 6,
@@ -157,11 +157,11 @@
"body": [
{
"type": "ClassMethod",
"start": 36,
"start": 29,
"end": 56,
"loc": {
"start": {
"line": 3,
"line": 2,
"column": 2
},
"end": {

View File

@@ -77,12 +77,12 @@
"body": [
{
"type": "ClassMethod",
"start": 17,
"start": 12,
"end": 23,
"loc": {
"start": {
"line": 2,
"column": 7
"column": 2
},
"end": {
"line": 2,

View File

@@ -77,11 +77,11 @@
"body": [
{
"type": "ClassMethod",
"start": 29,
"start": 12,
"end": 34,
"loc": {
"start": {
"line": 3,
"line": 2,
"column": 2
},
"end": {

View File

@@ -44,12 +44,12 @@
},
"declaration": {
"type": "ClassExpression",
"start": 21,
"start": 16,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 5
"column": 0
},
"end": {
"line": 2,

View File

@@ -1,4 +1,4 @@
{
"plugins": ["classProperties", "decoratorsStage2"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:7)"
"throws": "Stage 2 decorators may only be used with a class or a class method (2:2)"
}

View File

@@ -1,4 +1,4 @@
{
"plugins": ["decoratorsStage2", "classProperties"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:6)"
"throws": "Stage 2 decorators may only be used with a class or a class method (2:2)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "You can't attach decorators to a class constructor (3:2)"
"throws": "You can't attach decorators to a class constructor (2:2)"
}

View File

@@ -1,4 +1,4 @@
{
"plugins": ["classProperties", "classPrivateProperties", "decoratorsStage2"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:7)"
"throws": "Stage 2 decorators may only be used with a class or a class method (2:2)"
}

View File

@@ -1,4 +1,4 @@
{
"plugins": ["classProperties", "decoratorsStage2"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:7)"
"throws": "Stage 2 decorators may only be used with a class or a class method (2:2)"
}

View File

@@ -77,11 +77,11 @@
"body": [
{
"type": "ClassMethod",
"start": 19,
"start": 12,
"end": 31,
"loc": {
"start": {
"line": 3,
"line": 2,
"column": 2
},
"end": {