Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct support #6

Open
3 tasks
vincenthz opened this issue Feb 16, 2024 · 2 comments
Open
3 tasks

struct support #6

vincenthz opened this issue Feb 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@vincenthz
Copy link
Owner

  • add support for lispy struct
  • add support for rusty struct
  • fix issue on the compilation/exec side if any
@vincenthz vincenthz added the enhancement New feature or request label Feb 16, 2024
@vincenthz
Copy link
Owner Author

vincenthz commented Apr 1, 2024

expected syntax:

Lispy:

(struct name (field1 field2 ... fieldN))

rusty:

struct name {
   field1,
   field2,
   ...
}

@vincenthz
Copy link
Owner Author

vincenthz commented Apr 1, 2024

also need get/set accessor syntax, and constructor of value

(WIP syntax)

rust:

// constructor
record_name { field1: value1, field2: value2 ... }

// set
record_value.field = new_value

// get:
record_value.field

lisp:

; constructor
TBD

; set
(setf record_value field1 new_value_of_field)

; get
(getf record_value field1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant