vscode-mtalua icon indicating copy to clipboard operation
vscode-mtalua copied to clipboard

Add OOP Methods

Open gatno opened this issue 7 years ago • 1 comments

Object Orientated Programming was introduced in MTA:SA 1.4

gatno avatar Aug 23 '18 15:08 gatno

For this to work I would need to write a full blown code parser. This means parsing files and determining their types ex:

local position = Vector3(300, -200, 2)
local vehicle = Vehicle(411, position)
vehicle.position = centreOfMap - Vector3(300, -200, 0)

The variable vehicle has to be parsed and set as "Vehicle" type internally. Then when the code completion handler is triggered (By typing "vehicle.") the parser has to lookup the type of vehicle, take the type and list all possible "methods" and "fields".

Subtixx avatar Aug 24 '18 09:08 Subtixx