cspotcode / cspotcode/angl

Add ability to output non-short-circuit logical operators

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

GML's logical operators do not short-circuit like they do in Javascript.

`a && b` in GML will evaluate both a and b, even if a is false. In Javascript, when a is false, there's no need to evaluate b so it isn't evaluated.

We're properly emulating GML's behavior but that's probably unnecessary. Also, the resulting code is really messy.

So we should add a compiler flag for outputting plain JS, short-circuiting logical operators.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.