Comments (1)
The structure first implemented as part of this issue has already improved the conversion process. However, after adding further nodes to the API and adding more conversion code, some limitations came up. For this reason, I'll once again try to restructure the driver code. The goal is to:
- Have consistent naming conventions (Currently, there are functions similar functions starting with different prefixes
to_
,to_api
,conv_
) - Avoid passing
cx
around everywhere, I'll most likely use a single conversion struct for everything - Define how the translation layer should usually be structure
- Cleanup lifetimes, mostly avoiding
'hir
if it's not needed - Change location of the
Storage
struct - Cut clear boundaries, where conversion functions should be located
And probably other things I can't think of, rn. This comment is basically a new start for this issue.
Small side note, for those who are interested. I think one reason, why the structure is messy, is that I have no reference project. I know that rustc has a similar component to lower the AST to HIR. However, I also find that code messy. This trial and error, is not a bad thing as it makes me learn and enables me to reason, why something is better than the other. But it sadly takes time, which could be spent on expanding the API more
from marker.
Related Issues (20)
- [Feat]: Provide a way to automatically fix lints with `--fix` flag HOT 2
- Use consistent naming `fn pat()` vs `fn pattern()`
- [Bug]: `marker_uitest` doesn't work in a workspace with rust-toolchain.toml file that uses `1.71` HOT 1
- [Bug]: Marker panics when the item identifier from macro expansion is debug-printed.
- [Bug]: Maker panics if the trait from `std` is requested via `ctx.ast().item()` HOT 2
- `FnItem::ident()` should return `Ident` instead of `Option<Ident>`
- [Feat]: Make `cargo test --doc` work with the lint crates to doc test examples HOT 2
- [Feat]: Add a method to check if type implements a trait HOT 2
- Chore: Bump nightly -> 2023-12-28
- [Bug]: `cargo marker setup --auto-install-toolchain` fails with E0554 `#[feature]` on stable channel HOT 14
- [Bug]: `cargo uitest` fails with `[E0463]: can't find crate for std` HOT 11
- [Panic]: broken on_unimplemented "{float}{_Self}{crate_local}{Trait}{ItemContext}" for <() as Baz>: no argument matching "crate_local
- [Panic]: `&MarkerConverterInner::lang_item_map` doesn't contain `TryTraitFromOutput
- [Panic]: assertion failed: 4 == 3
- [Panic]: unimplemented: type aliases / assoc type bounds
- [Panic]: not implemented: lifetimes?
- [Panic]: `this should be a literal expression Expr {`
- [Panic]: None / expected fulfillment errors
- [Panic]: no type for local variable
- [Panic]: unreachable HOT 2
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 marker.