Skip to content

Commit

Permalink
Whoops... forgot to remove some TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
quephird committed Mar 15, 2024
1 parent 39465ee commit b436274
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
19 changes: 0 additions & 19 deletions slox/Interpreter.swift
Expand Up @@ -509,23 +509,4 @@ class Interpreter {
list[Int(index)] = value
return value
}

// // TODO: May need to move these next two functions to the LoxValue enum
// // Utility functions below
// private func isEqual(leftValue: LoxValue, rightValue: LoxValue) -> Bool {
// switch (leftValue, rightValue) {
// case (.nil, .nil):
// return true
// case (.number(let leftNumber), .number(let rightNumber)):
// return leftNumber == rightNumber
// case (.string(let leftString), .string(let rightString)):
// return leftString == rightString
// case (.boolean(let leftBoolean), .boolean(let rightBoolean)):
// return leftBoolean == rightBoolean
// case (.instance(let leftList as LoxList), .instance(let rightList as LoxList)):
// return leftList == rightList
// default:
// return false
// }
// }
}
2 changes: 0 additions & 2 deletions slox/Lox.swift
Expand Up @@ -38,7 +38,6 @@ struct Lox {
}
}

// TODO: Need to move pipeline of instantiation and invocations to centralized function
private static func runRepl() {
print("slox>", terminator: " ")
while let input = readLine() {
Expand All @@ -54,7 +53,6 @@ struct Lox {
}
}

// TODO: Need to move pipeline of instantiations and invocations to centralized function
private static func run(input: String) throws {
try interpreter.interpret(source: input)
}
Expand Down

0 comments on commit b436274

Please sign in to comment.