parapluu / encore

The Encore compiler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prettyprinting FunctionHeader does not include default parameters

Thizizmyname opened this issue · comments

Make sure the following boxes are checked before creating an issue:

  • prettyprinting of a function-header does not determine if a default value is provided and ignores it upon output
  • On development
  • Example:
active class Main

    def foo(i1 : int, i2 : int, i3 : int = 5) : unit
        ()
    end

    def main() : unit
        this.foo(10)
    end
end

Gives the following prettyprinted AST:

active class Main
  def main() : unit
    this.foo(10)
  end
  def foo(i1 : int, i2 : int, i3 : int) : unit
    ()
  end
end