restructure: move el compiler content into lang/

This commit is contained in:
Will Anderson
2026-05-05 01:38:51 -05:00
parent ce68f91a38
commit 1ae68962cf
143 changed files with 0 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// time-literals.el postfix-literal duration recognition.
// `30.seconds` lowers to a DurationLit AST node carrying the count and the
// unit; codegen emits a literal int64 nanosecond constant. duration_to_seconds
// reverses the lowering and yields the original count.
// `test` is reserved by El's lexer as a property-test keyword, so the
// example body lives in `run_test()`.
fn run_test() -> Int {
let d: Duration = 30.seconds
return duration_to_seconds(d)
}
fn main() -> Void {
println(int_to_str(run_test()))
}