secondlife / secondlife/sl-vscode-plugin
Proposal: Bringing preprocessor in line with Firestorm: "LazyLists"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 15
- Avg merge
- 14h 50m
- Merged PRs (30d)
- 9
Description
This stems from #32
In order to keep compatibility with existing code of people having used the well established Firestorm viewer build-in preprocessor it is important to support its features, or at least its syntax. One such syntax is the ability to refer to lists by their index and typecasting it, which would then be transformed into the appropriate llList2xxx version of that typecast.
Setting values is supported as well, they inject a function for setting values in a list (when needed):
list lazy_list_set(list L, integer i, list v)
{
while (llGetListLength(L) < i)
L = L + 0;
return llListReplaceList(L, v, i, i);
}
As for the translation, they go about it as follows (taken from their wiki):
To obtain a list element, prefix it with a typecast. For example:
list a = [1, 3, "blah", <5.31, 131.7, 11.331>];
llOwnerSay((string)a[2]); // outputs: blah
llOwnerSay((string)((vector)a[3])); // outputs: <5.31000, 131.70000, 11.33100>
llOwnerSay(llList2CSV((list)a[1, 2])); // outputs: 3, blah
will be translated to:
list a = [1, 3, "blah", <5.31, 131.7, 11.331>];
llOwnerSay(llList2String(a, 2));
llOwnerSay((string)(llList2Vector(a, 3)));
llOwnerSay(llList2CSV(llList2List(a, 1, 2)));
For more information see: https://wiki.firestormviewer.org/fs_preprocessor#lazy_lists_addition
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests. Start by locating the plugin's preprocessor and compare its handling of list indexing, typecasts, ranges, and assignments with the Firestorm examples; done means the shown reads and writes translate compatibly and are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100