mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4468 from ethereum/variableDeclarationClenaup
Remove mentions of ``var`` in VariableDeclarationStatement comment.
This commit is contained in:
commit
0e9415bc31
@ -1250,13 +1250,12 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Definition of a variable as a statement inside a function. It requires a type name (which can
|
* Definition of one or more variables as a statement inside a function.
|
||||||
* also be "var") but the actual assignment can be missing.
|
* If multiple variables are declared, a value has to be assigned directly.
|
||||||
* Examples: var a = 2; uint256 a;
|
* If only a single variable is declared, the value can be missing.
|
||||||
* As a second form, multiple variables can be declared, cannot have a type and must be assigned
|
* Examples:
|
||||||
* right away. If the first or last component is unnamed, it can "consume" an arbitrary number
|
* uint[] memory a; uint a = 2;
|
||||||
* of components.
|
* (uint a, bytes32 b, ) = f(); (, uint a, , StructName storage x) = g();
|
||||||
* Examples: var (a, b) = f(); var (a,,,c) = g(); var (a,) = d();
|
|
||||||
*/
|
*/
|
||||||
class VariableDeclarationStatement: public Statement
|
class VariableDeclarationStatement: public Statement
|
||||||
{
|
{
|
||||||
@ -1278,6 +1277,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/// List of variables, some of which can be empty pointers (unnamed components).
|
/// List of variables, some of which can be empty pointers (unnamed components).
|
||||||
|
/// Note that the ``m_value`` member of these is unused. Instead, ``m_initialValue``
|
||||||
|
/// below is used, because the initial value can be a single expression assigned
|
||||||
|
/// to all variables.
|
||||||
std::vector<ASTPointer<VariableDeclaration>> m_variables;
|
std::vector<ASTPointer<VariableDeclaration>> m_variables;
|
||||||
/// The assigned expression / initial value.
|
/// The assigned expression / initial value.
|
||||||
ASTPointer<Expression> m_initialValue;
|
ASTPointer<Expression> m_initialValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user