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
master
j-lang/projects/custom_fn.j

8 lines
113 B
Plaintext
Raw Permalink 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: 47ms Template: 4ms
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