Commit Graph

3569 Commits (2d845d9026105b651d8833fab7547728b9ae3fdf)
 

Author SHA1 Message Date
Wilfred Hughes e86567f520 Allow backslashes in symbols
Elisp treats \x\y as equivalent to the symbol xy. This seems to mostly
be confusion with characters, where people write \n when they want ?\n.
2021-08-15 18:08:40 +07:00
Wilfred Hughes 6ea3b602a7 Allow % in symbols and add symbol tests 2021-08-15 17:58:25 +07:00
Wilfred Hughes 9a803c6322 Support bytecode literals 2021-08-15 17:55:38 +07:00
Wilfred Hughes f315d68837 Support string literals with escaped trailing newlines 2021-08-15 17:49:02 +07:00
Wilfred Hughes 9a692b1df8 Add test for string literals 2021-08-15 17:45:06 +07:00
Wilfred Hughes 84d6d9465d Treat line feed (\f in regex or ^L in Emacs) as whitespace 2021-08-15 17:39:20 +07:00
Wilfred Hughes aa8cf1feaa Support #$ special read syntax 2021-08-15 17:35:24 +07:00
Wilfred Hughes 1fd10f20b1 Document testing the parser against a big collection of files 2021-08-15 17:26:22 +07:00
Wilfred Hughes 747672700a Support dotted lists with >1 item before the dot 2021-08-15 17:26:01 +07:00
Wilfred Hughes 7ef2b12895 Supported dotted lists 2021-08-15 17:20:24 +07:00
Wilfred Hughes 70ef48dbb8 Hook up vendored tree-sitter-css 2021-08-15 17:06:16 +07:00
Wilfred Hughes 3eb9f3d91d Hook up vendored tree-sitter-go 2021-08-15 17:03:47 +07:00
Wilfred Hughes ff523a0bea Factor out a build helper function 2021-08-15 16:52:25 +07:00
Wilfred Hughes c80ce0d024 Use vendored tree-sitter-rust 2021-08-15 16:50:43 +07:00
Wilfred Hughes 8a6c7c8013 Add 'vendor/tree-sitter-go/' from commit 'eb306e6e60f393df346cfc8cbfaf52667a37128a'
git-subtree-dir: vendor/tree-sitter-go
git-subtree-mainline: 26c6438fa2
git-subtree-split: eb306e6e60
2021-08-15 16:42:25 +07:00
Wilfred Hughes 26c6438fa2 Add 'vendor/tree-sitter-css/' from commit '94e10230939e702b4fa3fa2cb5c3bc7173b95d07'
git-subtree-dir: vendor/tree-sitter-css
git-subtree-mainline: e31b5b4925
git-subtree-split: 94e1023093
2021-08-15 16:41:30 +07:00
Wilfred Hughes e31b5b4925 Add 'vendor/tree-sitter-json/' from commit '65bceef69c3b0f24c0b19ce67d79f57c96e90fcb'
git-subtree-dir: vendor/tree-sitter-json
git-subtree-mainline: 59f80c20dd
git-subtree-split: 65bceef69c
2021-08-15 16:41:09 +07:00
Wilfred Hughes 59f80c20dd Add 'vendor/tree-sitter-rust/' from commit 'a360da0a29a19c281d08295a35ecd0544d2da211'
git-subtree-dir: vendor/tree-sitter-rust
git-subtree-mainline: e7a6c3b11e
git-subtree-split: a360da0a29
2021-08-15 16:33:53 +07:00
Wilfred Hughes e7a6c3b11e Initial tree-sitter prototype 2021-08-15 16:16:48 +07:00
Wilfred Hughes 44faa8472c Use the same keywords as tree-sitter-javascript 2021-08-15 15:59:28 +07:00
Wilfred Hughes 3f6032d8cc Add explicit license file 2021-08-15 15:58:21 +07:00
Wilfred Hughes 9ea12fffe6 Ignore build/ 2021-08-15 11:15:45 +07:00
Wilfred Hughes d775b1f56a Roll version 2021-08-15 11:14:45 +07:00
Wilfred Hughes 4243f9fb2b Move comment to extras to simpify main sexp rules 2021-08-15 11:08:25 +07:00
Wilfred Hughes 25d2bcd9cd Add reamde and npm run scripts 2021-08-15 11:04:34 +07:00
Wilfred Hughes 409b9f70b5 Specify author and repo 2021-08-15 10:34:56 +07:00
Wilfred Hughes 00ab8947d3 Configuring tests on GH actions 2021-08-15 10:18:05 +07:00
sogaiu 39bf0977d2 Update README 2021-08-15 13:16:31 +07:00
Wilfred Hughes 01f453ab81 Add tests for numeric literals and get them passing 2021-08-14 19:30:53 +07:00
Wilfred Hughes 8242420766 Add a basic list test 2021-08-14 19:24:45 +07:00
Wilfred Hughes 7dcb8d19df Allow symbols to start with & e.g. &optional 2021-08-14 19:22:10 +07:00
Wilfred Hughes 503e67d8b8 Support unquote splicing 2021-08-14 19:21:17 +07:00
Wilfred Hughes cdab4a34a5 Parse characters too 2021-08-14 19:19:40 +07:00
Wilfred Hughes 978e76b940 Parse INF and NaN 2021-08-14 19:17:12 +07:00
Wilfred Hughes fbd2a54e3c Float literals 2021-08-14 19:14:50 +07:00
Wilfred Hughes 05ba9caff0 Integer literals 2021-08-14 19:08:27 +07:00
Wilfred Hughes 28ff4a87fc Use tree-sitter's whitespace handling
It already provides `extras` which ignores all whitespace.
2021-08-14 18:59:34 +07:00
Wilfred Hughes 306729609e Don't treat sexp as a named item in the grammar 2021-08-14 18:50:10 +07:00
Wilfred Hughes d2ef69d84c Regenerate C code 2021-08-14 18:49:19 +07:00
Wilfred Hughes 90b83c161d Configure scope and file types 2021-08-14 18:47:55 +07:00
Wilfred Hughes b1c824c64d Support parsing vector literals 2021-08-14 18:43:26 +07:00
Wilfred Hughes 452db999d4 Expand symbol and add 'foo, #'foo, and `,foo support 2021-08-14 18:27:42 +07:00
Wilfred Hughes d9309ff78f Initial lispy grammar 2021-08-14 18:19:29 +07:00
Wilfred Hughes 527257d017 Generate C code with tree-sitter CLI 2021-08-14 17:52:54 +07:00
Wilfred Hughes 052698677b Define a skeleton grammar 2021-08-14 17:52:13 +07:00
Wilfred Hughes 90592b25c3 Initial commit 2021-08-14 17:47:34 +07:00
Martin Jambon bc2eb3994f
Merge pull request #189 from FnControlOption/destructuring-to-new-variable-with-default-value
Fix destructuring assignment to new variable with default value
2021-08-13 14:29:43 +07:00
FnControlOption cdab6a974e Fix destructuring assignment to new variable with default value 2021-08-13 08:33:48 +07:00
Wilfred Hughes 70ee1b736e Fix off-by-one that breaks empty positions at file beginning 2021-08-12 18:33:26 +07:00
Wilfred Hughes 997a2cfb8e Prefer immutable syntax references
It's fine to have mutable aliases when allocating Syntax nodes, but it
triggers clippy lints and forces us to use more explicit type
annotations.

All the data we want to mutate is behind a cell anyway, so prefer the
immutable form.
2021-08-12 18:02:55 +07:00