Skip to content

Commit

Permalink
fixes 'n features
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Apr 22, 2023
1 parent b17396c commit f690599
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions LEGv8-Simulator/Utils/Interpreter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Interpreter: ObservableObject {
}

func buildLabelMap(_ text: String) {
labelMap = [:]
start(text)

while running {
Expand Down
4 changes: 2 additions & 2 deletions LEGv8-Simulator/Utils/Lexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions LEGv8-Simulator/Views/Registers/RegisterRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion LEGv8-Simulator/Views/Settings/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f690599

Please sign in to comment.