remove dangling whitespace in source code files

This commit is contained in:
Bryan Bishop 2013-08-03 14:04:13 -05:00
parent fc931b7f27
commit e707c064f8
4 changed files with 13 additions and 13 deletions

View File

@ -912,7 +912,7 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000, include_last_add
def has_outstanding_labels(byte_labels):
"""
Check whether a label is used once in the asm output.
Check whether a label is used once in the asm output.
If so, then that means it has to be called or specified later.
"""

View File

@ -11,11 +11,11 @@ from pointers import (
def remove_quoted_text(line):
"""get rid of content inside quotes
and also removes the quotes from the input string"""
while line.count("\"") % 2 == 0 and line.count("\"") > 0:
while line.count("\"") % 2 == 0 and line.count("\"") > 0:
first = line.find("\"")
second = line.find("\"", first+1)
line = line[0:first] + line[second+1:]
while line.count("\'") % 2 == 0 and line.count("'") > 0:
while line.count("\'") % 2 == 0 and line.count("'") > 0:
first = line.find("\'")
second = line.find("\'", first+1)
line = line[0:first] + line[second+1:]
@ -153,7 +153,7 @@ def line_has_label(line):
return False
if ":" not in line:
return False
if line[0] == ";":
if line[0] == ";":
return False
if line[0] == "\"":
return False

View File

@ -66,8 +66,8 @@ class RomStr(str):
def load_labels(self, filename="labels.json"):
"""
Loads labels from labels.json.
Loads labels from labels.json.
(Or parses the source code file and
generates new labels.)
"""
@ -116,8 +116,8 @@ class RomStr(str):
def get_address_for(self, label):
"""
Return the address of a label.
Return the address of a label.
This is slow and could be improved dramatically.
"""
label = str(label)
@ -158,10 +158,10 @@ class RomStr(str):
def to_asm(self, address, end_address=None, size=None, max_size=0x4000, debug=None):
"""
Disassemble ASM at some address.
This will stop disassembling when either the end_address or size is
met. Also, there's a maximum size that will be parsed, so that large
Disassemble ASM at some address.
This will stop disassembling when either the end_address or size is
met. Also, there's a maximum size that will be parsed, so that large
patches of data aren't parsed as code.
"""
if type(address) in [str, unicode] and "0x" in address:

View File

@ -28,7 +28,7 @@ def skippable(func):
"""
Makes a function skippable.
Saves the state before and after the function runs.
Saves the state before and after the function runs.
Pass "skip=True" to the function to load the previous save
state from when the function finished.
"""