mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-02-16 13:13:57 +00:00
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:
parent
10b4a65a87
commit
62f3487189
14 changed files with 2131 additions and 374 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue