Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -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 .
2 changes: 1 addition & 1 deletion Interpreter/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion Lox.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion LoxErrors/loxError.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/shubhdevelop/Lox/state"
"github.com/shubhdevelop/Lox/token"
"github.com/shubhdevelop/Lox/Token"
)

type RuntimeError struct {
Expand Down
2 changes: 1 addition & 1 deletion Scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package scanner
import (
"errors"
"github.com/shubhdevelop/Lox/LoxErrors"
"github.com/shubhdevelop/Lox/token"
"github.com/shubhdevelop/Lox/Token"
"strconv"
)

Expand Down
2 changes: 1 addition & 1 deletion ast/Expr.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"github.com/shubhdevelop/Lox/token"
"github.com/shubhdevelop/Lox/Token"
)

type ExprVisitor interface {
Expand Down
2 changes: 1 addition & 1 deletion ast/stmt.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"github.com/shubhdevelop/Lox/token"
"github.com/shubhdevelop/Lox/Token"
)

type StmtVisitor interface {
Expand Down
2 changes: 1 addition & 1 deletion environment/environmnent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions printer/generateAst.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
}
Loading