3 ms·
Here are my string-to-sexpr [0] parser and sexpr-to-ast parser [1] for the text format. There are some oddities such as forward function names and the fact that
by kodablah 9y ago
Here are my string-to-sexpr [0] parser and sexpr-to-ast parser [1] for the text format. There are some oddities such as forward function names and the fact that the binary form doesn't have a lot of these shortcuts, but overall it is very straightforward.
0 - https://github.com/cretz/asmble/blob/e9cdfc3b0feafc3d4f76b9de5f6c71d1b6bcb9b0/compiler/src/main/kotlin/asmble/io/StrToSExpr.kt https://github.com/cretz/asmble/blob/e9cdfc3b0feafc3d4f76b9d... 1 - https://github.com/cretz/asmble/blob/e9cdfc3b0feafc3d4f76b9de5f6c71d1b6bcb9b0/compiler/src/main/kotlin/asmble/io/SExprToAst.kt https://github.com/cretz/asmble/blob/e9cdfc3b0feafc3d4f76b9d...