~repos /plum
git clone https://pyrossh.dev/repos/plum.git
A statically typed, imperative programming language inspired by rust, python
9fa731ac
—
pyrossh 11 months ago
cleanup
- tooling/tree-sitter-plum/.editorconfig +0 -39
- tooling/tree-sitter-plum/.github/workflows/ci.yml +0 -32
- tooling/tree-sitter-plum/.github/workflows/fuzz.yml +0 -22
- tooling/tree-sitter-plum/.github/workflows/lint.yml +0 -19
- tooling/tree-sitter-plum/.github/workflows/release.yml +0 -103
- tooling/tree-sitter-plum/.npmignore +0 -6
- tooling/tree-sitter-plum/Cargo.toml +0 -29
- tooling/tree-sitter-plum/Makefile +0 -112
- tooling/tree-sitter-plum/Package.swift +0 -48
- tooling/tree-sitter-plum/binding.gyp +0 -21
- tooling/tree-sitter-plum/package.json +0 -88
- tooling/tree-sitter-plum/plum.dylib +0 -0
- tooling/tree-sitter-plum/pyproject.toml +0 -29
- tooling/tree-sitter-plum/readme.md +0 -9
- tooling/tree-sitter-plum/setup.py +0 -62
- tooling/tree-sitter-plum/{aa.plum → test/aa.plum} +0 -0
- tooling/tree-sitter-plum/tree-sitter-plum.pc +0 -11
tooling/tree-sitter-plum/.editorconfig
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
charset = utf-8
|
|
5
|
-
end_of_line = lf
|
|
6
|
-
insert_final_newline = true
|
|
7
|
-
trim_trailing_whitespace = true
|
|
8
|
-
|
|
9
|
-
[*.{json,toml,yml,gyp}]
|
|
10
|
-
indent_style = space
|
|
11
|
-
indent_size = 2
|
|
12
|
-
|
|
13
|
-
[*.js]
|
|
14
|
-
indent_style = space
|
|
15
|
-
indent_size = 2
|
|
16
|
-
|
|
17
|
-
[*.rs]
|
|
18
|
-
indent_style = space
|
|
19
|
-
indent_size = 4
|
|
20
|
-
|
|
21
|
-
[*.{c,cc,h}]
|
|
22
|
-
indent_style = space
|
|
23
|
-
indent_size = 4
|
|
24
|
-
|
|
25
|
-
[*.{py,pyi}]
|
|
26
|
-
indent_style = space
|
|
27
|
-
indent_size = 4
|
|
28
|
-
|
|
29
|
-
[*.swift]
|
|
30
|
-
indent_style = space
|
|
31
|
-
indent_size = 4
|
|
32
|
-
|
|
33
|
-
[*.go]
|
|
34
|
-
indent_style = tab
|
|
35
|
-
indent_size = 8
|
|
36
|
-
|
|
37
|
-
[Makefile]
|
|
38
|
-
indent_style = tab
|
|
39
|
-
indent_size = 8
|
tooling/tree-sitter-plum/.github/workflows/ci.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- "**"
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- "master"
|
|
10
|
-
jobs:
|
|
11
|
-
test:
|
|
12
|
-
runs-on: ${{ matrix.os }}
|
|
13
|
-
strategy:
|
|
14
|
-
fail-fast: true
|
|
15
|
-
matrix:
|
|
16
|
-
os: [macos-latest, ubuntu-latest]
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: actions/setup-node@v4
|
|
20
|
-
with:
|
|
21
|
-
node-version: 18
|
|
22
|
-
- run: npm install
|
|
23
|
-
- run: npm test
|
|
24
|
-
test_windows:
|
|
25
|
-
runs-on: windows-latest
|
|
26
|
-
steps:
|
|
27
|
-
- uses: actions/checkout@v4
|
|
28
|
-
- uses: actions/setup-node@v4
|
|
29
|
-
with:
|
|
30
|
-
node-version: 18
|
|
31
|
-
- run: npm install
|
|
32
|
-
- run: npm run-script test-windows
|
tooling/tree-sitter-plum/.github/workflows/fuzz.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: Fuzz Parser
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
paths:
|
|
6
|
-
- src/scanner.c
|
|
7
|
-
pull_request:
|
|
8
|
-
paths:
|
|
9
|
-
- src/scanner.c
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
test:
|
|
14
|
-
name: Parser fuzzing
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
- uses: vigoux/tree-sitter-fuzz-action@v1
|
|
19
|
-
with:
|
|
20
|
-
language: plum
|
|
21
|
-
external-scanner: src/scanner.c
|
|
22
|
-
time: 60
|
tooling/tree-sitter-plum/.github/workflows/lint.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Lint
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- "**"
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
lint:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- name: Install modules
|
|
17
|
-
run: npm install
|
|
18
|
-
- name: Run ESLint
|
|
19
|
-
run: npm run lint
|
tooling/tree-sitter-plum/.github/workflows/release.yml
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_run:
|
|
5
|
-
workflows: ["CI"]
|
|
6
|
-
branches:
|
|
7
|
-
- master
|
|
8
|
-
types:
|
|
9
|
-
- completed
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout code
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
with:
|
|
18
|
-
fetch-depth: 0
|
|
19
|
-
|
|
20
|
-
- name: Get previous commit SHA
|
|
21
|
-
id: get_previous_commit
|
|
22
|
-
run: |
|
|
23
|
-
LATEST_TAG=$(git describe --tags --abbrev=0)
|
|
24
|
-
if [[ -z "$LATEST_TAG" ]]; then
|
|
25
|
-
echo "No tag found. Failing..."
|
|
26
|
-
exit 1
|
|
27
|
-
fi
|
|
28
|
-
echo "latest_tag=${LATEST_TAG#v}" >> "$GITHUB_ENV" # Remove 'v' prefix from the tag
|
|
29
|
-
|
|
30
|
-
- name: Check if version changed and is greater than the previous
|
|
31
|
-
id: version_check
|
|
32
|
-
run: |
|
|
33
|
-
# Compare the current version with the version from the previous commit
|
|
34
|
-
PREVIOUS_NPM_VERSION=${{ env.latest_tag }}
|
|
35
|
-
CURRENT_NPM_VERSION=$(jq -r '.version' package.json)
|
|
36
|
-
CURRENT_CARGO_VERSION=$(awk -F '"' '/^version/ {print $2}' Cargo.toml)
|
|
37
|
-
if [[ "$CURRENT_NPM_VERSION" != "$CURRENT_CARGO_VERSION" ]]; then # Cargo.toml and package.json versions must match
|
|
38
|
-
echo "Mismatch: NPM version ($CURRENT_NPM_VERSION) and Cargo.toml version ($CURRENT_CARGO_VERSION)"
|
|
39
|
-
echo "version_changed=false" >> "$GITHUB_ENV"
|
|
40
|
-
else
|
|
41
|
-
if [[ "$PREVIOUS_NPM_VERSION" == "$CURRENT_NPM_VERSION" ]]; then
|
|
42
|
-
echo "version_changed=" >> "$GITHUB_ENV"
|
|
43
|
-
else
|
|
44
|
-
IFS='.' read -ra PREVIOUS_VERSION_PARTS <<< "$PREVIOUS_NPM_VERSION"
|
|
45
|
-
IFS='.' read -ra CURRENT_VERSION_PARTS <<< "$CURRENT_NPM_VERSION"
|
|
46
|
-
VERSION_CHANGED=false
|
|
47
|
-
for i in "${!PREVIOUS_VERSION_PARTS[@]}"; do
|
|
48
|
-
if [[ ${CURRENT_VERSION_PARTS[i]} -gt ${PREVIOUS_VERSION_PARTS[i]} ]]; then
|
|
49
|
-
VERSION_CHANGED=true
|
|
50
|
-
break
|
|
51
|
-
elif [[ ${CURRENT_VERSION_PARTS[i]} -lt ${PREVIOUS_VERSION_PARTS[i]} ]]; then
|
|
52
|
-
break
|
|
53
|
-
fi
|
|
54
|
-
done
|
|
55
|
-
|
|
56
|
-
echo "version_changed=$VERSION_CHANGED" >> "$GITHUB_ENV"
|
|
57
|
-
echo "current_version=${CURRENT_NPM_VERSION}" >> "$GITHUB_ENV"
|
|
58
|
-
fi
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
- name: Display result
|
|
62
|
-
run: |
|
|
63
|
-
echo "Version bump detected: ${{ env.version_changed }}"
|
|
64
|
-
|
|
65
|
-
- name: Fail if version is lower
|
|
66
|
-
if: env.version_changed == 'false'
|
|
67
|
-
run: exit 1
|
|
68
|
-
|
|
69
|
-
- name: Setup Node
|
|
70
|
-
if: env.version_changed == 'true'
|
|
71
|
-
uses: actions/setup-node@v4
|
|
72
|
-
with:
|
|
73
|
-
node-version: 18
|
|
74
|
-
registry-url: "https://registry.npmjs.org"
|
|
75
|
-
- name: Publish to NPM
|
|
76
|
-
if: env.version_changed == 'true'
|
|
77
|
-
env:
|
|
78
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
79
|
-
run: npm publish
|
|
80
|
-
|
|
81
|
-
- name: Setup Rust
|
|
82
|
-
if: env.version_changed == 'true'
|
|
83
|
-
uses: actions-rs/toolchain@v1
|
|
84
|
-
with:
|
|
85
|
-
profile: minimal
|
|
86
|
-
toolchain: stable
|
|
87
|
-
override: true
|
|
88
|
-
- name: Publish to Crates.io
|
|
89
|
-
if: env.version_changed == 'true'
|
|
90
|
-
uses: katyo/publish-crates@v2
|
|
91
|
-
with:
|
|
92
|
-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
93
|
-
|
|
94
|
-
- name: Tag versions
|
|
95
|
-
if: env.version_changed == 'true'
|
|
96
|
-
run: |
|
|
97
|
-
git checkout master
|
|
98
|
-
git config user.name github-actions[bot]
|
|
99
|
-
git config user.email github-actions[bot]@users.noreply.github.com
|
|
100
|
-
git tag -d "v${{ env.current_version }}" || true
|
|
101
|
-
git push origin --delete "v${{ env.current_version }}" || true
|
|
102
|
-
git tag -a "v${{ env.current_version }}" -m "Version ${{ env.current_version }}"
|
|
103
|
-
git push origin "v${{ env.current_version }}"
|
tooling/tree-sitter-plum/.npmignore
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/test
|
|
2
|
-
/examples
|
|
3
|
-
/build
|
|
4
|
-
/script
|
|
5
|
-
/target
|
|
6
|
-
bindings/rust
|
tooling/tree-sitter-plum/Cargo.toml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "tree-sitter-plum"
|
|
3
|
-
description = "plum grammar for tree-sitter"
|
|
4
|
-
version = "0.0.1"
|
|
5
|
-
authors = [
|
|
6
|
-
"pyrossh <pyros2097@gmail.com>",
|
|
7
|
-
]
|
|
8
|
-
license = "MIT"
|
|
9
|
-
readme = "bindings/rust/README.md"
|
|
10
|
-
keywords = ["incremental", "parsing", "plum"]
|
|
11
|
-
categories = ["parsing", "text-editors"]
|
|
12
|
-
repository = "https://github.com/pyrossh/tree-sitter-plum"
|
|
13
|
-
edition = "2021"
|
|
14
|
-
autoexamples = false
|
|
15
|
-
|
|
16
|
-
build = "bindings/rust/build.rs"
|
|
17
|
-
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
|
|
18
|
-
|
|
19
|
-
[lib]
|
|
20
|
-
path = "bindings/rust/lib.rs"
|
|
21
|
-
|
|
22
|
-
[dependencies]
|
|
23
|
-
tree-sitter-language = "0.1"
|
|
24
|
-
|
|
25
|
-
[build-dependencies]
|
|
26
|
-
cc = "~1.0"
|
|
27
|
-
|
|
28
|
-
[dev-dependencies]
|
|
29
|
-
tree-sitter = "0.24"
|
tooling/tree-sitter-plum/Makefile
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
VERSION := 0.0.1
|
|
2
|
-
|
|
3
|
-
LANGUAGE_NAME := tree-sitter-plum
|
|
4
|
-
|
|
5
|
-
# repository
|
|
6
|
-
SRC_DIR := src
|
|
7
|
-
|
|
8
|
-
PARSER_REPO_URL := $(shell git -C $(SRC_DIR) remote get-url origin 2>/dev/null)
|
|
9
|
-
|
|
10
|
-
ifeq ($(PARSER_URL),)
|
|
11
|
-
PARSER_URL := $(subst .git,,$(PARSER_REPO_URL))
|
|
12
|
-
ifeq ($(shell echo $(PARSER_URL) | grep '^[a-z][-+.0-9a-z]*://'),)
|
|
13
|
-
PARSER_URL := $(subst :,/,$(PARSER_URL))
|
|
14
|
-
PARSER_URL := $(subst git@,https://,$(PARSER_URL))
|
|
15
|
-
endif
|
|
16
|
-
endif
|
|
17
|
-
|
|
18
|
-
TS ?= tree-sitter
|
|
19
|
-
|
|
20
|
-
# ABI versioning
|
|
21
|
-
SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION)))
|
|
22
|
-
SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION)))
|
|
23
|
-
|
|
24
|
-
# install directory layout
|
|
25
|
-
PREFIX ?= /usr/local
|
|
26
|
-
INCLUDEDIR ?= $(PREFIX)/include
|
|
27
|
-
LIBDIR ?= $(PREFIX)/lib
|
|
28
|
-
PCLIBDIR ?= $(LIBDIR)/pkgconfig
|
|
29
|
-
|
|
30
|
-
# source/object files
|
|
31
|
-
PARSER := $(SRC_DIR)/parser.c $(SRC_DIR)/scanner.c
|
|
32
|
-
EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c))
|
|
33
|
-
OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS))
|
|
34
|
-
|
|
35
|
-
# flags
|
|
36
|
-
ARFLAGS ?= rcs
|
|
37
|
-
override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC
|
|
38
|
-
|
|
39
|
-
# OS-specific bits
|
|
40
|
-
ifeq ($(OS),Windows_NT)
|
|
41
|
-
$(error "Windows is not supported")
|
|
42
|
-
else ifeq ($(shell uname),Darwin)
|
|
43
|
-
SOEXT = dylib
|
|
44
|
-
SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib
|
|
45
|
-
SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib
|
|
46
|
-
LINKSHARED := $(LINKSHARED)-dynamiclib -Wl,
|
|
47
|
-
ifneq ($(ADDITIONAL_LIBS),)
|
|
48
|
-
LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS),
|
|
49
|
-
endif
|
|
50
|
-
LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks
|
|
51
|
-
else
|
|
52
|
-
SOEXT = so
|
|
53
|
-
SOEXTVER_MAJOR = so.$(SONAME_MAJOR)
|
|
54
|
-
SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR)
|
|
55
|
-
LINKSHARED := $(LINKSHARED)-shared -Wl,
|
|
56
|
-
ifneq ($(ADDITIONAL_LIBS),)
|
|
57
|
-
LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS)
|
|
58
|
-
endif
|
|
59
|
-
LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR)
|
|
60
|
-
endif
|
|
61
|
-
ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),)
|
|
62
|
-
PCLIBDIR := $(PREFIX)/libdata/pkgconfig
|
|
63
|
-
endif
|
|
64
|
-
|
|
65
|
-
all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc
|
|
66
|
-
|
|
67
|
-
lib$(LANGUAGE_NAME).a: $(OBJS)
|
|
68
|
-
$(AR) $(ARFLAGS) $@ $^
|
|
69
|
-
|
|
70
|
-
lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS)
|
|
71
|
-
$(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@
|
|
72
|
-
ifneq ($(STRIP),)
|
|
73
|
-
$(STRIP) $@
|
|
74
|
-
endif
|
|
75
|
-
|
|
76
|
-
$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in
|
|
77
|
-
sed -e 's|@URL@|$(PARSER_URL)|' \
|
|
78
|
-
-e 's|@VERSION@|$(VERSION)|' \
|
|
79
|
-
-e 's|@LIBDIR@|$(LIBDIR)|' \
|
|
80
|
-
-e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
|
|
81
|
-
-e 's|@REQUIRES@|$(REQUIRES)|' \
|
|
82
|
-
-e 's|@ADDITIONAL_LIBS@|$(ADDITIONAL_LIBS)|' \
|
|
83
|
-
-e 's|=$(PREFIX)|=$${prefix}|' \
|
|
84
|
-
-e 's|@PREFIX@|$(PREFIX)|' $< > $@
|
|
85
|
-
|
|
86
|
-
$(PARSER): $(SRC_DIR)/grammar.json
|
|
87
|
-
$(TS) generate --no-bindings $^
|
|
88
|
-
|
|
89
|
-
install: all
|
|
90
|
-
install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)'
|
|
91
|
-
install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h
|
|
92
|
-
install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc
|
|
93
|
-
install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a
|
|
94
|
-
install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER)
|
|
95
|
-
ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR)
|
|
96
|
-
ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT)
|
|
97
|
-
|
|
98
|
-
uninstall:
|
|
99
|
-
$(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \
|
|
100
|
-
'$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \
|
|
101
|
-
'$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \
|
|
102
|
-
'$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \
|
|
103
|
-
'$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \
|
|
104
|
-
'$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc
|
|
105
|
-
|
|
106
|
-
clean:
|
|
107
|
-
$(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT)
|
|
108
|
-
|
|
109
|
-
test:
|
|
110
|
-
$(TS) test
|
|
111
|
-
|
|
112
|
-
.PHONY: all install uninstall clean test
|
tooling/tree-sitter-plum/Package.swift
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// swift-tools-version:5.3
|
|
2
|
-
import PackageDescription
|
|
3
|
-
|
|
4
|
-
let package = Package(
|
|
5
|
-
name: "TreeSitterplum",
|
|
6
|
-
products: [
|
|
7
|
-
.library(name: "TreeSitterplum", targets: ["TreeSitterplum"]),
|
|
8
|
-
],
|
|
9
|
-
dependencies: [],
|
|
10
|
-
targets: [
|
|
11
|
-
.target(name: "TreeSitterplum",
|
|
12
|
-
path: ".",
|
|
13
|
-
exclude: [
|
|
14
|
-
"Cargo.toml",
|
|
15
|
-
"Makefile",
|
|
16
|
-
"binding.gyp",
|
|
17
|
-
"bindings/c",
|
|
18
|
-
"bindings/go",
|
|
19
|
-
"bindings/node",
|
|
20
|
-
"bindings/python",
|
|
21
|
-
"bindings/rust",
|
|
22
|
-
"prebuilds",
|
|
23
|
-
"grammar.js",
|
|
24
|
-
"package.json",
|
|
25
|
-
"package-lock.json",
|
|
26
|
-
"pyproject.toml",
|
|
27
|
-
"setup.py",
|
|
28
|
-
"test",
|
|
29
|
-
"examples",
|
|
30
|
-
".editorconfig",
|
|
31
|
-
".github",
|
|
32
|
-
".gitignore",
|
|
33
|
-
".gitattributes",
|
|
34
|
-
".gitmodules",
|
|
35
|
-
],
|
|
36
|
-
sources: [
|
|
37
|
-
"src/parser.c",
|
|
38
|
-
"src/scanner.c",
|
|
39
|
-
// NOTE: if your language has an external scanner, add it here.
|
|
40
|
-
],
|
|
41
|
-
resources: [
|
|
42
|
-
.copy("queries")
|
|
43
|
-
],
|
|
44
|
-
publicHeadersPath: "bindings/swift",
|
|
45
|
-
cSettings: [.headerSearchPath("src")])
|
|
46
|
-
],
|
|
47
|
-
cLanguageStandard: .c11
|
|
48
|
-
)
|
tooling/tree-sitter-plum/binding.gyp
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"targets": [
|
|
3
|
-
{
|
|
4
|
-
"target_name": "tree_sitter_plum_binding",
|
|
5
|
-
"dependencies": [
|
|
6
|
-
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
|
|
7
|
-
],
|
|
8
|
-
"include_dirs": [
|
|
9
|
-
"src",
|
|
10
|
-
],
|
|
11
|
-
"sources": [
|
|
12
|
-
"bindings/node/binding.cc",
|
|
13
|
-
"src/parser.c",
|
|
14
|
-
"src/scanner.c"
|
|
15
|
-
],
|
|
16
|
-
"cflags_c": [
|
|
17
|
-
"-std=c11",
|
|
18
|
-
],
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
tooling/tree-sitter-plum/package.json
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tree-sitter-plum",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "plum grammar for tree-sitter",
|
|
5
|
-
"main": "bindings/node",
|
|
6
|
-
"types": "bindings/node",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"parser",
|
|
9
|
-
"lexer",
|
|
10
|
-
"plum"
|
|
11
|
-
],
|
|
12
|
-
"files": [
|
|
13
|
-
"grammar.js",
|
|
14
|
-
"binding.gyp",
|
|
15
|
-
"prebuilds/**",
|
|
16
|
-
"bindings/node/*",
|
|
17
|
-
"queries/*",
|
|
18
|
-
"src/**"
|
|
19
|
-
],
|
|
20
|
-
"author": "pyrossh",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"node-addon-api": "^8.0.0",
|
|
24
|
-
"node-gyp-build": "^4.8.1"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"eslint": "^8.57.0",
|
|
28
|
-
"eslint-config-google": "^0.14.0",
|
|
29
|
-
"prebuildify": "^6.0.0",
|
|
30
|
-
"prettier": "^3.3.3"
|
|
31
|
-
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"install": "node-gyp-build",
|
|
34
|
-
"prebuildify": "prebuildify --napi --strip",
|
|
35
|
-
"lint": "eslint grammar.js",
|
|
36
|
-
"format": "prettier -w ."
|
|
37
|
-
},
|
|
38
|
-
"repository": "https://github.com/pyrossh/plum",
|
|
39
|
-
"eslintConfig": {
|
|
40
|
-
"env": {
|
|
41
|
-
"commonjs": true,
|
|
42
|
-
"es2021": true
|
|
43
|
-
},
|
|
44
|
-
"extends": "google",
|
|
45
|
-
"parserOptions": {
|
|
46
|
-
"ecmaVersion": "latest",
|
|
47
|
-
"sourceType": "module"
|
|
48
|
-
},
|
|
49
|
-
"rules": {
|
|
50
|
-
"quotes": "off",
|
|
51
|
-
"arrow-parens": "off",
|
|
52
|
-
"camel-case": "off",
|
|
53
|
-
"indent": [
|
|
54
|
-
"error",
|
|
55
|
-
2,
|
|
56
|
-
{
|
|
57
|
-
"SwitchCase": 1
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"max-len": [
|
|
61
|
-
"error",
|
|
62
|
-
{
|
|
63
|
-
"code": 160,
|
|
64
|
-
"ignoreComments": true,
|
|
65
|
-
"ignoreUrls": true,
|
|
66
|
-
"ignoreStrings": true
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"spaced-comment": [
|
|
70
|
-
"warn",
|
|
71
|
-
"always",
|
|
72
|
-
{
|
|
73
|
-
"line": {
|
|
74
|
-
"markers": [
|
|
75
|
-
"/"
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"tree-sitter": [
|
|
83
|
-
{
|
|
84
|
-
"scope": "source.plum",
|
|
85
|
-
"injection-regex": "^plum$"
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
}
|
tooling/tree-sitter-plum/plum.dylib
ADDED
|
Binary file
|
tooling/tree-sitter-plum/pyproject.toml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=42", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "tree-sitter-plum"
|
|
7
|
-
description = "plum grammar for tree-sitter"
|
|
8
|
-
version = "0.0.1"
|
|
9
|
-
keywords = ["incremental", "parsing", "tree-sitter", "plum"]
|
|
10
|
-
classifiers = [
|
|
11
|
-
"Intended Audience :: Developers",
|
|
12
|
-
"License :: OSI Approved :: MIT License",
|
|
13
|
-
"Topic :: Software Development :: Compilers",
|
|
14
|
-
"Topic :: Text Processing :: Linguistic",
|
|
15
|
-
"Typing :: Typed"
|
|
16
|
-
]
|
|
17
|
-
requires-python = ">=3.8"
|
|
18
|
-
license.text = "MIT"
|
|
19
|
-
readme = "README.md"
|
|
20
|
-
|
|
21
|
-
[project.urls]
|
|
22
|
-
Homepage = "https://github.com/tree-sitter/tree-sitter-plum"
|
|
23
|
-
|
|
24
|
-
[project.optional-dependencies]
|
|
25
|
-
core = ["tree-sitter~=0.21"]
|
|
26
|
-
|
|
27
|
-
[tool.cibuildwheel]
|
|
28
|
-
build = "cp38-*"
|
|
29
|
-
build-frontend = "build"
|
tooling/tree-sitter-plum/readme.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# tree-sitter-plum
|
|
2
|
-
|
|
3
|
-
[](https://github.com/pyrossh/tree-sitter-plum/actions/workflows/ci.yml)
|
|
4
|
-
[](https://crates.io/crates/tree-sitter-plum)
|
|
5
|
-
[](https://www.npmjs.com/package/tree-sitter-plum)
|
|
6
|
-
|
|
7
|
-
👾 plum Programming Language
|
|
8
|
-
|
|
9
|
-
Tree sitter grammar for [plum programming language](https://github.com/pyrossh/plum.sh)
|
tooling/tree-sitter-plum/setup.py
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
from os.path import isdir, join
|
|
2
|
-
from platform import system
|
|
3
|
-
|
|
4
|
-
from setuptools import Extension, find_packages, setup
|
|
5
|
-
from setuptools.command.build import build
|
|
6
|
-
from wheel.bdist_wheel import bdist_wheel
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Build(build):
|
|
10
|
-
def run(self):
|
|
11
|
-
if isdir("queries"):
|
|
12
|
-
dest = join(self.build_lib, "tree_sitter_plum", "queries")
|
|
13
|
-
self.copy_tree("queries", dest)
|
|
14
|
-
super().run()
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class BdistWheel(bdist_wheel):
|
|
18
|
-
def get_tag(self):
|
|
19
|
-
python, abi, platform = super().get_tag()
|
|
20
|
-
if python.startswith("cp"):
|
|
21
|
-
python, abi = "cp38", "abi3"
|
|
22
|
-
return python, abi, platform
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
setup(
|
|
26
|
-
packages=find_packages("bindings/python"),
|
|
27
|
-
package_dir={"": "bindings/python"},
|
|
28
|
-
package_data={
|
|
29
|
-
"tree_sitter_plum": ["*.pyi", "py.typed"],
|
|
30
|
-
"tree_sitter_plum.queries": ["*.scm"],
|
|
31
|
-
},
|
|
32
|
-
ext_package="tree_sitter_plum",
|
|
33
|
-
ext_modules=[
|
|
34
|
-
Extension(
|
|
35
|
-
name="_binding",
|
|
36
|
-
sources=[
|
|
37
|
-
"bindings/python/tree_sitter_plum/binding.c",
|
|
38
|
-
"src/parser.c",
|
|
39
|
-
"src/scanner.c",
|
|
40
|
-
# NOTE: if your language uses an external scanner, add it here.
|
|
41
|
-
],
|
|
42
|
-
extra_compile_args=(
|
|
43
|
-
[
|
|
44
|
-
"-std=c11",
|
|
45
|
-
]
|
|
46
|
-
if system() != "Windows"
|
|
47
|
-
else [
|
|
48
|
-
"/std:c11",
|
|
49
|
-
"/utf-8",
|
|
50
|
-
]
|
|
51
|
-
),
|
|
52
|
-
define_macros=[
|
|
53
|
-
("Py_LIMITED_API", "0x03080000"),
|
|
54
|
-
("PY_SSIZE_T_CLEAN", None),
|
|
55
|
-
],
|
|
56
|
-
include_dirs=["src"],
|
|
57
|
-
py_limited_api=True,
|
|
58
|
-
)
|
|
59
|
-
],
|
|
60
|
-
cmdclass={"build": Build, "bdist_wheel": BdistWheel},
|
|
61
|
-
zip_safe=False,
|
|
62
|
-
)
|
tooling/tree-sitter-plum/{aa.plum → test/aa.plum}
RENAMED
|
File without changes
|
tooling/tree-sitter-plum/tree-sitter-plum.pc
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
prefix=/usr/local
|
|
2
|
-
libdir=${prefix}/lib
|
|
3
|
-
includedir=${prefix}/include
|
|
4
|
-
|
|
5
|
-
Name: tree-sitter-plum
|
|
6
|
-
Description: Plum grammar for tree-sitter
|
|
7
|
-
URL: https://git.sr.ht/~pyrossh/plum
|
|
8
|
-
Version: 0.0.1
|
|
9
|
-
Requires:
|
|
10
|
-
Libs: -L${libdir} -ltree-sitter-plum
|
|
11
|
-
Cflags: -I${includedir}
|