plow-technologies / inferno

A statically-typed functional scripting language
MIT License
4 stars 1 forks source link

[perf] Refactor parsing of tuples and prefix ops #28

Closed siddharth-krishna closed 1 year ago

siddharth-krishna commented 1 year ago

This PR improves the speed of parsing parenthesised expressions. For example:

let x = ((((((((2)))))))) in x + 1

currently takes 30s to parse! This PR refactors parsing of tuples and prefix ops so that the parser does less backtracking, and parses the example in 0.1s.