Comments (12)
@bjorn3 nice to know it, however, -Z
seems only for nightly.
@philberty If you just want to output the current result to a file with an option, I think it's just a few lines code. It's possible to refactor the current dump framework to support multiple dump format, and even for a different stage of the pipeline, but I don't think it's our current work. Anyway it's a good idea to add to TODO.
from gccrs.
Did you forget to close this?
from gccrs.
- Traverse AST top-down and resolve every encountered name.
- The situation that new scope should be added:
- A block enclosing with curly braces
- Let binding
- Hygiene macro
- The rustc introduced a concept of
Ribs
to include all these kinds of scopes. EachRibs
maintain its own stack for storing the scopes. I think this can be implemented by a base classScope
. Maybe we don't have to reinvent a new concept. - These items have their own namespace, so the identifier is NOT unique among them:
- Types
- Values
- Macros.
from gccrs.
The RFC for the current name resolution is: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md
from gccrs.
Oh nice! That's what we need, I googled an obsoleted result. Thanks!
from gccrs.
I think we should also add an option to dump the AST after the resolution, for debugging the resolution.
from gccrs.
I agree we can reuse the same command line option and i think dumping to file would be really helpful aswell lets makea new issue to dump to file instead of console
from gccrs.
Rustc has several versions of this: rustc -Zunpretty=help
from gccrs.
The resolution relies on macro expansion, so I'm starting to work on macros parallelly. #17
from gccrs.
Sorry for the closed issues i wanted to see if tagging commits linked them to issues but it seems to just close them instead
from gccrs.
Closing this as there is documentation available over on the wiki for name resolution
from gccrs.
Thanks, Again we are following rustc more documentation will be added to the wiki over time. See -frust-dump-all for debug outputs and this diagram.
from gccrs.
Related Issues (20)
- method / constant was impl on primitive type
- Invalid `self` import was made
- refutable pattern in local binding - `[E0005]` HOT 1
- Cannot find path `x` in this scope HOT 2
- ICE - `Copy` trait was implemented on `Drop implementation type` - [E0184] HOT 4
- missing unreachable pattern `[E0001]` warning HOT 2
- ICE - cannot mix `bin` crate type with others - `[E0601]` HOT 1
- Lexer tuple index lexed as an exponential notation
- Handle macro invocations expanding to new macro definitions HOT 2
- Invalid `repr options` error support
- Inconsistent behavior between gccrs and gccrs compiled with ASAN HOT 2
- Change `ErrorCode` location after the `error:`
- ICE - when `impl Trait` type expands to a recursive type `[E0720]`
- Legacy name mangling does not encode unicode characters
- `#[no_mangle]` should not be applied to non-ASCII items
- ErrorCode Support
- ICE when binding `richloc` to paser errors HOT 2
- ICE on match expression without any match arms HOT 1
- Fix cross compilation
- Bad uninit intrinsic
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 gccrs.