private VariableSnapshot GetSnapshotDeclaration(string expression, string operation)
        {
            string variable = expression.Contains(POINTER_ACCESS_MARKER) ?
                              expression.Split(POINTER_ACCESS_MARKER).First() :
                              expression;

            if (_dataStructure.HasGlobalVariable(variable) || (_dataStructure[operation][variable] != null && _dataStructure[operation][variable].LinksToGlobalState))
            {
                string type = _typeService.GetType(expression, operation);

                if (!_typeService.IsPointer(type))
                {
                    int pointerIndex = expression.InvariantLastIndexOf(POINTER_ACCESS_MARKER);
                    if (pointerIndex < 0)
                    {
                        return(null);
                    }

                    expression = expression.Substring(0, pointerIndex);
                    type       = _typeService.GetType(expression, operation);
                }
                var result = new VariableSnapshot(type, GetSnapshotName(expression), expression);
                return(result);
            }

            return(null);
        }