Commit Graph

10555 Commits (beacd69dd27f26bdb4c19c8806a786098ff05a06)
 

Author SHA1 Message Date
Wilfred Hughes 5c19ac600d Fix duplicate newlines when a whole file is novel
Broken in trunk but works fine in 0.29.1. Fixes #302
2022-06-29 21:36:52 +07:00
Jonathan Arnett 85c0753e8e Version 0.22.1 2022-06-29 21:57:03 +07:00
Jonathan Arnett 08901b401c Version 0.22.0 2022-06-29 21:57:03 +07:00
Jonathan Arnett ac8c9438f8 Add scanner.c to files to be compiled for release 2022-06-29 21:57:03 +07:00
lilydjwg c72626808f use unicode-width to align CJK characters 2022-06-26 21:51:26 +07:00
lilydjwg f88cb8c018 fix that continuation line numbers (....) are colored when colors should not be used 2022-06-26 21:12:07 +07:00
Logan Wemyss 45ce22c16e Generate bindings 2022-06-23 20:50:13 +07:00
Jonathan Arnett ed604993ba
Forbid anonymous function parameter labels (#34)
Corresponds to gleam-lang/gleam#1629
2022-06-20 13:13:52 +07:00
Pieter Goetschalckx cc26b1ef11
Cache examples in Github workflow 2022-06-19 21:41:43 +07:00
Pieter Goetschalckx dcc477e3c2
Bump rust version and add test (#58)
* Update .gitignore

* Update README

* Update rust docs

* Bump rust version

* Add rust test
2022-06-19 21:36:54 +07:00
Wilfred Hughes 79ad6b7ed2 Move split_on_newlines tests to the defining file 2022-06-19 15:30:34 +07:00
Pieter Goetschalckx bcad5b2630
Bump tree-sitter to 0.20 2022-06-18 23:00:30 +07:00
Pieter Goetschalckx b1af6f443b
Update, add and fix tests 2022-06-18 22:59:36 +07:00
Torsten Schmits 14bf3061a3
bump tree-sitter in Cargo.toml (#85)
* bump tree-sitter is Cargo.toml

* Update Cargo.toml

Co-authored-by: Logan Wemyss <62594135+VixieTSQ@users.noreply.github.com>

* regenerate bindings

Co-authored-by: Logan Wemyss <62594135+VixieTSQ@users.noreply.github.com>
2022-06-17 15:14:50 +07:00
Logan Wemyss e91d3a3762 highlights.scm and locals.scm exist, so uncomment them 2022-06-16 11:42:31 +07:00
Wilfred Hughes bef61be1ab cargo fmt 2022-06-15 16:39:55 +07:00
Wilfred Hughes 6c45e74220 Move split_on_newlines to the lines module 2022-06-15 16:38:26 +07:00
Wilfred Hughes 4e6eb1de42 Document the trailing newline behaviour for split_on_newlines 2022-06-15 16:31:17 +07:00
Wilfred Hughes 3147eb8e6a Prefer splitting source by newline once
This is a small performance reduction (0.2% increase in instruction
count for the file in #293) but simplifies the code and ensures we're
splitting with the same logic everywhere.
2022-06-15 16:24:23 +07:00
Wilfred Hughes 6ade73138c Skip printed lines when computing hunk matched lines
This function is hot for textual diffs, such as the sample files in
issue #293. For those files, this produces a 21% reduction in
instruction count.
2022-06-15 01:07:25 +07:00
Wilfred Hughes 95ba06ab23 Remove pointless vec copy 2022-06-13 22:34:40 +07:00
Wilfred Hughes 1c9e05ed0c Ignore generated flamegraphs 2022-06-13 21:52:12 +07:00
Wilfred Hughes ed168635c9 Use 32-bit integers for line numbers
This saves 16% time, 18% memory and 1% instruction counts from the
sample files in #293. These are large files, treated as textual diffs,
so reducing the storage per-line is significant. Files with structural
diffing, such as sample_files/slow_before.rs, are unchanged.

Fixes #293
Closes #297
2022-06-13 21:47:19 +07:00
Wilfred Hughes 5d5eaea84e Store column numbers as a u32
It's reasonable to assume that a single column won't exceed four
billion, and this is a small speedup (1% instruction count reduction
on the sample file in #293).
2022-06-13 21:26:02 +07:00
Wilfred Hughes e48c27cfb9 Next release will be 0.30 2022-06-13 16:51:16 +07:00
Wilfred Hughes 17f98a7f4d Next release will be 0.29.1 2022-06-13 16:49:55 +07:00
Wilfred Hughes ae42762a6d Fix mimalloc perf regression in 57a4b6d6ce
It looks like we were allocating large buffers for wu-diff, and
mimalloc performance is much worse for this case in the new version.

This reverts performance back to that 0.28 for large files,
such as the example in #297.
2022-06-13 02:02:01 +07:00
Wilfred Hughes 84dfcd8b5b Only consider the first 1,000 bytes in binary file detection
This is sufficient, and we were spending a lot of time in this
function in the sample files from #297.
2022-06-12 23:45:00 +07:00
Wilfred Hughes e369f5b53f Mention performance improvements 2022-06-09 10:19:20 +07:00
Wilfred Hughes dd80e58640 Roll version 2022-06-09 10:12:46 +07:00
Michael Davis 7b7628230e
add integration test CI (#32) 2022-06-08 18:32:26 +07:00
Patrick Thomson a935608722 Ensure external_scanner_scan returns false for unrecognized tokens
I noticed that clang++ warned here: 
```
deps/tree-sitter-gleam/src/scanner.c:28:1: warning: non-void function does not return a value in all control paths
```

An explicit return fixes things up.
2022-06-08 17:32:27 +07:00
Michael Davis a2e5b69f51 Generate parser 2022-06-08 03:55:36 +07:00
Michael Davis 8bde531227
parse floats with no trailing digits (#31)
floats may have a trailing dot with no trailing digits, like in
the float stdlib module:

    pub fn absolute_value(x: Float) -> Float {
      case x >=. 0. {
        True -> x
        _ -> 0. -. x
      }
    }
2022-06-07 23:55:19 +07:00
Kolja Lampe a9a8efad44 Prepare 5.6.0 2022-06-07 23:23:33 +07:00
dependabot[bot] ca0a13f1ac
Bump regex from 1.5.4 to 1.5.6 (#81)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.6)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 23:15:37 +07:00
Michael Hoffmann a4164c4086
playground: fix typo 2022-06-05 12:46:00 +07:00
Michael Hoffmann 236e5b286f playground: initial version 2022-06-05 12:41:49 +07:00
Michael Hoffmann 4ff21306a7
changelog: mark as released 2022-06-02 20:13:06 +07:00
Michael Hoffmann a87b709739 fix: allow empty string literals 2022-06-02 20:12:15 +07:00
Sergio A. Vargas fc60b7cce8
Update operators and identifiers (#34)
- Add more operator types:
  - Bitshift
  - Rational
  - "Dotty"
- Fix unary operators:
  - Add broadcasting dots
  - Allow unary operators as variables
  - Parse <unary-op><array> as a unary_expression (not an index
    expression)
- Fix pipe typos (femtolisp uses pipes as raw symbol delimiters).
- Simplify `binary_expression` rule.
- Make assignment, binary and unary operators visible. Operators that
  have their own rules (pair, range) are not made visible.
- Use unicode categories instead of character ranges for valid
  identifiers. It allows more characters, and removes some invalid ones.
- Update tests.
2022-05-31 14:11:51 +07:00
Max Brunsfeld 03b5a92cb0 Use node 16 on CI 2022-05-31 14:07:03 +07:00
Max Brunsfeld d078a2ef7b Add GH actions status badge to README 2022-05-31 14:02:19 +07:00
Max Brunsfeld e8a1974645 Add GH actions config 2022-05-31 13:58:42 +07:00
Damien Guard 9c494a503c
Various fixes (#226)
* Remove label_name not in official grammar"

* Add some missing fields

* Fix lambda modifiers
2022-05-30 17:23:01 +07:00
Lukas Pistrol 49716ffc11
add spm support (#227) 2022-05-30 16:39:02 +07:00
Kolja Lampe eb40b20371
Add dependabot.yml 2022-05-30 17:35:02 +07:00
Yoann Padioleau ac14b4b188
Merge pull request #113 from lukepistrol/feature/spm
Swift Package Manager
2022-05-30 15:48:08 +07:00
Lukas Pistrol 13e1bf963e added excludes 2022-05-30 01:35:55 +07:00
Lukas Pistrol 4abc8854c7 added spm support 2022-05-30 01:21:11 +07:00