Subversion Repositories Kolibri OS

Rev

Rev 8967 | Rev 8974 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8967 Rev 8973
Line 4... Line 4...
4
import sys
4
import sys
Line 5... Line 5...
5
 
5
 
6
""" TODO:
6
""" TODO:
7
    - Optimize name and var_type checking
7
    - Optimize name and var_type checking
8
    - Translate dict in AsmReaderReadingComments into just a set of fields
-
 
9
    - Remove get_comment method from AsmReaderReadingComments
8
    - Translate dict in AsmReaderReadingComments into just a set of fields
10
    - Check if we should return handled_files from handle_file
9
    - Check if we should return handled_files from handle_file
Line 11... Line 10...
11
"""
10
"""
12
 
11
 
Line 1313... Line 1312...
1313
		# Reset the line status (now it's the status of the new line)
1312
		# Reset the line status (now it's the status of the new line)
1314
		self.status_reset()
1313
		self.status_reset()
1315
		# Set new status for this line according to the first character in the line
1314
		# Set new status for this line according to the first character in the line
1316
		self.update_status()
1315
		self.update_status()
Line 1317... Line -...
1317
 
-
 
1318
	def get_comment(self):
-
 
1319
		return self.comment
-
 
1320
 
1316
 
1321
class AsmReaderFetchingIdentifiers(AsmReaderReadingComments):
1317
class AsmReaderFetchingIdentifiers(AsmReaderReadingComments):
1322
	def __init__(self, file):
1318
	def __init__(self, file):
Line 1323... Line 1319...
1323
		super().__init__(file)
1319
		super().__init__(file)
Line 1771... Line 1767...
1771
			identifier = ''
1767
			identifier = ''
1772
		args.append((arg_name, arg_type))
1768
		args.append((arg_name, arg_type))
1773
	# Get to the end of the line and get a comment from the reader
1769
	# Get to the end of the line and get a comment from the reader
1774
	while r.curr() != '':
1770
	while r.curr() != '':
1775
		r.step()
1771
		r.step()
1776
	comment = r.get_comment()
1772
	comment = r.comment
1777
	# Build the element
1773
	# Build the element
1778
	return AsmFunction(r.location(), name, comment, calling_convention, args, used_regs)
1774
	return AsmFunction(r.location(), name, comment, calling_convention, args, used_regs)
Line 1779... Line 1775...
1779
 
1775
 
1780
def get_declarations(asm_file_contents, asm_file_name):
1776
def get_declarations(asm_file_contents, asm_file_name):