Skip to content

Commit

Permalink
Merge pull request #23 from quephird/refactor_parser
Browse files Browse the repository at this point in the history
Refactor parser
  • Loading branch information
quephird committed Mar 21, 2024
2 parents eaf1917 + ddf644e commit f186e05
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 176 deletions.
3 changes: 0 additions & 3 deletions slox/ParseError.swift
Expand Up @@ -34,7 +34,6 @@ enum ParseError: CustomStringConvertible, Equatable, LocalizedError {
case missingDotAfterSuper(Token)
case expectedSuperclassMethodName(Token)
case missingCloseBracketForSubscriptAccess(Token)
case unsupportedJumpStatement(Token)

var description: String {
switch self {
Expand Down Expand Up @@ -90,8 +89,6 @@ enum ParseError: CustomStringConvertible, Equatable, LocalizedError {
return "[Line \(token.line)] Error: expected superclass method name"
case .missingCloseBracketForSubscriptAccess(let token):
return "[Line \(token.line)] Error: expected closing bracket after subscript index"
case .unsupportedJumpStatement(let token):
return "[Line \(token.line)] Error: unsupported jump statement"
}
}
}

0 comments on commit f186e05

Please sign in to comment.