gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

Separate method types into individual GCT entries #329

Closed pavlerohalj closed 1 year ago

pavlerohalj commented 4 years ago

Currently, methodTypes are placed in a single GCT entry. We are having issues with parsing that in case there is a method types that spans multiple lines. One example of such method type, myMethWithParam, is listed below. This pull request separates each method type into an individual entry in a GCT file with a key name methodType-of:, followed by an actual method type name.

method myMethWithParam(myParam : interface{
    m(param : MyType) -> Number
    n -> String
}) -> String { myParam.n