pass-test-tokenize-all #1
@ -78,7 +78,7 @@ func (token Token) Value () (value any) {
|
|||||||
|
|
||||||
// Equals returns whether this token is equal to another token
|
// Equals returns whether this token is equal to another token
|
||||||
func (token Token) Equals (testToken Token) (match bool) {
|
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.
|
// Location returns the location of the token in its file.
|
||||||
|
@ -15,8 +15,8 @@ type Permission struct {
|
|||||||
|
|
||||||
func ModeFrom (char rune) (mode Mode) {
|
func ModeFrom (char rune) (mode Mode) {
|
||||||
switch (char) {
|
switch (char) {
|
||||||
case 'r': mode = ModeNone
|
case 'n': mode = ModeNone
|
||||||
case 'n': mode = ModeRead
|
case 'r': mode = ModeRead
|
||||||
case 'w': mode = ModeWrite
|
case 'w': mode = ModeWrite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user