From 5f6ac45bded276ac01bbdd3b00fefc6a0c78af07 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 7 Aug 2015 16:03:45 -0700 Subject: [PATCH] S p a c e s --- src/compiler/parser.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ffd081f09d0..385d9dda226 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -936,10 +936,7 @@ namespace ts { } function parseOptionalWithoutAdvancing(t: SyntaxKind): boolean { - if (token === t) { - return true; - } - return false; + return token === t; } function parseOptional(t: SyntaxKind): boolean { @@ -3321,7 +3318,7 @@ namespace ts { return finishNode(node); } - function parseJsxElementOrSelfClosingElement(inExpressionContext: boolean): JsxElement|JsxSelfClosingElement { + function parseJsxElementOrSelfClosingElement(inExpressionContext: boolean): JsxElement | JsxSelfClosingElement { let opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); if (opening.kind === SyntaxKind.JsxOpeningElement) { let node = createNode(SyntaxKind.JsxElement, opening.pos); @@ -3349,9 +3346,9 @@ namespace ts { case SyntaxKind.JsxText: return parseJsxText(); case SyntaxKind.OpenBraceToken: - return parseJsxExpression(/*inExpression*/false); + return parseJsxExpression(/*inExpression*/ false); case SyntaxKind.LessThanToken: - return parseJsxElementOrSelfClosingElement(/*inExpression*/false); + return parseJsxElementOrSelfClosingElement(/*inExpression*/ false); } Debug.fail("Unknown JSX child kind " + token); } @@ -3436,7 +3433,7 @@ namespace ts { if (token !== SyntaxKind.CloseBraceToken) { node.expression = parseExpression(); } - if(inExpressionContext) { + if (inExpressionContext) { parseExpected(SyntaxKind.CloseBraceToken); } else {