declareConst function
Declare a const variable named variableName
.
Returns const {variableName}
, or const {type} {variableName}
.
Implementation
Expression declareConst(String variableName, {Reference? type}) =>
BinaryExpression._(
const LiteralExpression._('const'),
type == null
? LiteralExpression._(variableName)
: _typedVar(variableName, type),
'',
isConst: true);