Mantis#1728. Thank you kindly, Mikem for a patch that solves:

The compiler was missing grammar rules for += etc. operators on 
vector.member variables, which the attached patch implements.
0.6.0-stable
Charles Krinke 2008-07-14 01:07:21 +00:00
parent d0fb5e8c90
commit 476e08286e
3 changed files with 15565 additions and 14384 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1359,6 +1359,41 @@ default
Assert.AreEqual(expected, output);
}
[Test]
public void TestVectorMemberPlusEquals()
{
string input = @"// let's test unary expressions some more
default
{
state_entry()
{
vector v = llGetPos();
v.z += 4;
v.z -= 4;
v.z *= 4;
v.z /= 4;
v.z %= 4;
}
}
";
string expected = @"
public void default_event_state_entry()
{
LSL_Types.Vector3 v = llGetPos();
v.z += 4;
v.z -= 4;
v.z *= 4;
v.z /= 4;
v.z %= 4;
}
";
CSCodeGenerator cg = new CSCodeGenerator();
string output = cg.Convert(input);
Assert.AreEqual(expected, output);
}
[Test]
[ExpectedException("Tools.CSToolsException")]
public void TestSyntaxError()