Shane Murphy
eeeaaeebcc
Fix prompt on windows ( #2986 )
...
* Fix typo
* Refactor prompt highlighting into RLHelper
By moving the prompt coloring to be done in
Highlighter::highlight_prompt, we sidestep the issue on Windows where
the prompt width is calculated post-coloring AND without ignoring escape
codes.
By including it in the implementation of Highlighter, Editor::readline
now operates on a plain-text prompt, so width calculation is correct.
This commit also re-arranges the trait impl order to match the
definition.
2 years ago
dependabot[bot]
096f65410f
Bump rustyline from 10.1.1 to 11.0.0 ( #2612 )
...
Bumps [rustyline](https://github.com/kkawakam/rustyline ) from 10.1.1 to 11.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/kkawakam/rustyline/releases ">rustyline's releases</a>.</em></p>
<blockquote>
<h2>11.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Refactor listeners by <a href="https://github.com/gwenn "><code>@gwenn</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/666 ">kkawakam/rustyline#666</a></li>
<li>Introduce History trait by <a href="https://github.com/gwenn "><code>@gwenn</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/604 ">kkawakam/rustyline#604</a></li>
<li>Fix cargo test --no-default-features by <a href="https://github.com/gwenn "><code>@gwenn</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/667 ">kkawakam/rustyline#667</a></li>
<li>Don't set height for skim by <a href="https://github.com/figsoda "><code>@figsoda</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/668 ">kkawakam/rustyline#668</a></li>
<li>Turn off skim's default features by <a href="https://github.com/figsoda "><code>@figsoda</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/669 ">kkawakam/rustyline#669</a></li>
<li>Add derive feature that reexports rustyline-derive's API by <a href="https://github.com/figsoda "><code>@figsoda</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/670 ">kkawakam/rustyline#670</a></li>
<li>docs: update branch for wez/wezterm by <a href="https://github.com/LeoDog896 "><code>@LeoDog896</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/674 ">kkawakam/rustyline#674</a></li>
<li>Upgrade to Rust edition 2021 by <a href="https://github.com/gwenn "><code>@gwenn</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/675 ">kkawakam/rustyline#675</a></li>
<li>Replace memchr::memchr by matches! by <a href="https://github.com/gwenn "><code>@gwenn</code></a> in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/676 ">kkawakam/rustyline#676</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/figsoda "><code>@figsoda</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/668 ">kkawakam/rustyline#668</a></li>
<li><a href="https://github.com/LeoDog896 "><code>@LeoDog896</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/pull/674 ">kkawakam/rustyline#674</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/kkawakam/rustyline/compare/v10.1.0...v11.0.0 ">https://github.com/kkawakam/rustyline/compare/v10.1.0...v11.0.0 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0384654d42
"><code>0384654</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/issues/682 ">#682</a> from gwenn/11.0.0</li>
<li><a href="a63a2494c5
"><code>a63a249</code></a> Prepare next release</li>
<li><a href="36f2739011
"><code>36f2739</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/issues/680 ">#680</a> from figsoda/unsorted</li>
<li><a href="5486779fef
"><code>5486779</code></a> Add FilenameCompleter::complete_path_unsorted</li>
<li><a href="b71975d9ea
"><code>b71975d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/issues/679 ">#679</a> from figsoda/clone</li>
<li><a href="792a828c94
"><code>792a828</code></a> Implement Clone for Pair</li>
<li><a href="1986b16a43
"><code>1986b16</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/issues/676 ">#676</a> from gwenn/memchr-to-matches</li>
<li><a href="c75f56de4d
"><code>c75f56d</code></a> Replace memchr::memchr by matches!</li>
<li><a href="45b9e3d3c2
"><code>45b9e3d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/kkawakam/rustyline/issues/675 ">#675</a> from gwenn/edition</li>
<li><a href="6830d8ae48
"><code>6830d8a</code></a> Fix clippy warning on windows</li>
<li>Additional commits viewable in <a href="https://github.com/kkawakam/rustyline/compare/v10.1.1...v11.0.0 ">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustyline&package-manager=cargo&previous-version=10.1.1&new-version=11.0.0 )](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Co-authored-by: jedel1043 <jedel0124@gmail.com>
2 years ago
José Julián Espina
cc45a827ca
Cleanup inline annotations ( #2493 )
...
Per the [Standard Library development guide](https://std-dev-guide.rust-lang.org/code-considerations/performance/inline.html ):
> You can add `#[inline]`:
>
> - To public, small, non-generic functions.
>
> You shouldn't need `#[inline]`:
> - On methods that have any generics in scope.
> - On methods on traits that don't have a default implementation.
>
> `#[inline]` can always be introduced later, so if you're in doubt they can just be removed.
This PR follows this guideline to reduce the number of `#[inline]` annotations in our code, removing the annotation in:
- Non-public functions
- Generic functions
- Medium and big functions.
Hopefully this shouldn't impact our perf at all, but let's wait to see the benchmark results.
2 years ago
Iban Eguia
748465d17b
Unwrap removal ( #1842 )
...
This removes all the calls to `unwrap()` in the codebase, which made me found a couple of places where it wasn't needed, and could be improved. I also noticed we don't have dependabot updates for the test262 submodule and the interner dependencies, so I added those.
I added lints so that no new unwraps are added.
3 years ago
Iban Eguia
60b7eb8934
General code clean-up and new lint addition ( #1809 )
...
This PR adds some Clippy lints. Mainly, it adds the list of pedantic lints excluding some lints that were causing too many warnings. I also denied some useful restriction and pedantic lints, to make sure we use `Self` all the possible times (for better maintainability), and that we pass elements by reference where possible, for example, or that the documentation is properly written.
This might even have some small performance gains.
I also added a perfect hash function for the CLI keywords, which should be more efficient than a `HashSet`. This is something we could use elsewhere too.
3 years ago
João Borges
505a2ddaf6
Style: Respect the new lints from 1.51 ( #1194 )
4 years ago
Iban Eguia
ba84f526de
Added syntax highlighting for numbers, identifiers and template literals ( #1047 )
...
* Added syntax highlighting for numbers, identifiers and template literals
* Update boa_cli/src/helper.rs
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
* Update boa_cli/src/helper.rs
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
4 years ago
Halid Odat
6eac058406
Code cleanup and inline ( #916 )
...
* use gc module
* Added #[inline]
* Change context valiable names to context
* Fix test262
* Update test262 submodule
* Fix: Switch interpreter for context
Co-authored-by: João Borges <rageknify@gmail.com>
4 years ago
HalidOdat
4474b714b2
Added syntax highlighting for strings ( #595 )
4 years ago