[refactoring] update position builder

This commit is contained in:
Vadym Slizov
2020-12-08 02:08:59 +02:00
parent 8064d940f0
commit f3a605aba1
9 changed files with 2910 additions and 2878 deletions

View File

@@ -1,6 +1,6 @@
PHPFILE=example.php
all: compile fmt build run
all: compile fmt build
fmt:
find . -type f -iregex '.*\.go' -exec gofmt -l -s -w '{}' +
@@ -9,9 +9,6 @@ build:
go generate ./...
go build ./cmd/...
run:
./php-parser -d go $(PHPFILE)
test:
go test ./...
@@ -22,7 +19,7 @@ bench:
go test -benchmem -bench=. ./internal/php5
go test -benchmem -bench=. ./internal/php7
compile: ./internal/php5/php5.go ./internal/php7/php7.go ./internal/scanner/scanner.go fmt
compile: ./internal/php5/php5.go ./internal/php7/php7.go ./internal/scanner/scanner.go
sed -i '' -e 's/yyErrorVerbose = false/yyErrorVerbose = true/g' ./internal/php7/php7.go
sed -i '' -e 's/yyErrorVerbose = false/yyErrorVerbose = true/g' ./internal/php5/php5.go
sed -i '' -e 's/\/\/line/\/\/ line/g' ./internal/php5/php5.go