Fixed import paths
This commit is contained in:
parent
06a99ce232
commit
65c213f1f3
@ -2,7 +2,7 @@ package arfc
|
||||
|
||||
import "os"
|
||||
import "fmt"
|
||||
import "git.tebibyte.media/sashakoshka/arf"
|
||||
import "git.tebibyte.media/arf/arf"
|
||||
|
||||
func main () {
|
||||
if len(os.Args) != 2 {
|
||||
|
2
go.mod
2
go.mod
@ -1,3 +1,3 @@
|
||||
module git.tebibyte.media/sashakoshka/arf
|
||||
module git.tebibyte.media/arf/arf
|
||||
|
||||
go 1.18
|
||||
|
@ -2,7 +2,7 @@ package infoerr
|
||||
|
||||
import "os"
|
||||
import "fmt"
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
|
||||
type ErrorKind int
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package lexer
|
||||
|
||||
import "io"
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// LexingOperation holds information about an ongoing lexing operataion.
|
||||
type LexingOperation struct {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package lexer
|
||||
|
||||
import "testing"
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
func quickToken (width int, kind TokenKind, value any) (token Token) {
|
||||
token.location.SetWidth(width)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package lexer
|
||||
|
||||
import "strconv"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// tokenizeSymbolBeginning lexes a token that starts with a number.
|
||||
func (lexer *LexingOperation) tokenizeNumberBeginning (negative bool) (err error) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package lexer
|
||||
|
||||
import "strconv"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// tokenizeString tokenizes a string or rune literal.
|
||||
func (lexer *LexingOperation) tokenizeString (isRuneLiteral bool) (err error) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package lexer
|
||||
|
||||
import "fmt"
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// TokenKind is an enum represzenting what role a token has.
|
||||
type TokenKind int
|
||||
|
2
main.go
2
main.go
@ -1,7 +1,7 @@
|
||||
package arf
|
||||
|
||||
import "io"
|
||||
import "git.tebibyte.media/sashakoshka/arf/parser"
|
||||
import "git.tebibyte.media/arf/arf/parser"
|
||||
|
||||
func CompileModule (modulePath string, output io.Writer) (err error) {
|
||||
_, err = parser.Parse(modulePath)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
var validArgumentStartTokens = []lexer.TokenKind {
|
||||
lexer.TokenKindName,
|
||||
|
@ -1,7 +1,7 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parse body parses the body of an arf file, after the metadata header.
|
||||
func (parser *ParsingOperation) parseBody () (err error) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseData parses a data section.
|
||||
func (parser *ParsingOperation) parseDataSection () (
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
func (parser *ParsingOperation) parseEnumSection () (
|
||||
section *EnumSection,
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseFaceSection parses an interface section.
|
||||
func (parser *ParsingOperation) parseFaceSection () (
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
// import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
// import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseFunc parses a function section.
|
||||
func (parser *ParsingOperation) parseFuncSection () (
|
||||
|
@ -1,7 +1,7 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseMeta parsese the metadata header at the top of an arf file.
|
||||
func (parser *ParsingOperation) parseMeta () (err error) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseObjtSection parses an object type definition. This allows for structured
|
||||
// types to be defined, and for member variables to be added and overridden.
|
||||
|
@ -3,9 +3,9 @@ package parser
|
||||
import "io"
|
||||
import "os"
|
||||
import "path/filepath"
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// ParsingOperation holds information about an ongoing parsing operation.
|
||||
type ParsingOperation struct {
|
||||
|
@ -3,7 +3,7 @@ package parser
|
||||
import "io"
|
||||
import "strings"
|
||||
import "testing"
|
||||
// import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
// import "git.tebibyte.media/arf/arf/types"
|
||||
|
||||
func checkTree (modulePath string, correct string, test *testing.T) {
|
||||
tree, err := Parse(modulePath)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/file"
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/file"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
|
||||
// SyntaxTree represents an abstract syntax tree. It covers an entire module. It
|
||||
// can be expected to be syntactically correct, but it might not be semantically
|
||||
|
@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/arf/types"
|
||||
import "git.tebibyte.media/sashakoshka/arf/lexer"
|
||||
// import "git.tebibyte.media/sashakoshka/arf/infoerr"
|
||||
import "git.tebibyte.media/arf/arf/types"
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
// import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// parseTypeSection parses a blind type definition, meaning it can inherit from
|
||||
// anything including primitives, but cannot define structure.
|
||||
|
Reference in New Issue
Block a user