From 552099407229527e88f4ff67b0ec0e1d736e6af0 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 19 Oct 2022 22:46:20 -0400 Subject: [PATCH] Added some basic structs and interfaces for phrase parsing --- analyzer/block.go | 5 +++++ analyzer/phrase.go | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 analyzer/block.go diff --git a/analyzer/block.go b/analyzer/block.go new file mode 100644 index 0000000..dc76ed0 --- /dev/null +++ b/analyzer/block.go @@ -0,0 +1,5 @@ +package analyzer + +type Block struct { + locatable +} diff --git a/analyzer/phrase.go b/analyzer/phrase.go index 7f544ee..1f72db9 100644 --- a/analyzer/phrase.go +++ b/analyzer/phrase.go @@ -1,9 +1,16 @@ package analyzer +import "git.tebibyte.media/arf/arf/file" import "git.tebibyte.media/arf/arf/parser" +import "git.tebibyte.media/arf/arf/infoerr" 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 {