metaborg / rust-scopegraphs

Scope Graph Implementation in Rust
https://github.com/metaborg/rust-scopegraphs
MIT License
20 stars 0 forks source link

Standard Usage Patterns #17

Open jdonszelmann opened 2 months ago

jdonszelmann commented 2 months ago

How do you do certain things in scopegraphs?

AZWN commented 2 months ago

Some other ideas:

AZWN commented 2 months ago

Perhaps also type inference (unification variables in scope graph declarations)

AZWN commented 2 months ago

We should have examples for sequenced and non-sequenced structures. For example, what is a scope graph for the program in which imports open over the subsequent scope:

mod A {
  def x = v + 2 n
  import B
  mod B {
    def w = x * 2
  }
  def y = w + 1
  def v = 1
}

mod C {
  val z = A.y * A.B.w
}