You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.
I'm working on the parser and many of the language's features seem to be lacking sample code. Examples:
In CallArgument:
["[| expression |]", n("$$ = new yy.Quoted($2);")],
In Type Function:
["FUNCTION ( optTypeFunctionArgList )", "$$ = new yy.TypeFunction($3);"],
(Aha, I see an example of [| |] in examples/macro.roy...)
It would be very helpful to have a thorough and unified set of test cases. Also, you/we might merge most of examples/ into tests/ since many examples would be useful as tests, too. examples/ should probably hold larger pieces of code that demonstrate the overall language.
I'm happy to do this task if you think it would be beneficial.
The text was updated successfully, but these errors were encountered:
I stuffed up a while ago and tried writing my own test runner for Roy instead of using an existing one.
I need to start testing the non-happy paths and more of the compiler internals. I'll start doing that in the coming months - any improvements in the meantime are greatly welcomed.
I think that this is related: Some of the example code itself is broken:
data Either a b =
Left a | Right b
let printString (s: String) =
console.log s
let printResult e = match e
case (Left x) = console.log x
case (Right x) = printString x
printResult (Left 10)
printResult (Right "Error")
// Won't compile:
printResult (Right 10)
actually compiles fine.
Do we need some kind of test runner that goes through the examples and uncomments each "// Won't compile" block in turn and makes sure it doesn't compile?
I'm working on the parser and many of the language's features seem to be lacking sample code. Examples:
(Aha, I see an example of [| |] in examples/macro.roy...)
It would be very helpful to have a thorough and unified set of test cases. Also, you/we might merge most of examples/ into tests/ since many examples would be useful as tests, too. examples/ should probably hold larger pieces of code that demonstrate the overall language.
I'm happy to do this task if you think it would be beneficial.
The text was updated successfully, but these errors were encountered: