protected override SyntaxNode VisitIdentifierSyntax(IdentifierSyntax pNode)
 {
     //TODO this isn't 100% because we could define a var with the same name as the constant
     if (_locals.IsVariableDefined(pNode.Value))
     {
         return(_locals.GetVariable(pNode.Value));
     }
     return(base.VisitIdentifierSyntax(pNode));
 }
        private bool IsVariableDefined(string pName, out SmallType pType)
        {
            if (!_locals.IsVariableDefined(pName))
            {
                pType = null;
                return(false);
            }

            pType = _locals.GetVariable(pName).Type;
            return(true);
        }