Add command accessor

This commit is contained in:
Sasha Koshka 2022-10-25 00:20:02 -04:00
parent e067483942
commit e85e61d70c
2 changed files with 6 additions and 2 deletions

View File

@ -191,6 +191,12 @@ func (section DataSection) External () (external bool) {
return
}
// Command returns the phrase's command.
func (phrase Phrase) Command () (command Argument) {
command = phrase.command
return
}
// Kind returns what kind of phrase it is.
func (phrase Phrase) Kind () (kind PhraseKind) {
kind = phrase.kind

View File

@ -283,8 +283,6 @@ type Phrase struct {
kind PhraseKind
// TODO: do not have this be an argument. make a string version, and
// and identifier version.
command Argument
// only applicable for PhraseKindOperator