monte-language / typhon

A virtual machine for Monte.
Other
67 stars 10 forks source link

monte QL doesn't handle $lhs in def #183

Closed dckc closed 7 years ago

dckc commented 7 years ago

This seems to be the underlying cause of #182:

exports (main)

def main(_argv) as DeepFrozen:
    def builder := ::"m``".getAstBuilder()
    def n := "x"
    def lhs := builder.FinalPattern(builder.NounExpr(n, null), null, null)
    def rhs := builder.LiteralExpr(2, null)
    # BUGGY:  def expr := m`def $lhs := $rhs`
    def expr := builder.DefExpr(lhs, null, rhs, null)
    traceln(`win! $expr`)
 ~ Problem: m`${expr-hole 0}`'s type ("ValueHoleExpr") is not one of ["NounExpr", "TempNounExpr"]
dckc commented 7 years ago

This was fixed some time before 2c39756.