Skip to content

Commit

Permalink
Fix expression: true when ConciseBody is expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Constellation committed Aug 14, 2012
1 parent 5ebc2fb commit 379810a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion esprima.js
Expand Up @@ -1673,7 +1673,7 @@ parseYieldExpression: true
body: body,
rest: null,
generator: options.generator,
expression: false
expression: body.type !== Syntax.BlockStatement
};
}

Expand Down
6 changes: 3 additions & 3 deletions test/test.js
Expand Up @@ -3593,7 +3593,7 @@ var testFixture = {
},
rest: null,
generator: false,
expression: false,
expression: true,
range: [15, 17],
loc: {
start: { line: 1, column: 15 },
Expand Down Expand Up @@ -3671,7 +3671,7 @@ var testFixture = {
},
rest: null,
generator: false,
expression: false,
expression: true,
range: [19, 21],
loc: {
start: { line: 1, column: 19 },
Expand Down Expand Up @@ -3773,7 +3773,7 @@ var testFixture = {
},
rest: null,
generator: false,
expression: false,
expression: true,
range: [22, 29],
loc: {
start: { line: 1, column: 22 },
Expand Down

0 comments on commit 379810a

Please sign in to comment.