Add command accessor
This commit is contained in:
parent
e067483942
commit
e85e61d70c
@ -191,6 +191,12 @@ func (section DataSection) External () (external bool) {
|
|||||||
return
|
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.
|
// Kind returns what kind of phrase it is.
|
||||||
func (phrase Phrase) Kind () (kind PhraseKind) {
|
func (phrase Phrase) Kind () (kind PhraseKind) {
|
||||||
kind = phrase.kind
|
kind = phrase.kind
|
||||||
|
@ -283,8 +283,6 @@ type Phrase struct {
|
|||||||
|
|
||||||
kind PhraseKind
|
kind PhraseKind
|
||||||
|
|
||||||
// TODO: do not have this be an argument. make a string version, and
|
|
||||||
// and identifier version.
|
|
||||||
command Argument
|
command Argument
|
||||||
|
|
||||||
// only applicable for PhraseKindOperator
|
// only applicable for PhraseKindOperator
|
||||||
|
Reference in New Issue
Block a user