MarkusAmshove / natls

Language Server implementation for the Natural 4GL programming language
MIT License
13 stars 3 forks source link

Prototype for-each snippets #432

Closed MarkusAmshove closed 11 months ago

MarkusAmshove commented 11 months ago

When is the following structure:

1 #GROUPS (*)
2 #INSIDE (A10)
1 #SINGLE
2 #INSIDE (A10)

which means a group exists that is an array and structurally equal with another group that is not an array, then a snippet should exist that creates the following:

#S-GROUPS := *OCC(GROUPS)
FOR #I-GROUPS := 1 TO #S-GROUPS
    MOVE BY NAME #GROUPS(#I-GROUPS) TO #SINGLE
    IGNORE
END-FOR

Only level one groups should be considered.