Closed magnus-madsen closed 1 year ago
@stephentetley Would you be interested in this? (Otherwise I can ask Jakob.)
Thanks Magnus - I'd be open to trying in about two months, but I really need to get my libraries working again with Flix head so that's my immediate priority.
Of course. Sorry for all the churn. Hopefully the package manager, which arrives soon, will help a bit.
I've started looking at this and have gone through the parser and weeder so far.
Thanks Stephen! Feel free to open a PR while it's in progress.
Thanks Matthew, I've just made a WIP PR.
The PR now compiles and passes tests: #5707
Fixed in master.
Ast.Constant.Regex(java.lang.String)
class (afterStr
).ParsedAst.Constant.Regex
class.regex"string"
.Weeder
check that the string is a valid regex (by compiling it with Java).Regex
.Lowering
phase replaceAst.Constant.Regex
with anInvokeStatic
toPattern.compile
.(Later we can extend the compiler to cache the result of
Pattern.compile
somewhere.)