<commit_before>---
-- xcode/xcode4_workspace.lua
-- Generate an Xcode workspace.
-- Author <NAME>
-- Modified by <NAME>
-- Copyright (c) 2014-2015 <NAME> and the Premake project
---

	local p = premake
	local m = p.modules.xcode



---
-- Generate an Xcode contents.xcworkspacedata file.
---

	m.elements.workspace = function(sln)
		return {
			m.xmlDeclaration,
			m.workspace,
			m.workspaceFileRefs,
			m.workspaceTail,
		}
	end

	function m.generateWorkspace(sln)
		m.preparesolution(sln)
		p.callArray(m.elements.workspace, sln)
	end


	function m.workspace()
		p.push('<Workspace')
		p.w('version = "1.0">')
	end


	function m.workspaceTail()
		-- Don't output final newline.  Xcode doesn't.
		premake.out('</Workspace>')
	end


---
-- Generate the list of project references.
---

	m.elements.workspaceFileRef = function(prj)
		return {
			m.workspaceLocation,
		}
	end

	function m.workspaceFileRefs(sln)
		for prj in p.solution.eachproject(sln) do
			p.push('<FileRef')
			local contents = p.capture(function()
				p.callArray(m.elements.workspaceFileRef, prj)
			end)
			p.out(contents .. ">")
			p.pop('</FileRef>')
		end
	end



---------------------------------------------------------------------------
--
-- Handlers for individual project elements
--
---------------------------------------------------------------------------


	function m.workspaceLocation(prj)
		local fname = p.filename(prj, ".xcodeproj")
		fname = path.getrelative(prj.solution.location, fname)<commit_msg>Fix EOL for workspace unit tests<commit_after>---
-- xcode/xcode4_workspace.lua
-- Generate an Xcode workspace.
-- Author <NAME>
-- Modified by <NAME>
-- Copyright (c) 2014-2015 <NAME> and the Premake project
---

	local p = premake
	local m = p.modules.xcode



---
-- Generate an Xcode contents.xcworkspacedata file.
---

	m.elements.workspace = function(sln)
		return {
			m.xmlDeclaration,
			m.workspace,
			m.workspaceFileRefs,
			m.workspaceTail,
		}
	end

	function m.generateWorkspace(sln)
		m.preparesolution(sln)
		p.callArray(m.elements.workspace, sln)
	end


	function m.workspace()
		p.push('<Workspace')
		p.w('version = "1.0">')
	end


	function m.workspaceTail()
		-- Don't output final newline.  Xcode doesn't.
		premake.out('</Workspace>')
	end


---
-- Generate the list of project references.
---

	m.elements.workspaceFileRef = function(prj)
		return {
			m.workspaceLocation,
		}
	end

	function m.workspaceFileRefs(sln)
		for prj in p.solution.eachproject(sln) do
			p.push('<FileRef')
			local contents = p.capture(function()
				p.callArray(m.elements.workspaceFileRef, prj)
			end)
			p.outln(contents .. ">")
			p.pop('</FileRef>')
		end
	end



---------------------------------------------------------------------------
--
-- Handlers for individual project elements
--
---------------------------------------------------------------------------


	function m.workspaceLocation(prj)
		local fname = p.filename(prj, ".xcodeproj")
		fname = path.getrelative(prj.solution.location, fname)
{'fraction_non_alphanumeric': 0.22665337321369225, 'fraction_numerical': 0.007311399135925557, 'mean_word_length': 2.168421052631579, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '396439', 'n_tokens_mistral': 1120, 'n_tokens_neox': 990, 'n_words': 210}