Skip to content

Commit

Permalink
Fixed issues raised by the static-checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
skx committed Aug 24, 2019
1 parent 8a90289 commit 976b25b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (c *Compiler) tokenize() error {

// If error then abort.
if tok.Type == token.ERROR {
return (fmt.Errorf("Error parsing input; token.ERROR returned from the lexer: %s", tok.Literal))
return (fmt.Errorf("error parsing input; token.ERROR returned from the lexer: %s", tok.Literal))
}

//
Expand All @@ -159,7 +159,7 @@ func (c *Compiler) tokenize() error {
// If the program is empty that's an error.
//
if len(c.tokens) < 1 {
return (fmt.Errorf("The input expression was empty"))
return (fmt.Errorf("the input expression was empty"))
}

//
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func main() {
//
// If we're running we're also compiling
//
if *run == true {
if *run {
*compile = true
}

Expand Down Expand Up @@ -63,7 +63,7 @@ func main() {
// If we're not compiling the assembly language text which was
// produced then we just write the program to STDOUT, and terminate.
//
if *compile == false {
if !*compile {
fmt.Printf("%s", out)
return
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func main() {
//
// Running the binary too?
//
if *run == true {
if *run {
exe := exec.Command(*program)
exe.Stdout = os.Stdout
exe.Stderr = os.Stderr
Expand Down

0 comments on commit 976b25b

Please sign in to comment.