Skip to content

Cleanup #417

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

Open
wants to merge 246 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
39b87be
Examples and work on testing
Cypher1 May 6, 2024
dbb552f
Indentation in tracing
Cypher1 May 6, 2024
9638a77
More example cases
Cypher1 May 6, 2024
7a646fe
Testing error message improvements
Cypher1 May 6, 2024
6b785d4
Indentation and parser API improvements
Cypher1 May 6, 2024
2a01db9
Classify trailing or infix operators (comma and semicolon) separately
Cypher1 May 6, 2024
431665c
Use a helper function for repeated expressions like arrays, lists, etc
Cypher1 May 6, 2024
cbad228
Indentation and use of `any_expr`
Cypher1 May 6, 2024
dc878c5
Improved error reporting
Cypher1 May 6, 2024
5d642f0
Cleanup and add repeated helper
Cypher1 May 6, 2024
083829b
TMP
Cypher1 May 6, 2024
ff67eac
TMP
Cypher1 May 8, 2024
61a73ad
Classify trailing or infix operators (comma and semicolon) separately
Cypher1 May 6, 2024
5f258aa
Add implements / trait keywords
Cypher1 May 8, 2024
7d63eda
Clippy
Cypher1 May 8, 2024
d3476ab
Clean up inefficient token handling
Cypher1 May 16, 2024
18b2ed1
TMP - added
Cypher1 May 20, 2024
c8da89c
Handle paren groups
Cypher1 Jun 6, 2024
e29f003
Support infix and postfix binding types
Cypher1 Aug 4, 2024
6d0ef9d
Change expectation parameter order to match got vs expected idiom
Cypher1 Aug 5, 2024
3103cbc
Fmt
Cypher1 Aug 8, 2024
ef329f5
TMP
Cypher1 Aug 11, 2024
12e9f38
TMP
Cypher1 Aug 11, 2024
cd5c3f7
Bug fix
Cypher1 Aug 11, 2024
d96f21b
Why not support curlies in weird spots
Cypher1 Aug 11, 2024
540d884
Use 'forall T: Nat' syntax over planned '{T: Nat}'
Cypher1 Aug 11, 2024
4462b4d
Clean up example syntax
Cypher1 Aug 11, 2024
add5adf
Handle indexing operations and add debugging information for the pars…
Cypher1 Sep 7, 2024
5deb4ee
Fmt
Cypher1 Sep 7, 2024
64e0572
Add tests for forall bindings in call arguments
Cypher1 Sep 8, 2024
d8658ad
Thinking about assignments
Cypher1 Sep 8, 2024
de17178
Handle scoped better and catch cases with non-definition assignment ops
Cypher1 Sep 8, 2024
078744c
Clarify binding vs arguments
Cypher1 Sep 8, 2024
7ab7c63
WIP: Merge bindings and call_or_definition
Cypher1 Sep 8, 2024
d3fc721
Merge bindings and call_or_definition
Cypher1 Sep 8, 2024
50b3ea5
Cleaning up binding handling
Cypher1 Sep 8, 2024
e015c9e
Fixup binding/argument handling
Cypher1 Sep 8, 2024
66f8089
Fmt
Cypher1 Sep 8, 2024
9bf9026
TMP - added
Cypher1 Sep 8, 2024
d8c1f2e
Split parser module error, tests code into sub modules
Cypher1 Sep 14, 2024
5669480
Cleanup
Cypher1 Sep 14, 2024
1fa720f
Reorder
Cypher1 Sep 14, 2024
2698d6f
Think about more test cases
Cypher1 Sep 14, 2024
0a6ad9d
Cleanup
Cypher1 Sep 15, 2024
cf36239
Call out a recurring pattern with a name
Cypher1 Sep 15, 2024
31ec5c3
Split short-typed-index into crate
Cypher1 Sep 15, 2024
509997f
TMP - added
Cypher1 Sep 15, 2024
cf4f133
Add basic smoke tests for short typed index
Cypher1 Sep 15, 2024
2d9a4bd
Add to default members and sort them
Cypher1 Sep 15, 2024
200754e
Avoid unnecessary use of Arc for Ast datastructures
Cypher1 Sep 15, 2024
ce9d761
Show that nonzero optimisation works for typed index
Cypher1 Sep 15, 2024
566df00
Add a typed non-zero index which is just an alias to typed index that…
Cypher1 Sep 15, 2024
445947a
Keep the String and &str sizes for reference in the string_interner
Cypher1 Sep 15, 2024
b0de127
Revert "Avoid unnecessary use of Arc for Ast datastructures"
Cypher1 Sep 15, 2024
71e17b8
Update note
Cypher1 Sep 15, 2024
23f79ef
Add note about BTreeMap
Cypher1 Sep 15, 2024
0f3c2ba
Split entity-component-slab crate out of the ast module
Cypher1 Sep 15, 2024
737006c
TMP
Cypher1 Sep 15, 2024
6acd13c
More macro boilerplate
Cypher1 Sep 15, 2024
e43f5c2
More macro boilerplate
Cypher1 Sep 15, 2024
3782eb5
More macro boilerplate
Cypher1 Sep 15, 2024
af87f5c
More macro boilerplate
Cypher1 Sep 15, 2024
5754ed1
More readme
Cypher1 Sep 15, 2024
6cc9ae9
TMP
Cypher1 Sep 15, 2024
b177956
Clean up old code
Cypher1 Sep 15, 2024
3f0d159
Clean up old code
Cypher1 Sep 15, 2024
a01ffc7
Add a mailmap
Cypher1 Sep 15, 2024
33e20c3
Reorder macro arguments for readability
Cypher1 Sep 15, 2024
410b9d6
Avoid unnecessary trait leak
Cypher1 Sep 15, 2024
0e7863b
Avoid unnecessary NodeRef and rename types and macros
Cypher1 Sep 15, 2024
cdb2ebd
Avoid using a slab where a small vec would be better
Cypher1 Sep 15, 2024
1f90996
Add note
Cypher1 Sep 15, 2024
0897159
Clippy
Cypher1 Sep 15, 2024
729b707
Fmt
Cypher1 Sep 15, 2024
179e3fd
Add note on bitvec vs bitsvec (which uses simd)
Cypher1 Sep 15, 2024
220d355
TMP - added
Cypher1 Sep 16, 2024
70a60f4
tmp
Cypher1 Sep 16, 2024
da7face
TMP
Cypher1 Sep 18, 2024
014a166
TMP
Cypher1 Sep 18, 2024
45df60c
TMP
Cypher1 Sep 18, 2024
9291d8d
TMP
Cypher1 Sep 18, 2024
d3048f5
tmp
Cypher1 Sep 18, 2024
7165bbf
tmp
Cypher1 Sep 19, 2024
b0022df
Partially working
Cypher1 Sep 19, 2024
cd29d97
Cleanup
Cypher1 Sep 22, 2024
8f35809
Add a second test case and performance counters
Cypher1 Sep 22, 2024
70340bc
Clean up and implement Debug for State
Cypher1 Sep 22, 2024
a43048a
Use underscore not space to enusure word selection grabs the position…
Cypher1 Sep 22, 2024
07f6037
Renaming to industry jargon
Cypher1 Sep 22, 2024
95114c7
Fmt and clippy
Cypher1 Sep 22, 2024
1030586
Child nodes
Cypher1 Sep 22, 2024
446a584
TMP
Cypher1 Sep 22, 2024
71462a0
Formatting
Cypher1 Sep 22, 2024
7769f68
Debug for rule
Cypher1 Sep 22, 2024
b0d4970
Tables for output
Cypher1 Sep 22, 2024
764a087
Simplify
Cypher1 Sep 23, 2024
10dd76c
Track entry origins
Cypher1 Sep 24, 2024
d487b18
TMP
Cypher1 Sep 24, 2024
19a3ae9
Passes basic tests
Cypher1 Sep 26, 2024
dabc798
clear
Cypher1 Sep 28, 2024
466d57e
Mark a failing test as expected
Cypher1 Sep 28, 2024
3fb3258
Add grmtools deps
Cypher1 Sep 28, 2024
a729e7d
Add grmtools build
Cypher1 Sep 28, 2024
9522972
Add calc lexer as tako.l
Cypher1 Sep 28, 2024
25d5dd0
TMP
Cypher1 Sep 28, 2024
910cd5b
Add lexeme definition
Cypher1 Sep 28, 2024
addd71e
Start
Cypher1 Sep 28, 2024
d596cb5
Add error messages to the build script
Cypher1 Sep 28, 2024
21019d4
Generators gon generate
Cypher1 Sep 28, 2024
92938d2
Try example parser
Cypher1 Sep 28, 2024
a44c56d
Working example parser
Cypher1 Sep 28, 2024
5552620
Make a test
Cypher1 Sep 28, 2024
c90f00b
Show that we can 'safely' mutate the context (though only children of…
Cypher1 Sep 28, 2024
acb287d
Start parsing some inputs
Cypher1 Sep 28, 2024
71d14fd
Work out more about how to use yacc style parsers
Cypher1 Sep 28, 2024
1df80bf
Fix pretty printing a bit
Cypher1 Sep 28, 2024
831cb63
TMP
Cypher1 Sep 28, 2024
61da82e
Simplify and reduce conflicts
Cypher1 Sep 29, 2024
4c4cca5
Rename Or to BitOr despite it also being type Or for clarity
Cypher1 Sep 29, 2024
bce7e79
New error type from lrlex
Cypher1 Sep 29, 2024
99af943
TMP
Cypher1 Sep 29, 2024
94ee654
TMP
Cypher1 Sep 29, 2024
fd1c19a
Turn off checks that assume windows/unix for wasm
Cypher1 Sep 29, 2024
748b8b6
Drop partable use treesitter directly
Cypher1 Sep 29, 2024
063b85d
Drop rust-sitter use treesitter directly
Cypher1 Sep 29, 2024
b4661bc
Init
Cypher1 Sep 29, 2024
8be7a48
Init more
Cypher1 Sep 29, 2024
0212b75
Test that the parser already works (sorta) in nvim
Cypher1 Sep 29, 2024
2061a91
Add generated files
Cypher1 Sep 29, 2024
b194974
Add tree sitter tako github action
Cypher1 Sep 29, 2024
e71249a
Start adding tests and npm setup
Cypher1 Sep 29, 2024
5a13536
Configure treesitter package registration
Cypher1 Sep 29, 2024
2102e33
Add empty queries for later
Cypher1 Sep 29, 2024
e26ec30
Add a rough start at highlights
Cypher1 Sep 29, 2024
fb2eaeb
Rebuild in CI
Cypher1 Sep 29, 2024
a8f1372
Don't track generated files
Cypher1 Sep 29, 2024
c4fddce
Try again
Cypher1 Sep 29, 2024
ee196b4
Add watch script
Cypher1 Sep 29, 2024
9fb3875
Add parser to parent project
Cypher1 Sep 29, 2024
1a962f6
Update build for takolib
Cypher1 Sep 29, 2024
586c3cb
Go back
Cypher1 Sep 29, 2024
de5a9ce
Update deps
Cypher1 Sep 29, 2024
eb47d41
Regen with git
Cypher1 Sep 29, 2024
7ae74f3
Regen with git
Cypher1 Sep 29, 2024
5904c93
Use git
Cypher1 Sep 29, 2024
b9481ee
Add comment support
Cypher1 Sep 29, 2024
b8dc8a2
Add basic int and float support
Cypher1 Sep 29, 2024
c2e5120
Add hex support via a color syntax
Cypher1 Sep 29, 2024
72b0c5f
Add number and hex support
Cypher1 Sep 29, 2024
fde0288
Deps
Cypher1 Sep 29, 2024
24d2252
Add entry points to queries to make tools happy (despite these being …
Cypher1 Sep 29, 2024
3b4fc88
Fix highlights!
Cypher1 Sep 29, 2024
56c9fca
More testing and filetypes
Cypher1 Sep 29, 2024
16e5cc3
Progress on binary operations and nested comments
Cypher1 Sep 29, 2024
0ebb2fb
TMP
Cypher1 Sep 29, 2024
383eaf8
TMP
Cypher1 Sep 29, 2024
60d3b33
Make bacon in root work for parser
Cypher1 Sep 29, 2024
3714b48
TMP
Cypher1 Sep 30, 2024
d2ceb3b
Improve bacon rebuilding config
Cypher1 Oct 1, 2024
25c9f5f
Ignore more build output
Cypher1 Oct 1, 2024
a815b04
Add more corpus tests
Cypher1 Oct 1, 2024
fbd65ea
Iterate on lang
Cypher1 Oct 1, 2024
ca544f0
Nested comments are tricky, document edge cases
Cypher1 Oct 1, 2024
6f3bbf8
Big improvements to definitions
Cypher1 Oct 1, 2024
1ff50df
Add explicit support for tree sitter style markup so that we can use …
Cypher1 Oct 1, 2024
9488937
TMP
Cypher1 Oct 3, 2024
90bdb05
TMP
Cypher1 Oct 3, 2024
e64758c
Don't track generated files
Cypher1 Oct 3, 2024
f6f6ff7
Don't track generated files
Cypher1 Oct 3, 2024
ecf667d
Remove unused test file
Cypher1 Oct 3, 2024
bb53b82
Huge progress
Cypher1 Oct 4, 2024
3bdfb84
Add optionally postfix (or infix) operator ';' sequence
Cypher1 Oct 4, 2024
13b9d7e
Add notation for containers list array/list/set/vector as '[' <values…
Cypher1 Oct 4, 2024
55f9cbb
Tests for type annotations and renam ops to use snake case
Cypher1 Oct 4, 2024
42418d7
Update and improve examples
Cypher1 Oct 7, 2024
0c1a96e
Add format strings
Cypher1 Oct 8, 2024
68cc7e6
Add format strings for other test cases
Cypher1 Oct 8, 2024
a7877b2
Add support for ranges, spread operators, bindings [forall, given, ex…
Cypher1 Oct 8, 2024
58ebb93
Add instances test case
Cypher1 Oct 8, 2024
0efeae3
Reformat number tests
Cypher1 Oct 8, 2024
16c8cae
Remove unused ident in color test
Cypher1 Oct 8, 2024
02155d2
Add separators to contexts test
Cypher1 Oct 8, 2024
4089f69
Use forall instead of with keywords
Cypher1 Oct 8, 2024
a5c15aa
Add separators to gadts test
Cypher1 Oct 8, 2024
b974350
Add bindings back
Cypher1 Oct 8, 2024
2c8899a
TMP
Cypher1 Oct 9, 2024
4ea7db4
Add node-gyp
Cypher1 Oct 10, 2024
0745455
Clean up lazy static and fmt
Cypher1 Oct 23, 2024
ebc42d5
Support mode node types
Cypher1 Jan 27, 2025
ff47e24
Add handling for more literals and identifiers
Cypher1 Jan 27, 2025
ea487b6
Int literal test passes with tree sitter
Cypher1 Feb 7, 2025
4896357
Binary operators
Cypher1 Feb 8, 2025
214189b
Start on bindings
Cypher1 Feb 10, 2025
f9d5a27
WIP
Cypher1 Feb 11, 2025
6cb17ea
TMP - added
Cypher1 Feb 15, 2025
4b74662
Add missing '->' syntax for 'closure'
Cypher1 Feb 16, 2025
c6d02e7
Rename 'closure' to 'arrow'
Cypher1 Feb 16, 2025
89782bb
TMP - added
Cypher1 Feb 16, 2025
e439673
More node types
Cypher1 Feb 19, 2025
7bb0a36
TMP
Cypher1 Feb 20, 2025
043fb4d
Update dependencies
Cypher1 Feb 20, 2025
03e7e2e
Updare upload-artifact action
Cypher1 Feb 20, 2025
cf55e3e
Change path for tako tree sitter package.json
Cypher1 Feb 20, 2025
e24b178
Build node-gyp as a build step, not install
Cypher1 Feb 21, 2025
67feedc
Include generated code as a sort of vendoring
Cypher1 Feb 21, 2025
896c491
Run tree sitter via npm
Cypher1 Feb 21, 2025
3e2b6b0
String, color and hex literals
Cypher1 Feb 25, 2025
88496bb
Add test for lowerer via llamada
Cypher1 Feb 25, 2025
73609fe
Add wasm build config
Cypher1 Mar 2, 2025
14c4de1
TMP
Cypher1 Mar 2, 2025
c1da75f
Update lockfile
Cypher1 Mar 2, 2025
254ecc0
TMP
Cypher1 Mar 2, 2025
6575288
Clippy
Cypher1 Mar 2, 2025
a2fb34a
Fmt
Cypher1 Mar 2, 2025
bb86e5e
Support all compilation options
Cypher1 Mar 2, 2025
f55cd3f
TMP
Cypher1 Mar 2, 2025
9572eea
TMP - added
Cypher1 Mar 6, 2025
1f72c88
TMP - modified
Cypher1 Mar 6, 2025
2e136b6
tmp
Cypher1 Mar 9, 2025
73d72df
TMP - added
Cypher1 Mar 9, 2025
f7fa1e2
TMP - added
Cypher1 Mar 9, 2025
c122a95
TMP - added
Cypher1 Mar 9, 2025
c68b117
TMP - added
Cypher1 Mar 9, 2025
057123f
TMP - added
Cypher1 Mar 9, 2025
f74ab16
Build
Cypher1 Mar 12, 2025
8c77829
Regenerate
Cypher1 Mar 12, 2025
faf70e1
Regenerate wasm
Cypher1 Mar 12, 2025
057b7e4
Use a facade that makes this possible, maybe
Cypher1 Mar 12, 2025
7c17db9
Maybe
Cypher1 Mar 12, 2025
d565653
Avoid using a logger if not wasm or env_logger
Cypher1 Mar 12, 2025
0444b72
Fmt
Cypher1 Mar 12, 2025
b3c3fa0
Cleanup
Cypher1 Mar 12, 2025
cbbd65c
Support tests
Cypher1 Mar 12, 2025
9363fdc
Update lock
Cypher1 Mar 12, 2025
8ad5550
Cleanup
Cypher1 Mar 12, 2025
8e00590
Unsafe parser load
Cypher1 Mar 13, 2025
cc826ac
Update deps
Cypher1 Apr 12, 2025
3490c1c
Use default treesitter for testing the build break
Cypher1 Apr 13, 2025
96cc053
TMP
Cypher1 Apr 20, 2025
6b79f80
TMP
Cypher1 Apr 25, 2025
ca6ad0a
Cleaner
Cypher1 Apr 25, 2025
056066c
TMP
Cypher1 Apr 25, 2025
ab7f142
Add everything but calls with Chumsky
Cypher1 Apr 25, 2025
994a253
Add calls
Cypher1 Apr 25, 2025
11518d3
TMP
Cypher1 Apr 29, 2025
aaea958
TMP
Cypher1 May 10, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/tako.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:
run: cargo build --locked --release --verbose
- name: Upload executable Linux
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tako
path: ./target/release/tako
- name: Upload executable Windows
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tako.exe
path: ./target/release/tako.exe
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/tree-sitter-tako.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tree-sitter-tako

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

defaults:
run:
working-directory: tree-sitter-tako

jobs:
ci:
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@main
- name: Setup Node
uses: actions/setup-node@main
with:
node-version-file: 'tree-sitter-tako/package.json'

- name: Cache node modules
id: cache-npm
uses: actions/cache@main
env:
cache-name: cache-node-modules
with:
path: .npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- run: npm set cache .npm # set the npm cache to be a local .npm dir for simplicity
- run: npm install
- run: npm exec tree-sitter generate
- run: npm exec tree-sitter test
- run: node --test bindings/node/*_test.js
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Jay Pratt <jp10010101010000@gmail.com>
Jay Pratt <jp10010101010000@gmail.com> <jopra@chromium.org>
Jay Pratt <jp10010101010000@gmail.com> <jopra@google.com>
Loading
Loading