Created
May 24, 2022 15:42
-
-
Save lgolubyev/48a9c7a3a5958587e8773c6fd400c28b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string ParseBetterJSAlternative(string code) | |
{ | |
var regexes = [ | |
// ... | |
]; | |
var statements = explode(" ", code); | |
var tokens = new string[] {}; | |
foreach (var regex in regexes) | |
{ | |
foreach (var statement in statements) | |
{ | |
// ... | |
} | |
} | |
var ast = new string[] {}; | |
foreach (var token in tokens) | |
{ | |
// lex... | |
} | |
foreach (var node in ast) | |
{ | |
// parse... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment