Logo
Explore Help
Register Sign In
admin/j-lang
1
0
Fork 0
You've already forked j-lang
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
9610957f1b1bb043a768a3c7a651ae598e3181f8
j-lang/projects/custom_fn.j

8 lines
113 B
Plaintext
Raw Normal View History

Add class support with constructors, fields, and methods
2026-02-19 04:24:44 +01:00
x = "Hello world!"
Add user-defined functions with call frames Implement fn/return across the full pipeline: - Lexer: TOK_FN, TOK_RETURN keywords - Parser: NODE_FN_DEF, NODE_RETURN AST nodes - Compiler: FunctionEntry table, inline compilation with jump-over and backpatching - VM: CallFrame stack with variable snapshot for scoped calls and OP_RETURN
2026-02-18 03:16:54 +01:00
Add class support with constructors, fields, and methods
2026-02-19 04:24:44 +01:00
fn suma(x, y):
fn pow(z):
return z * z
return x + pow(y)
println(suma(2, 2))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 36ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API