Browse Source

Typo fixes

tags/2021-05-28
tpoole 8 years ago
parent
commit
6f27a1d4a4
3 changed files with 10 additions and 10 deletions
  1. +7
    -7
      modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h
  2. +2
    -2
      modules/juce_core/javascript/juce_Javascript.cpp
  3. +1
    -1
      modules/juce_gui_basics/widgets/juce_ComboBox.h

+ 7
- 7
modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h View File

@@ -504,7 +504,7 @@ private:
{
auto lhs = parseLogicOperator();
if (matchIf (Token::question)) return parseTerneryOperator (lhs);
if (matchIf (Token::question)) return parseTernaryOperator (lhs);
if (matchIf (Token::plusEquals)) return parseInPlaceOpExpression (lhs, Token::plus);
if (matchIf (Token::minusEquals)) return parseInPlaceOpExpression (lhs, Token::minus);
if (matchIf (Token::timesEquals)) return parseInPlaceOpExpression (lhs, Token::times);
@@ -522,9 +522,9 @@ private:
return lhs;
}
ExpPtr parseTerneryOperator (ExpPtr condition)
ExpPtr parseTernaryOperator (ExpPtr condition)
{
auto e = allocate<TerneryOp> (location, blockBeingParsed);
auto e = allocate<TernaryOp> (location, blockBeingParsed);
e->condition = condition;
e->trueBranch = parseExpression();
match (Token::colon);
@@ -1277,9 +1277,9 @@ private:
StatementPtr trueBranch, falseBranch;
};
struct TerneryOp : public Expression
struct TernaryOp : public Expression
{
TerneryOp (const CodeLocation& l, BlockPtr parent) : Expression (l, parent) {}
TernaryOp (const CodeLocation& l, BlockPtr parent) : Expression (l, parent) {}
void emit (CodeGenerator& cg, Type requiredType, int stackDepth) const override
{
@@ -1298,8 +1298,8 @@ private:
{
auto type = trueBranch->getType (cg);
if (type == Type::void_) location.throwError ("The ternery operator cannot take void arguments");
if (type != falseBranch->getType (cg)) location.throwError ("Expected both branches of this ternery operator to have the same type");
if (type == Type::void_) location.throwError ("The ternary operator cannot take void arguments");
if (type != falseBranch->getType (cg)) location.throwError ("Expected both branches of this ternary operator to have the same type");
return type;
}


+ 2
- 2
modules/juce_core/javascript/juce_Javascript.cpp View File

@@ -1072,7 +1072,7 @@ struct JavascriptEngine::RootObject : public DynamicObject
{
ExpPtr lhs (parseLogicOperator());
if (matchIf (TokenTypes::question)) return parseTerneryOperator (lhs);
if (matchIf (TokenTypes::question)) return parseTernaryOperator (lhs);
if (matchIf (TokenTypes::assign)) { ExpPtr rhs (parseExpression()); return new Assignment (location, lhs, rhs); }
if (matchIf (TokenTypes::plusEquals)) return parseInPlaceOpExpression<AdditionOp> (lhs);
if (matchIf (TokenTypes::minusEquals)) return parseInPlaceOpExpression<SubtractionOp> (lhs);
@@ -1485,7 +1485,7 @@ struct JavascriptEngine::RootObject : public DynamicObject
return a.release();
}
Expression* parseTerneryOperator (ExpPtr& condition)
Expression* parseTernaryOperator (ExpPtr& condition)
{
ScopedPointer<ConditionalOp> e (new ConditionalOp (location));
e->condition = condition;


+ 1
- 1
modules/juce_gui_basics/widgets/juce_ComboBox.h View File

@@ -272,7 +272,7 @@ public:
/** Returns the PopupMenu object associated with the ComboBox.
Can be useful for adding sub-menus to the ComboBox standard PopupMenu
*/
PopupMenu *getRootMenu() { return &currentMenu; }
PopupMenu* getRootMenu() { return &currentMenu; }
//==============================================================================
/**


Loading…
Cancel
Save