-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plan to expose api #12
Comments
This is definitely I'm interested in future, but it's too early right now. The API is still changing a lot as I figure out how make a design that actually works. |
* Add failing test for negative numbers * Fix parsing of negative numbers * Rearrange assertion to avoid extra diff noise
Include leading \\ characters as anonymous nodes
* Add highlights.scm and minor grammar change * `queries/highlights.scm` added and `package.json` changed to support syntax highlight * primitive_type node made public for specific highlight case * typo fixed in grammar definition * grammar renamed 'Solidity' -> 'solidity' for consistency with other packages * ♻ implement suggested refactors from pr Wilfred#12 * add target to npm ignore * set edition back to 2018 * add cargo lock to ignore * extend rust gitignore * add lowercase to package name * build fixes * add rust build/test pipeline * just use node * install the cli * do a global cli install * add some descriptions to rust action Co-authored-by: p13nty <[email protected]>
@Wilfred has there been any progress on your thinking about this ? (sorry for the necrobump) |
@luzpaz I was the person who made the reqeust over at GNOME. https://gitlab.gnome.org/GNOME/meld/-/issues/756 I noticed this PR that adds a library interface, though that has not been looked at for well over a year. I guess this makes sense as it's not worth publishing an API for a moving target. Perhaps there is another, simple way to add difft as a backend to meld? There is a feature (experimental) where difftastic emits a simple json file with the Example below... Note this was generated a file with few characters (~15) and a tiny change. I am wondering if JSON is the best way to communicate that change information? For a large file the diff data could be massive. There are binary alternatives for arbitrary data serialisation that would be more efficient. e.g. Apache Thrift? Or maybe do it live with a socket and a virtual cursor - next/prev/print/count etc that would mean far less data to transfer. before DFT_UNSTABLE=yes target/debug/difft \
--display json \
sample_files/change_outer_before.el \
sample_files/change_outer_after.el {
"chunks": [
[
{
"lhs": {
"line_number": 0,
"changes": [
{ "start": 0, "end": 1, "content": "(", "highlight": "delimiter" },
{ "start": 14, "end": 15, "content": ")", "highlight": "delimiter" }
]
},
"rhs": {
"line_number": 0,
"changes": [
{ "start": 0, "end": 1, "content": "[", "highlight": "delimiter" },
{ "start": 1, "end": 2, "content": "(", "highlight": "delimiter" },
{ "start": 5, "end": 6, "content": ")", "highlight": "delimiter" },
{ "start": 16, "end": 17, "content": "]", "highlight": "delimiter" }
]
}
}
]
],
"language": "Emacs Lisp",
"path": "sample_files/change_outer_after.el",
"status": "changed"
}
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Put infix operators as inline within the grammar This allows us to remove 11 external scanning nodes. Tie breaking against command call & prefix is now done solely on the prefix operator. Symbolic operators are now exposed as nodes to allow syntax queries to match against them. Due to size explosion, Unicode operators are disabled. Included are some fixes for scanner flags reset on new line.
Kind declarations
Thanks for the fantastic work!
Is there any plan to expose api to other developer ? so that they could use the api create more diff tool other than only
git diff
replacer
The text was updated successfully, but these errors were encountered: