<commit_before>-------------------------------------------------------------------------------
--	SF Editor
--	Originally created by Jazzelhawk
--	
--	To do:
--	Find new icons
-------------------------------------------------------------------------------

SF.Editor = {}

local addon_path = nil

do
	local tbl = debug.getinfo( 1 )
	local file = tbl.short_src
	addon_path = string.TrimRight( string.match( file, ".-/.-/" ), "/" )
end

local function addToTable( addTo, addFrom )
	for name, val in pairs( addFrom ) do
		addTo[ addVal and val or name ] = true
	end
end
local function createCodeMap ()

	local map = {}
	map.Environment = {}
	map.Libraries = {}
	map.Types = {}

	for typ, tbl in pairs( SF.Types ) do
		if typ == "Environment" then

			addToTable( map.Environment, tbl.__methods )

		elseif typ:find( "Library: " ) and type( tbl.__methods ) == "table" then

			typ = typ:Replace( "Library: ", "" )
			map.Libraries[ typ ] = {}
			addToTable( map.Libraries[ typ ], tbl.__methods )

		elseif typ ~= "Callback" and type( tbl.__methods ) == "table" then

			map.Types[ typ ] = {}
			addToTable( map.Types[ typ ], tbl.__methods )

		end
	end

	map.Libraries[ "globaltables" ][ "player" ] = true

	for k, v in pairs( map.Libraries ) do
		map.Environment[ k ] = nil
	end

	return map
end

if CLIENT then

	include( "sfderma.lua" )

	-- Colors
	SF.Editor.colors = {}<commit_msg>Resolved globaltables library dependency<commit_after>-------------------------------------------------------------------------------
--	SF Editor
--	Originally created by Jazzelhawk
--	
--	To do:
--	Find new icons
-------------------------------------------------------------------------------

SF.Editor = {}

local addon_path = nil

do
	local tbl = debug.getinfo( 1 )
	local file = tbl.short_src
	addon_path = string.TrimRight( string.match( file, ".-/.-/" ), "/" )
end

local function addToTable( addTo, addFrom )
	for name, val in pairs( addFrom ) do
		addTo[ addVal and val or name ] = true
	end
end
local function createCodeMap ()

	local map = {}
	map.Environment = {}
	map.Libraries = {}
	map.Types = {}

	for typ, tbl in pairs( SF.Types ) do
		if typ == "Environment" then

			addToTable( map.Environment, tbl.__methods )

		elseif typ:find( "Library: " ) and type( tbl.__methods ) == "table" then

			typ = typ:Replace( "Library: ", "" )
			map.Libraries[ typ ] = {}
			addToTable( map.Libraries[ typ ], tbl.__methods )

		elseif typ ~= "Callback" and type( tbl.__methods ) == "table" then

			map.Types[ typ ] = {}
			addToTable( map.Types[ typ ], tbl.__methods )

		end
	end

	if map.Libraries[ "globaltables" ] then
		map.Libraries[ "globaltables" ][ "player" ] = true
	end

	for k, v in pairs( map.Libraries ) do
		map.Environment[ k ] = nil
	end

	return map
end

if CLIENT then

	include( "sfderma.lua" )

	-- Colors
	SF.Editor.colors = {}
{'fraction_non_alphanumeric': 0.2357293868921776, 'fraction_numerical': 0.0007047216349541931, 'mean_word_length': 2.026652452025586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7114168', 'n_tokens_mistral': 976, 'n_tokens_neox': 894, 'n_words': 268}