diff --git a/LEGv8-Simulator/Utils/Interpreter.swift b/LEGv8-Simulator/Utils/Interpreter.swift index 65ee5fe..08c84b8 100644 --- a/LEGv8-Simulator/Utils/Interpreter.swift +++ b/LEGv8-Simulator/Utils/Interpreter.swift @@ -62,6 +62,7 @@ class Interpreter: ObservableObject { } func buildLabelMap(_ text: String) { + labelMap = [:] start(text) while running { diff --git a/LEGv8-Simulator/Utils/Lexer.swift b/LEGv8-Simulator/Utils/Lexer.swift index 346e031..cce232d 100644 --- a/LEGv8-Simulator/Utils/Lexer.swift +++ b/LEGv8-Simulator/Utils/Lexer.swift @@ -40,7 +40,7 @@ class Lexer: ObservableObject { } // instruction is first item in line - let instruction: String = line[0].filter({ char in !specialCharacters.contains(char)}) + let instruction: String = line[0].filter({ char in !specialCharacters.contains(char)}).lowercased() if instruction.contains("/") { // line is only comment cursor += 1 @@ -79,7 +79,7 @@ class Lexer: ObservableObject { var args: [String] = [] for _arg in line[1...].map({ sub in String(sub)}) { - let arg = _arg.filter({ char in !specialCharacters.contains(char)}) // filter out special characters + let arg = _arg.filter({ char in !specialCharacters.contains(char)}).lowercased() // filter out special characters if arg.contains("/") { // comment diff --git a/LEGv8-Simulator/Views/Registers/RegisterRowView.swift b/LEGv8-Simulator/Views/Registers/RegisterRowView.swift index 8818131..d7c8b73 100644 --- a/LEGv8-Simulator/Views/Registers/RegisterRowView.swift +++ b/LEGv8-Simulator/Views/Registers/RegisterRowView.swift @@ -14,12 +14,24 @@ struct RegisterRowView: View { @State private var displayMode: String = "H" @State private var isPresented: Bool = false + @State private var note: String = "" + @State private var noteVisisble: Bool = false var body: some View { HStack { Text(name) .font(.custom("Menlo Regular", size: 12)) + TextField("Note...", text: $note) + .opacity(noteVisisble ? 1 : 0) + .onHover { hovering in + if note == "" { + withAnimation { + noteVisisble = hovering + } + } + } + Spacer() HStack { diff --git a/LEGv8-Simulator/Views/Settings/AboutView.swift b/LEGv8-Simulator/Views/Settings/AboutView.swift index c627b37..bc786c4 100644 --- a/LEGv8-Simulator/Views/Settings/AboutView.swift +++ b/LEGv8-Simulator/Views/Settings/AboutView.swift @@ -8,7 +8,7 @@ import SwiftUI struct AboutView: View { - let version: String = "1.2 (Release)" + let version: String = "1.3 (Release)" var body: some View { HStack {