Skip to content

Enhancement: Update the Haxelib version of the funkin HScript fork to have a Funkin-Specific version #4184

Open
@KoloInDaCrib

Description

Issue Checklist

  • I have read the Contributing Guide
  • I have checked the Issues/Discussions pages to see if my enhancement has already been suggested
  • I have properly titled my enhancement

What is your suggestion, and why should it be implemented?

Kind of based around the comment cam left about a polymod fork #4164 (comment)

Basically, if the haxelib version of the funkin fork of hscript was set to something like "3.6.0", polymod could be updated internally to both work with the funkin fork, as well as the upstream hscript version

implementation inside polymod would be something like

#if (hscript >= "3.6.0") //funkin specific 
case EVar(n, _, e, get, set): // Fix to ensure local variables are committed properly.
	declared.push({n: n, old: locals.get(n)});
	var result = (e == null) ? null : expr(e);
	var getter = (get == null) ? "default" : get;
	var setter = (set == null) ? "default" : set;
	locals.set(n, {r: result, get: getter, set: setter});
#else 
case EVar(n, _, e): // Fix to ensure local variables are committed properly.
	declared.push({n: n, old: locals.get(n)});
	var result = (e == null) ? null : expr(e);
	locals.set(n, {r: result});
#end

this was suggested because im trying to get get_ and set_ functions to work in hscript and that required me to modify the EVar enum
Edit: I didn't have to do change EVar, nevermind, the suggestion still stands

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions