v0.0.4 - YakshaLisp macros & structure literals π€π€
What's new
- Macro support using YakshaLisp
# ββββββββ¬βββββ¬β¬ βββ ββ¦ββ¬ββ¬ββββ
# β β βββββββββ ββ€ β ββββββ€
# βββββββ΄ β΄β΄ β΄β΄βββββ β© β΄β΄ β΄βββ
# ββββ¬ββββββ ββ β¬ β¬ββββββ
# β β£ βββββββ β β©ββ βββββββ
# β β΄ββββββ ββββββββββββ
macros!{
(defun to_fb (n) (+ (if (== n 1) "" " ") (cond
((== 0 (modulo n 15)) "FizzBuzz")
((== 0 (modulo n 3)) "Fizz")
((== 0 (modulo n 5)) "Buzz")
(true (to_string n))
)))
(defun fizzbuzz () (list (yk_create_token YK_TOKEN_STRING (reduce + (map to_fb (range 1 101))))))
(yk_register {dsl fizzbuzz fizzbuzz})
}
def main() -> int:
println(fizzbuzz!{})
return 0
Read more
Philosophy & why lisp?
- Structure literals
b: Orange = Orange {color: ORANGE, origin: SOUTH_AFRICA}
- Skip data type (type inference) for for each elements & during defining a variable
Change log
- feat(parser,tests): implement mini blocks support (#36) by @JaDogg in #38
- feat(yakshaintellij): add mini statements support by @JaDogg in #41
- fix(yakshavscode): update vscode syntax highlighting to include recen⦠by @JaDogg in #43
- fix(compiler): delete desugar object by @JaDogg in #44
- feat(ic2c): initial skeleton of ic2c by @JaDogg in #45
- feat(ic2c): further ic2c implementation by @JaDogg in #49
- fix(type_checker,tests): handle redefining variables in type_checker #47 by @JaDogg in #50
- fix(type_checker): const assignment by @JaDogg in #51
- feat(parser,tokens): syntax sugar - struct is same as
@onstack
class by @JaDogg in #53 - refactor(tests): cleanup compiler tests by @JaDogg in #55
- feat(editors,tests): utilize struct keyword by @JaDogg in #56
- feat(compiler,type_checker,ast,parser): struct literals and allow omi⦠by @JaDogg in #57
- feat(ast,parser,type_checker,compiler): remove : from struct literal β¦ by @JaDogg in #59
- fix(type_checker,compiler): add support for function assignment + add⦠by @JaDogg in #60
- feat(type_checker,parser,intellij,vscode): foreach can now skip data β¦ by @JaDogg in #61
- feat: introduce yakshalisp and various refactorings and fixes by @JaDogg in #62
- fix(yakshalisp): fixes to enable/disable print, rename set to setq by @JaDogg in #63
Full Changelog: v0.0.3...v0.0.4