use server.cs CreateServer() as the entry point for mission loading (#11)

* use server.cs CreateServer() as the entry point for mission loading

* explain why onMissionLoadDone is necessary
This commit is contained in:
Brian Beck 2025-12-02 19:14:07 -08:00 committed by GitHub
parent 10b4a65a87
commit 62f3487189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 2131 additions and 374 deletions

View file

@ -411,13 +411,13 @@ MultiplicativeExpression
}
UnaryExpression
= operator:("-" / "!" / "~") _ argument:AssignmentExpression {
= operator:("-" / "!" / "~") _ argument:UnaryOperand {
return buildUnaryExpression(operator, argument);
}
/ operator:("++" / "--") _ argument:UnaryExpression {
/ operator:("++" / "--") _ argument:UnaryOperand {
return buildUnaryExpression(operator, argument);
}
/ "*" _ argument:UnaryExpression {
/ "*" _ argument:UnaryOperand {
return {
type: 'TagDereferenceExpression',
argument
@ -425,6 +425,21 @@ UnaryExpression
}
/ PostfixExpression
// Allow assignment expressions as unary operands without parentheses.
// This matches official TorqueScript behavior where `!%x = foo()` parses as `!(%x = foo())`.
// We can't use full Expression here or it would break precedence (e.g., `!a + b` would
// incorrectly parse as `!(a + b)` instead of `(!a) + b`).
UnaryOperand
= target:LeftHandSide _ operator:AssignmentOperator _ value:AssignmentExpression {
return {
type: 'AssignmentExpression',
operator,
target,
value
};
}
/ UnaryExpression
PostfixExpression
= argument:CallExpression _ operator:("++" / "--") {
return {