Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate installation and development commands #152

Merged
merged 1 commit into from
Nov 30, 2024
Merged
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
50 changes: 20 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,10 @@ A [Parsing Expression Grammar](https://en.wikipedia.org/wiki/Parsing_expression_
* https://bford.info/packrat/
* https://piumarta.com/software/peg/

## Installing
## Installation

```
go get -u github.com/pointlander/peg
```

## Building

### Using Pre-Generated Files

```
go install
```

### Generating Files Yourself
You should only need to do this if you are contributing to the library, or if something gets messed up.

```
go run build.go
```
or
```
go generate
```

With tests:

```
go run build.go test
go install github.com/pointlander/peg@latest
```

## Usage
Expand All @@ -64,7 +39,6 @@ Usage of peg:
print out the syntax tree
-version
print the version and exit

```


Expand Down Expand Up @@ -239,13 +213,29 @@ Testing a grammar usually requires more than the average unit testing with multi
go install mvdan.cc/gofumpt@latest
```

### Lint code
### Build

```
go run build.go
```
or
```
go generate
```

### Test

```
go run build.go test
```

### Lint

```
golangci-lint run
```

### Format code
### Format

```
gofumpt -l -w .
Expand Down