@@ -936,10 +936,7 @@ namespace ts {
936936 }
937937
938938 function parseOptionalWithoutAdvancing ( t : SyntaxKind ) : boolean {
939- if ( token === t ) {
940- return true ;
941- }
942- return false ;
939+ return token === t ;
943940 }
944941
945942 function parseOptional ( t : SyntaxKind ) : boolean {
@@ -3321,7 +3318,7 @@ namespace ts {
33213318 return finishNode ( node ) ;
33223319 }
33233320
3324- function parseJsxElementOrSelfClosingElement ( inExpressionContext : boolean ) : JsxElement | JsxSelfClosingElement {
3321+ function parseJsxElementOrSelfClosingElement ( inExpressionContext : boolean ) : JsxElement | JsxSelfClosingElement {
33253322 let opening = parseJsxOpeningOrSelfClosingElement ( inExpressionContext ) ;
33263323 if ( opening . kind === SyntaxKind . JsxOpeningElement ) {
33273324 let node = < JsxElement > createNode ( SyntaxKind . JsxElement , opening . pos ) ;
@@ -3349,9 +3346,9 @@ namespace ts {
33493346 case SyntaxKind . JsxText :
33503347 return parseJsxText ( ) ;
33513348 case SyntaxKind . OpenBraceToken :
3352- return parseJsxExpression ( /*inExpression*/ false ) ;
3349+ return parseJsxExpression ( /*inExpression*/ false ) ;
33533350 case SyntaxKind . LessThanToken :
3354- return parseJsxElementOrSelfClosingElement ( /*inExpression*/ false ) ;
3351+ return parseJsxElementOrSelfClosingElement ( /*inExpression*/ false ) ;
33553352 }
33563353 Debug . fail ( "Unknown JSX child kind " + token ) ;
33573354 }
@@ -3436,7 +3433,7 @@ namespace ts {
34363433 if ( token !== SyntaxKind . CloseBraceToken ) {
34373434 node . expression = parseExpression ( ) ;
34383435 }
3439- if ( inExpressionContext ) {
3436+ if ( inExpressionContext ) {
34403437 parseExpected ( SyntaxKind . CloseBraceToken ) ;
34413438 }
34423439 else {
0 commit comments