Skip to content

Commit 6f4808e

Browse files
authored
Merge pull request #2 from shubhdevelop/chore-build-mac-exe
chore: Add Build workflow
2 parents 4f1f0d3 + 95c3108 commit 6f4808e

10 files changed

Lines changed: 35 additions & 10 deletions

File tree

.github/workflows/go.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow will build a golang project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+
name: Go
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v4
21+
with:
22+
go-version: '1.25.1'
23+
24+
- name: Build
25+
run: go build .

Interpreter/interpreter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/shubhdevelop/Lox/LoxErrors"
88
"github.com/shubhdevelop/Lox/ast"
99
"github.com/shubhdevelop/Lox/environment"
10-
"github.com/shubhdevelop/Lox/token"
10+
"github.com/shubhdevelop/Lox/Token"
1111
)
1212

1313
type Interpreter struct{}

Lox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
interpreter "github.com/shubhdevelop/Lox/Interpreter"
1010
"github.com/shubhdevelop/Lox/parser"
11-
"github.com/shubhdevelop/Lox/scanner"
11+
"github.com/shubhdevelop/Lox/Scanner"
1212
"github.com/shubhdevelop/Lox/state"
1313
)
1414

LoxErrors/loxError.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66

77
"github.com/shubhdevelop/Lox/state"
8-
"github.com/shubhdevelop/Lox/token"
8+
"github.com/shubhdevelop/Lox/Token"
99
)
1010

1111
type RuntimeError struct {

Scanner/scanner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package scanner
33
import (
44
"errors"
55
"github.com/shubhdevelop/Lox/LoxErrors"
6-
"github.com/shubhdevelop/Lox/token"
6+
"github.com/shubhdevelop/Lox/Token"
77
"strconv"
88
)
99

ast/Expr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ast
22

33
import (
4-
"github.com/shubhdevelop/Lox/token"
4+
"github.com/shubhdevelop/Lox/Token"
55
)
66

77
type ExprVisitor interface {

ast/stmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ast
22

33
import (
4-
"github.com/shubhdevelop/Lox/token"
4+
"github.com/shubhdevelop/Lox/Token"
55
)
66

77
type StmtVisitor interface {

environment/environmnent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package environment
33
import (
44
"fmt"
55
loxErrors "github.com/shubhdevelop/Lox/LoxErrors"
6-
"github.com/shubhdevelop/Lox/token"
6+
"github.com/shubhdevelop/Lox/Token"
77
)
88

99
type Environment struct {

parser/parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/shubhdevelop/Lox/LoxErrors"
77
"github.com/shubhdevelop/Lox/ast"
8-
"github.com/shubhdevelop/Lox/token"
8+
"github.com/shubhdevelop/Lox/Token"
99
)
1010

1111
type Parser struct {

printer/generateAst.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ func main() {
113113
"Literal : interface{} value",
114114
"Unary : token.Token operator, Expr right",
115115
"Variable : token.Token name",
116-
}, []string{"github.com/shubhdevelop/Lox/token"})
116+
}, []string{"github.com/shubhdevelop/Lox/Token"})
117117

118118
defineAst(outputDir, "Stmt", []string{
119119
"ExpressionStmt : Expr expression",
120120
"PrintStmt : Expr expression",
121121
"Var : token.Token name, Expr initializer",
122-
}, []string{"github.com/shubhdevelop/Lox/token"})
122+
}, []string{"github.com/shubhdevelop/Lox/Token"})
123123
}

0 commit comments

Comments
 (0)