Skip to content

[FEATURE] Make iterator in standard sksp for-loop auto-declared #96

@mathiasvatter

Description

@mathiasvatter

Feature Description

Would be a small quality of life update to automatically declare the iterator in standard for-loop in sublime ksp syntax. This could also reduce confusion because this behavior is already present in cksp foreach loops where key, value iterators also do not need to be declared beforehand.

for i = 0 to 99 // i is already declared without needing to write declare i previously
		message(i)
	end for

This should not cause any backwards compatibility problems with old sksp codebases since the new auto-declared iterator would simply shadow the old manually declared one...

Problem it Solves

Not necessarily needed, more quality of life update really. Plus, looking at foreach loops, an unexperienced user would probably expect this to work.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions