Commit Graph

25 Commits

Author SHA1 Message Date
Andrew Dupont
b9ee65f6a3 Add extensive comment delimiter metadata to most built-in grammars 2024-04-06 13:00:55 -07:00
Andrew Dupont
93ab0f7bf0 Convert all modern Tree-sitter TODO/hyperlink injections into services 2024-01-18 13:53:22 -08:00
confused-Techie
1d00fe2368 Manual decaf language-toml 2023-08-23 17:19:42 -07:00
confused-Techie
3babc9ab42 language-toml spec 2023-08-22 20:51:26 -07:00
confused_techie
5fb4284eb2
Merge pull request #646 from arite/master
[language-toml] Add whitespace rule to values
2023-07-25 16:38:43 -07:00
Andrew Dupont
c8cbd82518 Overhaul Tree-sitter scope tests
I realized a few days ago that the `#is?` and `#is-not?` predicates — which
puzzled me upon first investigation back in February, and which I'd ignored ever
since — are exactly what I should've been using all along for scope tests.

They are counterparts to `#set!` in that they are two additional buckets in
which to store arbitrary data. And they remove the need to have both
`test.onlyIfFoo` and `test.onlyIfNotFoo`, since the presence of `test.onlyIfFoo`
in the `refutedProperties` bucket can behave opposite to the its presence in the
`assertedProperties` bucket.

This further means that a test called `test.onlyIfFoo` can be renamed
`test.foo`. The `onlyIf` was my way of making it clear through context that this
`#set!` predicate actually enforced a criterion — but that's implicit now that
it'll be using an `#is?` or `#is-not?` predicate.

I also took the opportunity to move `test.final` and `test.shy` to their own
namespace. `final` is an oddball in the sense that it sets criteria for _other_
captures as well as its own, and they're both oddballs in the sense that they
consider the effects of other captures on the same range. And I don't want to
introduce the idea that a predicate like `#is?` can have side effects.

So they stay on `#set!` and live at `capture.final` and `capture.shy`,
respectively.

To summarize, here's a before and after:

  ((string "\"" @punctuation.start)
    (#set! test.onlyIfFirst true)
    (#set! test.final true)

  ((bar) @baz
    (#set! test.onlyIfNotDescendantOfType thud))

becomes

  ((string "\"" @punctuation.start)
    (#is? test.first true)
    (#set! capture.final true)

  ((bar) @baz
    (#is-not? test.descendantOfType thud))

This PR changes all the built-in grammars. I don't know if there are any
third-party modern-Tree-sitter grammars out there except for mine, but I've
added a simple compatibility layer so that all of the old predicates should
still work for now. But I'm going to remove that code before we ship this stuff
for real.
2023-07-20 15:17:01 -07:00
arite
10a5c08c26
[language-toml] Add whitespace rule to values
Add `whitespace` rule to `values` to prevent multi-line arrays from
being marked as invalid. Remove whitespace regex from array rule.
2023-07-17 13:06:08 +01:00
Andrew Dupont
fc156b3a96
Merge pull request #617 from savetheclocktower/tree-sitter-toml
[modern-tree-sitter] Add TOML tree-sitter grammar
2023-06-29 20:38:15 -07:00
Andrew Dupont
7240ea74f7 Disable tree-sitter mode for existing specs 2023-06-29 14:06:28 -07:00
Andrew Dupont
fb59123f73 Add TOML tree-sitter grammar
Broadly similar to the TM-style grammar. A folds query is present to match the
folding behavior that I observe in that grammar, but no indents query is present
because indentation is not mandated or prohibited by the TOML spec and is
entirely a stylistic preference.
2023-06-29 10:31:55 -07:00
confused-Techie
4d2481694b Allow spaces at points in array 2023-06-25 23:46:46 -07:00
confused_techie
2eab519e23
Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js
add or update `packages/*/package-lock.json`
2022-12-13 18:21:25 -08:00
confused_techie
8dac21178f
Merge pull request #190 from Daeraxa/pkg-brand-licence
Re-brand and re-licence core packages
2022-12-10 18:36:17 -08:00
Sertonix
aecb3cc5c3 add or update packages/*/package-lock.json 2022-12-10 19:13:50 +01:00
confused_techie
61d85c19a8
Merge branch 'master' into remove-coffeelint 2022-12-03 20:45:45 -08:00
Daeraxa
e5c40b5f35 rebrand and relicence 2022-12-03 02:46:08 +00:00
confused_techie
4359a15530
Merge pull request #157 from Sertonix/cleanup-packages-package.json
cleanup `packages/*/package.json`
2022-11-28 00:34:37 -08:00
confused_techie
c15f52be3f
Merge pull request #161 from Sertonix/remove-packages-readme-badges
remove badges `packages/*/README.md`
2022-11-21 19:36:26 -08:00
Sertonix
d9e092f16f remove badges from packages readme 2022-11-19 23:43:16 +01:00
Sertonix
457f1c90cb cleanup packages package.json 2022-11-19 17:06:46 +01:00
Sertonix
dc38473c26 remove packages ci 2022-11-19 16:37:54 +01:00
Sertonix
74f2f6d339 remove packages no-response.yaml 2022-11-19 16:21:08 +01:00
Sertonix
fdb78ea44c remove coffeelint 2022-11-19 16:10:43 +01:00
Sertonix
c131849694 remove unused .md 2022-10-28 12:48:13 +02:00
steven nguyen
477b075db5 ➡️ Migrate all language packages
To make https://github.com/atom-community/atom/pull/386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](https://github.com/atom/atom/issues/22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
2022-06-25 19:58:57 +00:00