Alberto González Palomo
bc0d53d4f0
Clarify where to put cc dependency for build script. ( #586 )
2020-03-30 09:43:41 -07:00
Max Brunsfeld
f453178ca2
rust: Remove unnecessary dependencies from core library
2020-03-16 14:46:05 -07:00
Max Brunsfeld
d0325579ad
Use Arc to avoid use-after-free in threaded cancellation unit test
...
Fixes #579
2020-03-16 14:46:05 -07:00
Luca Barbato
21de99de87
Remove non-building doctests ( #578 )
2020-03-16 14:35:27 -07:00
Max Brunsfeld
e3aad995f6
query: Fix handling of patterns with wildcards at the root
2020-03-11 13:14:16 -07:00
Max Brunsfeld
741eed01b7
query: Handle escape sequences and escaped quotes in string literals
2020-03-10 15:50:06 -07:00
Max Brunsfeld
fc4d5c3a33
🔥 Dead test code
2020-03-10 12:23:13 -07:00
Max Brunsfeld
7f4828254f
Fix criteria for detecting when an aborted parse is resuming
2020-03-09 11:30:08 -07:00
Alexander Eyers-Taylor
5670dd6705
Add QL to the playground ( #558 )
2020-03-03 13:46:20 -08:00
Max Brunsfeld
75a910229b
web: 0.16.2
2020-03-02 15:05:50 -08:00
Mark Schmitz
b1c7768cc2
Output also HTML_FOOTER with highlight --html ( #550 )
...
* Output also HTML_FOOTER with highlight --html
* move html footer output after end of for loop, as only one closing tag
is needed
2020-03-02 15:04:15 -08:00
Max Brunsfeld
078cab3f96
rust: 0.6.3
2020-03-02 15:02:45 -08:00
Max Brunsfeld
31f3e866cf
📝 Add comment for non-terminal extra edge case
2020-03-02 14:21:03 -08:00
Max Brunsfeld
ee46218a73
Fix incremental parsing problem with non-terminal extras
...
Also add PHP grammar as a fixture to test against.
2020-03-02 14:17:12 -08:00
Max Brunsfeld
415053213f
web: 0.16.1
2020-03-02 12:48:00 -08:00
Max Brunsfeld
e259af6a4e
0.16.5
2020-03-02 12:41:22 -08:00
Max Brunsfeld
f2e9e3b3f2
docs: Link to semantic dir instead of codegen PR
2020-03-02 09:38:25 -08:00
Max Brunsfeld
048b8c87a7
Merge pull request #561 from ubolonton/fix-out-of-bounds-access
...
Fix out-of-bounds array access in `Language` APIs
2020-02-27 09:27:18 -08:00
Max Brunsfeld
824b7d65fe
Merge pull request #562 from ubolonton/static-field-name
...
Mark the return value of TreeCursor::field_name static
2020-02-27 09:26:35 -08:00
Tuấn-Anh Nguyễn
5f68fba61c
Mark the return value of TreeCursor::field_name static
2020-02-27 22:36:13 +07:00
Tuấn-Anh Nguyễn
23261c4f6f
Make ts_language_symbol_name return NULL for out-of-bound ids
2020-02-27 22:24:00 +07:00
Tuấn-Anh Nguyễn
c719e24a45
Make ts_language_field_name_for_id return NULL for out-of-bound id
2020-02-27 21:19:08 +07:00
Max Brunsfeld
a578ba54c4
Merge pull request #556 from tree-sitter/dependabot/bundler/docs/nokogiri-1.10.8
...
build(deps): bump nokogiri from 1.8.2 to 1.10.8 in /docs
2020-02-25 09:06:46 -08:00
dependabot[bot]
8c95c7648b
build(deps): bump nokogiri from 1.8.2 to 1.10.8 in /docs
...
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri ) from 1.8.2 to 1.10.8.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases )
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.2...v1.10.8 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-02-25 09:57:14 +00:00
Max Brunsfeld
6cb8d24de2
Merge pull request #542 from SKalt/issue-524-document-supertypes-in-grammar-schema
...
feat(cli): documented optional supertypes string[] in grammar schema
2020-02-24 16:14:49 -08:00
Steven Kalt
d82ee739e9
Update cli/src/generate/grammar-schema.json
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@github.com>
2020-02-24 18:13:38 -05:00
Max Brunsfeld
3cd05a3d0c
Link to Semantic in node-types docs
2020-02-24 11:21:05 -08:00
Max Brunsfeld
f1e4104d47
Document supertypes and the node-types file
...
References #542
References #524
Closes #393
2020-02-24 11:12:42 -08:00
Max Brunsfeld
96c060fc6d
wasm: Fix typo in Node.typeId
2020-02-21 17:06:07 -08:00
Max Brunsfeld
8addcf7604
Merge pull request #538 from tree-sitter/syntax-highlighting-docs
...
Syntax highlighting docs
2020-02-21 13:11:53 -08:00
Max Brunsfeld
8d26da7b03
Add highlight subcommand to docs section w/ all subcommands
2020-02-21 13:11:40 -08:00
Max Brunsfeld
a76a232485
Add unit testing docs
2020-02-21 12:58:41 -08:00
Max Brunsfeld
709ddfebe9
docs: Add explanation of syntax highlighting configuration for CLI
2020-02-21 11:39:27 -08:00
Max Brunsfeld
1ce42a04a7
Add docs about injection query properties
2020-02-20 15:34:35 -08:00
Max Brunsfeld
17071267e3
docs: Start work on docs for injection queries
2020-02-20 14:38:37 -08:00
Max Brunsfeld
cf80f094ac
docs: Expand local variable highlighting section
2020-02-20 09:35:46 -08:00
Max Brunsfeld
360b188644
cli: Handle 'underline' styling when highlighting w/ HTML output
2020-02-20 09:35:46 -08:00
Max Brunsfeld
92f060303c
docs: First draft of highlight query section, start local var section
2020-02-20 09:35:46 -08:00
Max Brunsfeld
2a8860542c
Add intro to syntax highlighting docs
2020-02-20 09:35:46 -08:00
Max Brunsfeld
579b8e8d28
Rename files to make room for syntax highlighting section
2020-02-20 09:35:46 -08:00
Max Brunsfeld
33492ca9df
query: Add not-eq? predicate in rust & wasm binding
2020-02-19 21:36:30 -08:00
Max Brunsfeld
f67c0526fd
Merge pull request #549 from tree-sitter/query-dot-operator
...
Add an 'immediate child' operator in queries
2020-02-19 13:24:25 -08:00
Max Brunsfeld
570b83e2b2
query: Add immediate child operator
2020-02-19 11:47:52 -08:00
Max Brunsfeld
950a89a525
query: Differentiate between wildcard '*' and named wildcard '(*)'
2020-02-19 09:42:29 -08:00
Max Brunsfeld
1d6ea51b63
query: Make * operator only match named nodes
2020-02-18 21:32:52 -08:00
Max Brunsfeld
55edafa946
Merge pull request #548 from alyssaverkade/add-explicit-language-linkage-to-parsers
...
Add a language linkage declaration to parsers
2020-02-18 21:24:53 -08:00
Alyssa Verkade
0e689657b7
Add a language linkage declaration to parsers
...
Previously, in order to compile a `tree-sitter` grammar that contained
c++ source in the parser (ie the `scanner.cc` file), you would have to
compile the `parser.c` file separately from the c++ files. For example,
in rust this would result in a `build.rs` close to the following:
```
extern crate cc;
fn main() {
let dir: PathBuf = ["tree-sitter-ruby", "src"].iter().collect();
cc::Build::new()
.include(&dir)
.cpp(true)
.file(dir.join("scanner.cc"))
// NOTE: must have a name that differs from the c static lib
.compile("tree-sitter-ruby-scanner");
cc::Build::new()
.include(&dir)
.file(dir.join("parser.c"))
// NOTE: must have a name that differs from the c++ static lib
.compile("tree-sitter-ruby-parser");
}
```
This was necessary at the time for the following grammars: `ruby`,
`php`, `python`, `embedded-template`, `html`, `cpp`, `ocaml`,
`bash`, `agda`, and `haskell`.
To solve this, we specify an `extern "C"` language linkage declaration
to the functions that must be linked against to compile a parser with the
scanner, making parsers linkable against c++ source.
On all major compilers (gcc, clang, and msvc) this should be the only
change needed due to the combination of clang and gcc both supporting
designated initialization for years and msvc 2019 adopting designated
initializers as a part of the C++20 conformance push.
Subsequently, for rust projects, the necessary `build.rs` would become
(which also brings these parsers into sync with the current docs):
```
extern crate cc;
fn main() {
let dir: PathBuf = ["tree-sitter-ruby", "src"].iter().collect();
cc::Build::new()
.include(&dir)
.cpp(true)
.file(dir.join("scanner.cc"))
.file(dir.join("parser.c"))
.compile("tree-sitter-ruby");
}
```
2020-02-18 19:46:59 -08:00
Max Brunsfeld
1217f58b8d
rust: 0.6.2
2020-02-17 22:37:12 -08:00
Steven Kalt
c5ca259d09
feat(cli): documented optional supertypes Array<string> in grammar-schema.json
2020-02-15 11:23:14 -05:00
Max Brunsfeld
b2e79f6438
rust: In queries, allow set! w/ capture and constant
2020-02-14 20:50:07 -08:00