This commit is contained in:
simon 2018-01-07 13:02:49 -05:00
parent cde03af8af
commit cfb02869bb

View File

@ -54,7 +54,7 @@ public class Assembler {
*/ */
private static String removeLabel(String line) { private static String removeLabel(String line) {
return line.replaceAll("\\b\\w*\\b:", ""); return line.replaceAll("^\\s*\\b\\w*\\b:", "");
} }
@ -97,7 +97,7 @@ public class Assembler {
line = removeComment(line); line = removeComment(line);
//Check for labels //Check for labels
Pattern pattern = Pattern.compile("\\b\\w*\\b:"); Pattern pattern = Pattern.compile("^\\s*\\b\\w*\\b:");
Matcher matcher = pattern.matcher(line); Matcher matcher = pattern.matcher(line);
if (matcher.find()) { if (matcher.find()) {