merge token package into scanner package

This commit is contained in:
z7zmey
2018-04-15 14:47:40 +03:00
parent 983c721e83
commit e65ace8984
14 changed files with 56 additions and 62 deletions

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/token"
"github.com/z7zmey/php-parser/scanner"
)
// Error parsing error
@@ -14,7 +14,7 @@ type Error struct {
}
// NewError creates and returns new Error
func NewError(msg string, t token.Token) *Error {
func NewError(msg string, t scanner.Token) *Error {
return &Error{
Msg: msg,
Pos: position.Position{

View File

@@ -7,7 +7,7 @@ import (
"github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/errors"
"github.com/z7zmey/php-parser/token"
"github.com/z7zmey/php-parser/scanner"
"github.com/kylelemons/godebug/pretty"
)
@@ -26,7 +26,7 @@ func assertEqual(t *testing.T, expected interface{}, actual interface{}) {
}
func TestConstructor(t *testing.T) {
token := token.Token{
token := scanner.Token{
Value: "test",
StartLine: 1,
EndLine: 2,
@@ -50,7 +50,7 @@ func TestConstructor(t *testing.T) {
}
func TestPrint(t *testing.T) {
token := token.Token{
token := scanner.Token{
Value: "test",
StartLine: 1,
EndLine: 2,