xls icon indicating copy to clipboard operation
xls copied to clipboard

Support proc-local functions

Open RobSpringer opened this issue 4 years ago • 1 comments

It'd be nice to have procs be self-contained, as objects are in OOP. IOW, it'd be nice to be able to do:

proc p {
  config(...) { ... }

  next(tok: token, state: state_t) {
    let new_state = create_new_state(...);
  }

  fn create_new_state(...) -> state_t { ... }
}

That way we can "localize" concerns, rather than having to splat them all over and mix them in a impl. file.

RobSpringer avatar Nov 11 '21 16:11 RobSpringer

related https://github.com/google/xls/commit/1af3c8cf8144f46be9bca6e44b98477adfe5dd8d

proppy avatar Sep 30 '24 22:09 proppy