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

Add primitive variables #125

Merged
merged 8 commits into from
Jun 9, 2021
Merged

Add primitive variables #125

merged 8 commits into from
Jun 9, 2021

Conversation

extremeheat
Copy link
Contributor

@extremeheat extremeheat commented May 24, 2021

Adds support for primitive type variables in ProtoDef. Whereas a normal type would be an array or an object, a primitive type (string, numeric, boolean) can be used in switch statements and changed dynamically.

  • new addVariable to ProtodefCompiler, setVariable to CompiledProtodef
  • setVariable method in ProtoDef interpreter
  • / at top of switch field will notate a context variable

* new `addVariable` to ProtodefCompiler, `setVariable` to CompiledProtodef
* / at top of switch field will notate a context variable
@extremeheat
Copy link
Contributor Author

Added to the docs in ProtoDef-io/ProtoDef#42

Looks like there's still a test schema validation error, though not sure how to fix it.

@extremeheat extremeheat changed the title Add context variables to compiler Add primitive variables to compiler Jun 5, 2021
@extremeheat extremeheat changed the title Add primitive variables to compiler Add primitive variables Jun 5, 2021
@rom1504 rom1504 marked this pull request as ready for review June 9, 2021 22:46
@rom1504 rom1504 merged commit edb8b8a into ProtoDef-io:master Jun 9, 2021
@extremeheat extremeheat deleted the vars branch January 29, 2022 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants