function checkForGlobal( node ) {
		var parserOptions = context.parserOptions;
		var ecmaFeatures = parserOptions.ecmaFeatures || {};
		var scope = context.getScope();

		// Node.js environment or modules have a special scope:
		if ( ecmaFeatures.globalReturn || node.sourceType === 'module' ) {
			findVariablesInScope( scope.childScopes[0] );
		} else {
			findVariablesInScope( scope );
		}
	}
Finds variables in the current scope.

@private
@param {ASTNode} node - program node.