SQFvm / runtime

Custom implementation of the Arma script language SQF
GNU Lesser General Public License v3.0
96 stars 29 forks source link

[BUG] Error with block comment parsing #134

Closed dedmen closed 3 years ago

dedmen commented 3 years ago

Describe the bug compile P:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf

[ERR] [L147|C10|T:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf]  Missing curly closing bracket (`}`).
[ERR] [L148|C43|T:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf]  Missing right argument on operator '/'.
[ERR] [L128|C108|T:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf] Missing curly closing bracket (`}`).
[ERR] [L148|C53|T:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf]  Expected Statement termination using `;` or `,`.

See specifically [ERR] [L148|C43|T:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf] Missing right argument on operator '/'.

To Reproduce compile P:/a3/functions_f_contact/em_core/fn_updateplayerspectrumanalyzer.sqf

Lines 147-149

            } else {
                [/*_from*/"",_text] call bis_fnc_showSubtitle; //--- Used only in outro
            };

fn_updateplayerspectrumanalyzer.zip

dedmen commented 3 years ago

Another example {_cas removeWeaponGlobal _x} forEach [/*"Missile_AA_04_Plane_CAS_01_F",*/"Missile_AGM_02_Plane_CAS_01_F"]; from T:/a3/missions_f_patrol/mpscenarios/mp_escapefrommalden.malden/functions/fn_efm_specialevents.sqf

dedmen commented 3 years ago

more

_source_water_explosion setParticleParams
[
    /*Sprite*/["\a3\Data_F_Orange\ParticleEffects\Universal\orangeExplode_01", 4, 0, 16, 0],"",
    /*Type*/"Billboard",
    /*TimmerPer*/1,
    /*Lifetime*/1.5,
    /*Position*/[0, 0, 0.15],
    /*MoveVelocity*/[0, 0, 0],
    /*Simulation*/3, 0.3, 0.15, 0.15,
    /*Scale*/[1],
    /*Color*/[[0.5,0.5,0.5,1]],
    /*AnimSpeed*/[2.5],
    /*randDirPeriod*/0.0,
    /*randDirIntesity*/0.0,
    /*onTimerScript*/"",
    /*DestroyScript*/"",
    /*Follow*/""
];

[ERR] [L28|C1|T:/a3/props_f_orange/humanitarian/supplies/scripts/fruit_destruct.sqf] Expected Expression. [ERR] [L28|C1|T:/a3/props_f_orange/humanitarian/supplies/scripts/fruit_destruct.sqf] Missing square closing bracket (]). [ERR] [L28|C2|T:/a3/props_f_orange/humanitarian/supplies/scripts/fruit_destruct.sqf] Missing right argument on operator '/'.

X39 commented 3 years ago

Will probably fixed in the changes that emerge from https://github.com/SQFvm/runtime/tree/sqf/parser-rewrite

X39 commented 3 years ago

Just tested it, works as expected in latest with {_cas removeWeaponGlobal _x} forEach [/*"Missile_AA_04_Plane_CAS_01_F",*/"Missile_AGM_02_Plane_CAS_01_F"];