Add descriptions to transformation/transformers/es6/constants

This commit is contained in:
James Kyle 2015-07-11 12:08:03 -07:00
parent 90a5b96480
commit 3207a387a7

View File

@ -1,13 +1,29 @@
import * as messages from "../../../messages";
/**
* [Please add a description.]
* Turn constants into variables.
* Ensure there are no constant violations in any scope.
*
* @example
*
* **In**
*
* ```javascript
* const MULTIPLIER = 5;
* ```
*
* **Out**
*
* ```javascript
* var MULTIPLIER = 5;
* ```
*/
export var visitor = {
/**
* [Please add a description.]
* Look for any constants (or modules) in scope.
* If they have any `constantViolations` throw an error.
*/
Scope(node, parent, scope) {
@ -24,7 +40,8 @@ export var visitor = {
},
/**
* [Please add a description.]
* Look for constants.
* Turn them into `let` variables.
*/
VariableDeclaration(node) {