Skip to content

Commit 750cb44

Browse files
committed
Initial release v1.0.0
0 parents  commit 750cb44

242 files changed

Lines changed: 27928 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
9+
[*.{c,h,inc}]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.{md,txt}]
14+
trim_trailing_whitespace = false
15+
16+
[Makefile]
17+
indent_style = tab

.gitattributes

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Normalize line endings on checkin; check out native by default.
2+
* text=auto
3+
4+
# Shell scripts must stay LF even on Windows checkouts — install.sh is served
5+
# and executed verbatim.
6+
*.sh text eol=lf
7+
Makefile text eol=lf
8+
*.qs text eol=lf
9+
*.inc text eol=lf
10+
*.c text eol=lf
11+
*.h text eol=lf
12+
13+
# PowerShell is edited on Windows; keep CRLF.
14+
*.ps1 text eol=crlf
15+
16+
# Compiled bytecode is binary.
17+
*.qvm binary
18+
19+
# Language detection (GitHub Linguist):
20+
# .inc files are C sources, not PHP; count them as C.
21+
*.inc linguist-language=C
22+
# Treat stdlib/examples/tests as documentation so they don't skew stats.
23+
examples/** linguist-documentation
24+
tests/** linguist-documentation

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Default owners for everything in the repo.
2+
# These users are automatically requested for review on pull requests.
3+
* @PySudo
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Bug report
2+
description: Report incorrect behavior in the interpreter, VM, compiler, or stdlib
3+
title: "[bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to file a bug! Please fill in the sections below
10+
so we can reproduce and fix it quickly.
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: What happened?
15+
description: A clear description of the bug and what you expected instead.
16+
placeholder: "`qs vm foo.qs` prints 3 but the interpreter prints 4…"
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: repro
21+
attributes:
22+
label: Minimal reproduction
23+
description: The smallest QuantoScript program that triggers the bug.
24+
render: qscript
25+
placeholder: |
26+
x = [1, 2, 3]
27+
print(x[1])
28+
validations:
29+
required: true
30+
- type: input
31+
id: command
32+
attributes:
33+
label: Command used
34+
description: How did you run it?
35+
placeholder: "qs vm foo.qs / qs foo.qs / qs build foo.qs"
36+
validations:
37+
required: true
38+
- type: dropdown
39+
id: engine
40+
attributes:
41+
label: Which engine?
42+
options:
43+
- Tree-walk interpreter (qs file.qs)
44+
- Bytecode VM (qs vm / run)
45+
- Native compiler (qs native / compile)
46+
- Not sure
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: output
51+
attributes:
52+
label: Actual output / error
53+
description: Paste the full output, including any stack trace.
54+
render: shell
55+
validations:
56+
required: false
57+
- type: input
58+
id: version
59+
attributes:
60+
label: QuantoScript version
61+
description: Output of `qs version`.
62+
placeholder: "QuantoScript 1.0.0"
63+
validations:
64+
required: true
65+
- type: dropdown
66+
id: os
67+
attributes:
68+
label: Operating system
69+
options:
70+
- macOS (Apple Silicon)
71+
- macOS (Intel)
72+
- Linux (x86-64)
73+
- Linux (ARM64)
74+
- Windows
75+
- Other
76+
validations:
77+
required: true
78+
- type: input
79+
id: install
80+
attributes:
81+
label: How did you install?
82+
placeholder: "install.sh / built from source / release archive"
83+
validations:
84+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://github.com/PySudo/QuantoScript/blob/main/DOCS.md
5+
about: The full language reference and guides — check here before filing an issue.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Feature request
2+
description: Suggest a language feature, stdlib addition, or tooling improvement
3+
title: "[feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: What problem does this solve?
10+
description: Describe the use case or limitation you're running into.
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: proposal
15+
attributes:
16+
label: Proposed solution
17+
description: What should QuantoScript do? Include syntax or API sketches if relevant.
18+
render: qscript
19+
validations:
20+
required: true
21+
- type: dropdown
22+
id: area
23+
attributes:
24+
label: Area
25+
options:
26+
- Language / syntax
27+
- Standard library
28+
- Bytecode VM
29+
- Native compiler
30+
- CLI / tooling
31+
- Package manager
32+
- Documentation
33+
- Other
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: alternatives
38+
attributes:
39+
label: Alternatives considered
40+
description: Other approaches you thought about, and why this one is better.
41+
validations:
42+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Thanks for contributing to QuantoScript! -->
2+
3+
## Summary
4+
5+
<!-- What does this PR change, and why? -->
6+
7+
## Related issues
8+
9+
<!-- e.g. "Closes #123" -->
10+
11+
## Type of change
12+
13+
- [ ] Bug fix
14+
- [ ] New feature
15+
- [ ] Standard library
16+
- [ ] Documentation
17+
- [ ] Build / CI / tooling
18+
- [ ] Refactor (no behavior change)
19+
20+
## Checklist
21+
22+
- [ ] I edited the sources under `src/parts/` (not the generated `src/quanto.c` directly)
23+
- [ ] The build succeeds (`make`)
24+
- [ ] The regression suite passes (`make test`)
25+
- [ ] The interpreter and the VM produce the same output for any new behavior
26+
- [ ] I updated the docs (`README.md` / `DOCS.md` / `CHANGELOG.md`) where relevant
27+
28+
## Notes for reviewers
29+
30+
<!-- Anything worth calling out: trade-offs, follow-ups, platforms not tested, etc. -->

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-test:
11+
name: Build & test (${{ matrix.os }})
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install OpenSSL (Linux)
21+
if: runner.os == 'Linux'
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y libssl-dev
25+
26+
- name: Install OpenSSL (macOS)
27+
if: runner.os == 'macOS'
28+
run: brew install openssl@3
29+
30+
- name: Setup MSYS2 (Windows)
31+
if: runner.os == 'Windows'
32+
uses: msys2/setup-msys2@v2
33+
with:
34+
msystem: MINGW64
35+
update: true
36+
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl mingw-w64-x86_64-pkgconf make
37+
38+
- name: Build
39+
if: runner.os != 'Windows'
40+
run: make
41+
42+
- name: Build (MSYS2)
43+
if: runner.os == 'Windows'
44+
shell: msys2 {0}
45+
run: make
46+
47+
- name: Run regression suite
48+
if: runner.os != 'Windows'
49+
shell: pwsh
50+
run: |
51+
.\tests\run_regression.ps1 -Verbose
52+
if ($LASTEXITCODE -ne 0) { exit 1 }
53+
54+
- name: Run regression suite (Windows)
55+
if: runner.os == 'Windows'
56+
shell: pwsh
57+
run: |
58+
.\tests\run_regression.ps1 -Verbose
59+
if ($LASTEXITCODE -ne 0) { exit 1 }
60+
61+
- name: Upload regression log on failure
62+
if: failure()
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: regression-log-${{ matrix.os }}
66+
path: |
67+
build/
68+
tests/*.qvm
69+
retention-days: 5

0 commit comments

Comments
 (0)