 formatters.set 'undeclared-label', ({ token, labels }) ->
 	list = findSimilar labels, token.value
 	help = if list.length > 0
-		"similarly named labels: #{list.join ', '}"
+		"similarly named labels: #{formatList list}"
 	else
 		"no similarly named labels found"
 


formatParameters = (instruction) ->
	{ expectedParts } = instructionTypes.get instruction
	expectedParts.join ','


makePartTypeFormatter = (type) ->

	matches.slice 0, 3


formatList = (list) ->
	if list.length == 1
		list[0]
	else
		[init..., last] = list
		"#{init.join ', '} and #{last}"


formatters.set 'bad-instruction', ({ token }) ->
	list = findSimilar instructionTypes, token.value
	help = if list.length > 0
		"similarly named instructions: #{formatList list}"
	else
		"no similarly named instructions found"

