diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..1edf977 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.25.1' + + - name: Build + run: go build . diff --git a/Interpreter/interpreter.go b/Interpreter/interpreter.go index cb04dac..123f96b 100644 --- a/Interpreter/interpreter.go +++ b/Interpreter/interpreter.go @@ -7,7 +7,7 @@ import ( "github.com/shubhdevelop/Lox/LoxErrors" "github.com/shubhdevelop/Lox/ast" "github.com/shubhdevelop/Lox/environment" - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type Interpreter struct{} diff --git a/Lox.go b/Lox.go index 9e4e1f0..8cc3d65 100644 --- a/Lox.go +++ b/Lox.go @@ -8,7 +8,7 @@ import ( interpreter "github.com/shubhdevelop/Lox/Interpreter" "github.com/shubhdevelop/Lox/parser" - "github.com/shubhdevelop/Lox/scanner" + "github.com/shubhdevelop/Lox/Scanner" "github.com/shubhdevelop/Lox/state" ) diff --git a/LoxErrors/loxError.go b/LoxErrors/loxError.go index 5358457..d921a33 100644 --- a/LoxErrors/loxError.go +++ b/LoxErrors/loxError.go @@ -5,7 +5,7 @@ import ( "os" "github.com/shubhdevelop/Lox/state" - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type RuntimeError struct { diff --git a/Scanner/scanner.go b/Scanner/scanner.go index 9b378b8..5cc3f72 100644 --- a/Scanner/scanner.go +++ b/Scanner/scanner.go @@ -3,7 +3,7 @@ package scanner import ( "errors" "github.com/shubhdevelop/Lox/LoxErrors" - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" "strconv" ) diff --git a/ast/Expr.go b/ast/Expr.go index d91d047..76b7f0a 100644 --- a/ast/Expr.go +++ b/ast/Expr.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type ExprVisitor interface { diff --git a/ast/stmt.go b/ast/stmt.go index 83bb5a2..b8f47b2 100644 --- a/ast/stmt.go +++ b/ast/stmt.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type StmtVisitor interface { diff --git a/environment/environmnent.go b/environment/environmnent.go index e55fcbb..7adbe68 100644 --- a/environment/environmnent.go +++ b/environment/environmnent.go @@ -3,7 +3,7 @@ package environment import ( "fmt" loxErrors "github.com/shubhdevelop/Lox/LoxErrors" - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type Environment struct { diff --git a/parser/parser.go b/parser/parser.go index 1236fd5..20ee57c 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -5,7 +5,7 @@ import ( "github.com/shubhdevelop/Lox/LoxErrors" "github.com/shubhdevelop/Lox/ast" - "github.com/shubhdevelop/Lox/token" + "github.com/shubhdevelop/Lox/Token" ) type Parser struct { diff --git a/printer/generateAst.go b/printer/generateAst.go index a877841..72d0db0 100644 --- a/printer/generateAst.go +++ b/printer/generateAst.go @@ -113,11 +113,11 @@ func main() { "Literal : interface{} value", "Unary : token.Token operator, Expr right", "Variable : token.Token name", - }, []string{"github.com/shubhdevelop/Lox/token"}) + }, []string{"github.com/shubhdevelop/Lox/Token"}) defineAst(outputDir, "Stmt", []string{ "ExpressionStmt : Expr expression", "PrintStmt : Expr expression", "Var : token.Token name, Expr initializer", - }, []string{"github.com/shubhdevelop/Lox/token"}) + }, []string{"github.com/shubhdevelop/Lox/Token"}) }