[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [qmlweb/development/qmlweb2] src/qmljsc: [Compiler] Fix coding-style
From: Jan Marker <jan () jangmarker ! de>
Date: 2015-09-30 20:31:09
Message-ID: E1ZhO1t-0002hV-VE () scm ! kde ! org
[Download RAW message or body]
Git commit 7da4becf8d178a5efe19684fff191e58b355d499 by Jan Marker.
Committed on 30/09/2015 at 20:30.
Pushed by jangmarker into branch 'development/qmlweb2'.
[Compiler] Fix coding-style
M +6 -6 src/qmljsc/purejavascriptgenerator.cpp
http://commits.kde.org/qmlweb/7da4becf8d178a5efe19684fff191e58b355d499
diff --git a/src/qmljsc/purejavascriptgenerator.cpp \
b/src/qmljsc/purejavascriptgenerator.cpp index 5256ec9..b5adc31 100644
--- a/src/qmljsc/purejavascriptgenerator.cpp
+++ b/src/qmljsc/purejavascriptgenerator.cpp
@@ -186,8 +186,8 @@ void \
PureJavaScriptGenerator::endVisit(AST::FunctionBody *) { }
void PureJavaScriptGenerator::endVisit(AST::FunctionDeclaration \
*functionDeclaration) {
- const QString body = \
(functionDeclaration->body)?m_outputStack.pop():"{}";
- const QString parameters = \
(functionDeclaration->formals)?m_outputStack.pop():""; + const QString \
body = (functionDeclaration->body) ? m_outputStack.pop() : "{}"; + const \
QString parameters = (functionDeclaration->formals) ? m_outputStack.pop() : \
""; const QString name = functionDeclaration->name.toString();
m_outputStack << "function " + name + '(' + parameters + ')' + body;
}
@@ -196,7 +196,7 @@ void \
PureJavaScriptGenerator::endVisit(AST::IdentifierExpression *) { }
void PureJavaScriptGenerator::endVisit(AST::IfStatement *ifExpression) {
- const QString elseStatements = \
(ifExpression->ko)?m_outputStack.pop():""; + const QString \
elseStatements = (ifExpression->ko) ? m_outputStack.pop() : ""; const \
QString ifStatements = m_outputStack.pop(); const QString expression = \
m_outputStack.pop();
@@ -231,7 +231,7 @@ void \
PureJavaScriptGenerator::endVisit(AST::PreIncrementExpression *) { }
void PureJavaScriptGenerator::endVisit(AST::ReturnStatement \
*returnStatement) {
- const QString expression = (returnStatement->expression)?' \
'+m_outputStack.pop():""; + const QString expression = \
(returnStatement->expression) ? ' '+m_outputStack.pop() : ""; \
m_outputStack << "return" + expression + ';'; }
@@ -253,7 +253,7 @@ void \
PureJavaScriptGenerator::endVisit(AST::SwitchStatement *) { }
void PureJavaScriptGenerator::endVisit(AST::VariableDeclaration \
*declaration) {
- const QString expression = \
(declaration->expression)?"="+m_outputStack.pop():""; + const QString \
expression = (declaration->expression) ? "="+m_outputStack.pop() : ""; \
const QString variableName = declaration->name.toString(); m_outputStack \
<< variableName + expression; }
@@ -261,7 +261,7 @@ void \
PureJavaScriptGenerator::endVisit(AST::VariableDeclaration *declaration) { \
void PureJavaScriptGenerator::endVisit(AST::VariableDeclarationList \
*declarationList) { \
reduceListStack<AST::VariableDeclarationList>(declarationList, ","); const \
QString declarationListCode = m_outputStack.pop();
- const QString declarationType = \
(declarationList->declaration->readOnly)?"const":"var"; + const QString \
declarationType = (declarationList->declaration->readOnly) ? "const" : \
"var"; m_outputStack << declarationType + ' ' + declarationListCode;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic