Comments (4)
Hi @elfring! I take it you're familiar with spatch [1, 2], so something like that? This is possible; there are a couple of things to think about compared to, say, spatch
, and maybe you can offer your thoughts. Perhaps at the simplest level, for a patch language in comby
there wouldn't be a block (delimited by @@..@@
for identifiers, and instead just use comby
s metasyntax (holes) directly in patch lines, like:
// some context
- foo(:[1])
+ foo(:[1])
more context
The other part to consider is the separation of the rule language, and how that would be syntactically delineated or supported. Perhaps initially this just wouldn't be supported.
Overall, as a basic or experimental feature, this should be quite easy to support.
I can think of some good reasons why having a diff
-like representation would be useful, but I'm curious to hear how this would specifically help your use case?
from comby.
I take it you're familiar with spatch …
You can see from published development activities that I am working also with the semantic patch language (Coccinelle software) for a few years.
I can think of some good reasons why having a
diff
-like representation would be useful,
I suggest to take another look at variants for further possible change specifications.
- Example 1:
// some context -foo +update (:[1]) more context
- Example 2:
-foo(:[1]) action() +foo(:[1])
but I'm curious to hear how this would specifically help your use case?
- You chose to use the term “rewrite template”. I would prefer the wording “generation template”.
- I propose to take more possibilities into account so that the specification of duplicate contents can be avoided in this data structure.
from comby.
I am working also with the semantic patch language
Well, good to meet you :)
duplicate contents can be avoided in this data structure
Makes sense to me. So, there are a couple of things that are roughly described in the roadmap document that I'd like to prioritize. I'm happy to add the diff specification as a feature request, and it does not seem too difficult. It might be a while until I can get to work on it though. You are of course very welcome to hack on and contribute something like this.
Sound good if I put this on the ROADMAP and I'll get to it once I have some more time?
from comby.
I am struggling with software development challenges also together with the programming language “OCaml".
So I tend to pick opportunities up for improvements in other areas.
from comby.
Related Issues (20)
- Matching a non-empty pattern HOT 2
- comby 1.8.1 failed to build against ocaml 5.0.0 HOT 4
- builds for arm64 HOT 2
- Only first match is located HOT 1
- Keep getting Exception: (Sys_error "xxxx.swift: Read-only file system
- A match expression followed by a rewrite expression using a named whitespace matcher produces unexpected output
- Difficulties connecting to comby.dev HOT 4
- Support glibc 2.28 HOT 1
- Comby support for OCaml? HOT 3
- Comby Image not supporting configuration files(.TOML) HOT 1
- [non-issue] What's Omega matcher engine? HOT 1
- Unicode character in match template appears to break matching/behaves as wildcard HOT 1
- Case of comby not being compatible with .csproj-file
- Comby doesn't work correctly with a single quote in html HOT 1
- Typescript/Javascript expressions embedded in template strings not recognized
- comby.live is missing version information HOT 2
- A
- A
- Allow specification of `matcher` for patterns in TOML config file HOT 1
- The get-comby.netlify.app script installs an old version of Comby HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comby.