Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ jobs:
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Go module to proxy.golang.org and pkg.go.dev
if: startsWith(github.ref_name, 'v') && !contains(github.ref_name, '-')
timeout-minutes: 5
run: |
GOPROXY=https://proxy.golang.org go list -m "github.com/timoschenko/dmltools@${GITHUB_REF_NAME}"
curl -fsSL --retry 3 --retry-delay 5 --retry-all-errors -X POST \
"https://pkg.go.dev/fetch/github.com/timoschenko/dmltools@${GITHUB_REF_NAME}"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package.json

# go generate {{{
grammar/dml/dml_*.go
pkg/dmlex/tokentype_string.go
# }}}

build/
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ DMLEX_GENERATED_FILES+=./pkg/dmlex/dml_base_listener.go
DMLEX_GENERATED_FILES+=./pkg/dmlex/dml_lexer.go
DMLEX_GENERATED_FILES+=./pkg/dmlex/dml_listener.go
DMLEX_GENERATED_FILES+=./pkg/dmlex/dml_parser_dml_parser.go
DMLEX_GENERATED_FILES+=./pkg/dmlex/tokentype_string.go

G4_FORMAT_FLAG:=$(BUILD_ENV_DIR)/g4-format.flag
$(G4_FORMAT_FLAG): $(BUILD_ENV_DIR) $(ANTLR_FORMAT_JAR) $(G4_DML) $(WS_FIXER)
Expand Down Expand Up @@ -125,6 +126,9 @@ $(GO_GENERATED_FLAG): $(BUILD_ENV_DIR)
endif
$(GO_GENERATED_FLAG):
$(GO) generate ./pkg/dmlex/...
ifneq ($(filter-out 0 false FALSE no NO,$(CI)),)
@$(CHECK_GENERATED_CLEAN)
endif
$(file > $@,)

ifeq ($(filter-out 0 false FALSE no NO,$(SKIP_ANTLR)),)
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# dmltools

[![CI](https://github.com/timoschenko/dmltools/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/timoschenko/dmltools/actions/workflows/pre-commit.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/timoschenko/dmltools.svg)](https://pkg.go.dev/github.com/timoschenko/dmltools)
[![Go Version](https://img.shields.io/github/go-mod/go-version/timoschenko/dmltools?logo=go)](go.mod)
[![Go Reference](https://pkg.go.dev/badge/github.com/timoschenko/dmltools.svg)](https://pkg.go.dev/github.com/timoschenko/dmltools)
[![Release](https://img.shields.io/github/v/release/timoschenko/dmltools)](https://github.com/timoschenko/dmltools/releases)
[![Supported DML Versions](https://img.shields.io/badge/dml-1.4-blue)](https://github.com/timoschenko/dmltools/releases)
[![CI](https://github.com/timoschenko/dmltools/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/timoschenko/dmltools/actions/workflows/pre-commit.yml)
[![License: GPL-2.0](https://img.shields.io/badge/License-GPL_2.0-blue.svg)](LICENSE)

Tooling and utilities for Device Modeling Language (DML 1.4 & 1.2), including `dmlfmt` (an opinionated deterministic code formatter) and `dmlast` (an AST dumper).
Tooling and utilities for Device Modeling Language (DML 1.4),
including `dmlfmt` (an opinionated deterministic code formatter).

## Installation

Expand All @@ -24,7 +26,9 @@ go install github.com/timoschenko/dmltools/cmd/dmlast@latest

### Prebuilt Binaries

Precompiled binaries for Linux (`amd64`, `arm64`) and Windows (`amd64`) are available on the [GitHub Releases](https://github.com/timoschenko/dmltools/releases) page.
Precompiled binaries for Linux (`amd64`, `arm64`) and Windows (`amd64`)
are available on the
[GitHub Releases](https://github.com/timoschenko/dmltools/releases) page.

## Building from Sources

Expand Down
212 changes: 212 additions & 0 deletions pkg/dmlex/tokentype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading