diff --git a/lexer/token.go b/lexer/token.go index 0ac8298..3ab98a8 100644 --- a/lexer/token.go +++ b/lexer/token.go @@ -78,7 +78,7 @@ func (token Token) Value () (value any) { // Equals returns whether this token is equal to another token func (token Token) Equals (testToken Token) (match bool) { - return token == testToken + return token.value == testToken.value } // Location returns the location of the token in its file. diff --git a/types/permission.go b/types/permission.go index 22b42f0..4421058 100644 --- a/types/permission.go +++ b/types/permission.go @@ -15,8 +15,8 @@ type Permission struct { func ModeFrom (char rune) (mode Mode) { switch (char) { - case 'r': mode = ModeNone - case 'n': mode = ModeRead + case 'n': mode = ModeNone + case 'r': mode = ModeRead case 'w': mode = ModeWrite }