Added some basic structs and interfaces for phrase parsing
This commit is contained in:
parent
82093865b0
commit
5520994072
5
analyzer/block.go
Normal file
5
analyzer/block.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package analyzer
|
||||||
|
|
||||||
|
type Block struct {
|
||||||
|
locatable
|
||||||
|
}
|
@ -1,9 +1,16 @@
|
|||||||
package analyzer
|
package analyzer
|
||||||
|
|
||||||
|
import "git.tebibyte.media/arf/arf/file"
|
||||||
import "git.tebibyte.media/arf/arf/parser"
|
import "git.tebibyte.media/arf/arf/parser"
|
||||||
|
import "git.tebibyte.media/arf/arf/infoerr"
|
||||||
|
|
||||||
type Phrase interface {
|
type Phrase interface {
|
||||||
|
// Provided by phraseBase
|
||||||
|
Location () (location file.Location)
|
||||||
|
NewError (message string, kind infoerr.ErrorKind) (err error)
|
||||||
|
|
||||||
|
// Must be implemented by each individual phrase
|
||||||
|
ToString (indent int) (output string)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ArbitraryPhrase struct {
|
type ArbitraryPhrase struct {
|
||||||
|
Reference in New Issue
Block a user