Argument kind is now called .kind instead of .what
This commit is contained in:
parent
4dfb327558
commit
9cb2f68581
@ -124,7 +124,7 @@ func (phrase *Phrase) ToString (indent int, breakLine bool) (output string) {
|
|||||||
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
|
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
|
||||||
if !breakLine { indent = 0 }
|
if !breakLine { indent = 0 }
|
||||||
|
|
||||||
switch argument.what {
|
switch argument.kind {
|
||||||
case ArgumentKindPhrase:
|
case ArgumentKindPhrase:
|
||||||
output += doIndent (
|
output += doIndent (
|
||||||
indent,
|
indent,
|
||||||
|
@ -57,9 +57,7 @@ type Type struct {
|
|||||||
type Declaration struct {
|
type Declaration struct {
|
||||||
location file.Location
|
location file.Location
|
||||||
name string
|
name string
|
||||||
|
|
||||||
what Type
|
what Type
|
||||||
value []Argument
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ObjectAttribute represents a notation to initialize object attributes. It
|
// ObjectAttribute represents a notation to initialize object attributes. It
|
||||||
@ -134,7 +132,7 @@ const (
|
|||||||
// allows things like phrases being arguments to other phrases.
|
// allows things like phrases being arguments to other phrases.
|
||||||
type Argument struct {
|
type Argument struct {
|
||||||
location file.Location
|
location file.Location
|
||||||
what ArgumentKind
|
kind ArgumentKind
|
||||||
value any
|
value any
|
||||||
// TODO: if there is an argument expansion operator its existence should
|
// TODO: if there is an argument expansion operator its existence should
|
||||||
// be stored here in a boolean.
|
// be stored here in a boolean.
|
||||||
|
Reference in New Issue
Block a user