This commit is contained in:
Sasha Koshka 2022-10-19 13:27:48 -04:00
parent 8b4fee50ab
commit 82093865b0
4 changed files with 50 additions and 2 deletions

View File

@ -1,3 +1,15 @@
package analyzer package analyzer
// TODO // FuncSection represents a type definition section.
type FuncSection struct {
sectionBase
}
func (analyzer *analysisOperation) analyzeFuncSection () (
section Section,
err error,
) {
return
}

View File

@ -13,7 +13,7 @@ funcSection ro ../tests/analyzer/funcSection.bArbitrary
block block
arbitraryPhrase arbitraryPhrase
command 'puts' command 'puts'
cast castPhrase
type aCString type aCString
arg string 'hellorld` + "\000" + `' arg string 'hellorld` + "\000" + `'
`, test) `, test)

View File

@ -70,3 +70,9 @@ func (section sectionBase) locator () (where locator) {
where = section.where where = section.where
return return
} }
// phraseBase is a struct that all phrases must embed.
type phraseBase struct {
locatable
returnsTo []Argument
}

30
analyzer/phrase.go Normal file
View File

@ -0,0 +1,30 @@
package analyzer
import "git.tebibyte.media/arf/arf/parser"
type Phrase interface {
}
type ArbitraryPhrase struct {
phraseBase
command string
arguments []Argument
}
type CastPhrase struct {
phraseBase
command Argument
arguments []Argument
}
// TODO more phrases lol
func (analyzer *analysisOperation) analyzePhrase (
inputPhrase parser.Phrase,
) (
phrase Phrase,
err error,
) {
return
}