aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorAleric Inglewood2014-05-28 18:51:17 +0200
committerJustin Clark-Casey (justincc)2014-06-19 23:52:51 +0100
commitc90b986d8b1ee55505b01056c4a772cfc5b210b6 (patch)
tree87587ba96757763b5863ef8a57d746a3597aecf7 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentFix looking up line number and colum when there is no exact match. (diff)
downloadopensim-SC-c90b986d8b1ee55505b01056c4a772cfc5b210b6.zip
opensim-SC-c90b986d8b1ee55505b01056c4a772cfc5b210b6.tar.gz
opensim-SC-c90b986d8b1ee55505b01056c4a772cfc5b210b6.tar.bz2
opensim-SC-c90b986d8b1ee55505b01056c4a772cfc5b210b6.tar.xz
Improved line map heuristics.
If the C# column can't be found in the positionMap (but the line can), use the map immediately after it while correcting for the offset, unless that results in an LSL position before the previous LSL position in the positionMap. The idea behind this heuristic is that in most, if not all cases C# consumes more characters than LSL (for example LSL_Types.LSLInteger instead of just 'integer'). Thus if the distance between the columns of two markers differ in the C# and LSL file, the distance in the C# file will be larger. Moreover, we can assume that every time this happens we will have a marker at the beginning of the longer 'keyword', because those keywords were generated by us in the first place. For example: C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ 1 2 will always have markers at the beginning of the long keywords 'LSL_Types.LSLInteger' and 'LSL_Types.LSLString'. If an error is generated in between (for example at the beginning of the function name 'f2') then the correct position is found by using an offset relative to 2 rather than 1. Note that a case where this isn't working correctly is when the user adds extra spaces. For example: LSL: integer f2( string s) would still use the start of 'string' as reference and then go backwards 3 characters only because the corresponding C# still looks like C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ only 3 chars difference and the reported error at 'f2' would be here: LSL: integer f2( string s) ^ This can only be fixed by generating a mapping for 'f2' itself, or generating a mapping whenever the amount of spaces is changed.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
0 files changed, 0 insertions, 0 deletions