Skip to content

Commit

Permalink
Update instruction identifiers map.
Browse files Browse the repository at this point in the history
  • Loading branch information
aleury committed Jan 22, 2024
1 parent ac0e271 commit 0ca9dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions token/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var registers = map[string]TokenType{
"Y": REGISTER,
}

var opcodes = map[string]TokenType{
var instructions = map[string]TokenType{
"HALT": INSTRUCTION,
"NOOP": INSTRUCTION,
"MOVE": INSTRUCTION,
Expand Down Expand Up @@ -59,7 +59,7 @@ type Token struct {
}

func LookupIdent(ident string) TokenType {
if tokType, ok := opcodes[ident]; ok {
if tokType, ok := instructions[ident]; ok {
return tokType
}
if tokType, ok := registers[ident]; ok {
Expand Down

0 comments on commit 0ca9dc3

Please sign in to comment.