wip
This commit is contained in:
parent
8b4fee50ab
commit
82093865b0
@ -1,3 +1,15 @@
|
||||
package analyzer
|
||||
|
||||
// TODO
|
||||
// FuncSection represents a type definition section.
|
||||
type FuncSection struct {
|
||||
sectionBase
|
||||
|
||||
|
||||
}
|
||||
|
||||
func (analyzer *analysisOperation) analyzeFuncSection () (
|
||||
section Section,
|
||||
err error,
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ funcSection ro ../tests/analyzer/funcSection.bArbitrary
|
||||
block
|
||||
arbitraryPhrase
|
||||
command 'puts'
|
||||
cast
|
||||
castPhrase
|
||||
type aCString
|
||||
arg string 'hellorld` + "\000" + `'
|
||||
`, test)
|
||||
|
@ -70,3 +70,9 @@ func (section sectionBase) locator () (where locator) {
|
||||
where = section.where
|
||||
return
|
||||
}
|
||||
|
||||
// phraseBase is a struct that all phrases must embed.
|
||||
type phraseBase struct {
|
||||
locatable
|
||||
returnsTo []Argument
|
||||
}
|
||||
|
30
analyzer/phrase.go
Normal file
30
analyzer/phrase.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user