ckknight/gorillascript — pull request #153 by kkirby (2014-10-28 15:03:23+00:00)
Title: Fix for constants in do statements

In the instance of having a "do" statement with a constant defined, and a macro inside of the do statement that tries to get the value of the constant, the constant wouldn't be defined. I simply added macro-expand-all to evaluate the constant. This may or may not be the right fix for the problem.

The issue appears to only occur when the do statement has variable assignments. See below for an example:

macro getConst()
let value = @getConstValue \VALUE
AST $value

// Works
do
const VALUE = \asdf
console.log getConst()

// Does not work
do A = B
const VALUE = \asdf
console.log getConst()