This commit is contained in:
Marvin Blum
2015-12-15 23:19:41 +01:00
parent f1f564d89b
commit 69e684a230
6 changed files with 227 additions and 226 deletions

View File

@@ -1,13 +1,13 @@
package main package main
import ( import (
"parser"
"tokenizer"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"path/filepath"
"os" "os"
"parser"
"path/filepath"
"strings" "strings"
"tokenizer"
) )
const ( const (
@@ -125,7 +125,8 @@ func main() {
} }
var i int var i int
for i = 1; i < len(args) && flags(args[i]); i++ {} for i = 1; i < len(args) && flags(args[i]); i++ {
}
if exit { if exit {
return return

View File

@@ -1,10 +1,10 @@
package parser_test package parser_test
import ( import (
"tokenizer"
"parser"
"io/ioutil" "io/ioutil"
"parser"
"testing" "testing"
"tokenizer"
) )
func TestParserDeclaration(t *testing.T) { func TestParserDeclaration(t *testing.T) {

View File

@@ -60,7 +60,7 @@ var new_line = []byte{'\r', '\n'}
// which can be parsed later. // which can be parsed later.
func Tokenize(code []byte, doStripSlashes bool) []Token { func Tokenize(code []byte, doStripSlashes bool) []Token {
if doStripSlashes { if doStripSlashes {
code = stripSlashes(code); code = stripSlashes(code)
} }
code = removeComments(code) code = removeComments(code)

View File

@@ -1,9 +1,9 @@
package tokenizer_test package tokenizer_test
import ( import (
"tokenizer"
"io/ioutil" "io/ioutil"
"testing" "testing"
"tokenizer"
) )
func TestTokenizerVar(t *testing.T) { func TestTokenizerVar(t *testing.T) {