data-section #3

Merged
sashakoshka merged 42 commits from data-section into main 2022-08-17 18:21:20 +00:00
2 changed files with 3 additions and 5 deletions
Showing only changes of commit 9cb2f68581 - Show all commits

View File

@ -124,7 +124,7 @@ func (phrase *Phrase) ToString (indent int, breakLine bool) (output string) {
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
if !breakLine { indent = 0 }
switch argument.what {
switch argument.kind {
case ArgumentKindPhrase:
output += doIndent (
indent,

View File

@ -57,9 +57,7 @@ type Type struct {
type Declaration struct {
location file.Location
name string
what Type
value []Argument
what Type
}
// ObjectAttribute represents a notation to initialize object attributes. It
@ -134,7 +132,7 @@ const (
// allows things like phrases being arguments to other phrases.
type Argument struct {
location file.Location
what ArgumentKind
kind ArgumentKind
value any
// TODO: if there is an argument expansion operator its existence should
// be stored here in a boolean.