Skip to content

Commit b21dd82

Browse files
Merge pull request #1 from vojtech-dobes/first-version
Initial version
2 parents a3917ac + 7027769 commit b21dd82

40 files changed

+1949
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = tab
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{md,neon,yml}]
10+
indent_size = 2
11+
indent_style = space

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
.gitignore export-ignore
4+
.github export-ignore
5+
docs/ export-ignore
6+
phpstan-baseline.neon export-ignore
7+
phpstan.neon export-ignore
8+
tests/ export-ignore
9+
10+
*.php* diff=php linguist-language=PHP

.github/workflows/checks.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: checks
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
static_analysis:
8+
name: Static analysis
9+
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
COMPOSER_NO_INTERACTION: "1"
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.4'
21+
coverage: none
22+
23+
- run: composer install --ansi --no-progress --prefer-dist
24+
25+
- name: Run PHPStan
26+
run: composer run phpstan
27+
28+
tests:
29+
name: PHP ${{ matrix.php }} tests on ${{ matrix.os }}
30+
31+
needs:
32+
- static_analysis
33+
34+
strategy:
35+
matrix:
36+
os:
37+
- ubuntu-latest
38+
- windows-latest
39+
php:
40+
- '8.4'
41+
42+
fail-fast: false
43+
44+
runs-on: ${{ matrix.os }}
45+
46+
env:
47+
COMPOSER_NO_INTERACTION: "1"
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: ${{ matrix.php }}
55+
coverage: none
56+
57+
- run: composer install --ansi --no-progress --prefer-dist
58+
59+
- name: Run tests
60+
run: composer run test
61+
62+
- if: failure()
63+
uses: actions/upload-artifact@v4
64+
with:
65+
path: tests/output

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
vendor

composer.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"authors": [
3+
{
4+
"name": "Vojtěch Dobeš",
5+
"homepage": "https://vojtechdobes.com"
6+
}
7+
],
8+
"autoload": {
9+
"psr-4": {
10+
"Vojtechdobes\\GrammarProcessing\\": "src/GrammarProcessing"
11+
}
12+
},
13+
"config": {
14+
"sort-packages": true
15+
},
16+
"description": "Library for tokenization, abstract syntax tree parsing & interpretation",
17+
"keywords": [
18+
"ast",
19+
"context-free",
20+
"grammar",
21+
"language",
22+
"lexer",
23+
"parser",
24+
"syntax",
25+
"token"
26+
],
27+
"license": [
28+
"BSD-3-Clause",
29+
"GPL-2.0-only",
30+
"GPL-3.0-only"
31+
],
32+
"name": "vojtech-dobes/php-grammar-processing",
33+
"require": {
34+
"php": "~8.4",
35+
"ext-pcre": "*"
36+
},
37+
"require-dev": {
38+
"nette/tester": "~2.5.0",
39+
"phpstan/phpstan": "~2.1.0",
40+
"spaze/phpstan-disallowed-calls": "~4.4.0"
41+
},
42+
"scripts": {
43+
"phpstan": "phpstan analyse",
44+
"test": "composer dump-autoload && tester tests -o console-lines --cider --setup=tests/setup.php"
45+
}
46+
}

composer.lock

Lines changed: 222 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)