Skip to content

Compiler: add support for slices - #465

Open
chqrlie wants to merge 1 commit into
c2lang:masterfrom
chqrlie:slices
Open

Compiler: add support for slices#465
chqrlie wants to merge 1 commit into
c2lang:masterfrom
chqrlie:slices

Conversation

@chqrlie

@chqrlie chqrlie commented Mar 16, 2026

Copy link
Copy Markdown
Contributor
  • slice syntax is a[start?:count?] or a[start?:count?:step]
  • designated array initializers accept a range index
  • array initialisation checker updated for designated ranges
  • bit selections are mutated during analysis as BitSelectionExpr

@chqrlie
chqrlie force-pushed the slices branch 5 times, most recently from 0f22bd7 to 2f96cd2 Compare March 24, 2026 13:50
@chqrlie
chqrlie force-pushed the slices branch 7 times, most recently from 859cb67 to 8d97a1f Compare April 2, 2026 12:58
@chqrlie
chqrlie force-pushed the slices branch 6 times, most recently from e8fc9ce to c6c2a84 Compare April 11, 2026 10:58
@chqrlie
chqrlie force-pushed the slices branch 9 times, most recently from 3c83a37 to 63f61d5 Compare April 16, 2026 07:34
@chqrlie
chqrlie force-pushed the slices branch 3 times, most recently from 81906e7 to 1daaf7d Compare April 20, 2026 22:26
@chqrlie
chqrlie force-pushed the slices branch 5 times, most recently from bbc013b to 46e5fa6 Compare April 29, 2026 17:02
@chqrlie
chqrlie force-pushed the slices branch 2 times, most recently from 9ab9322 to 33e2da9 Compare May 5, 2026 19:31
@chqrlie
chqrlie force-pushed the slices branch 3 times, most recently from 000f8e4 to dfb7c45 Compare May 14, 2026 15:02
@chqrlie
chqrlie force-pushed the slices branch 3 times, most recently from b856cb5 to 2d61e24 Compare July 5, 2026 15:02
@chqrlie
chqrlie force-pushed the slices branch 5 times, most recently from fe895fe to 4eafe87 Compare July 14, 2026 14:19
@chqrlie
chqrlie force-pushed the slices branch 7 times, most recently from a38f81b to 21930c7 Compare July 26, 2026 13:08
@chqrlie
chqrlie force-pushed the slices branch 3 times, most recently from 8d1b9c9 to 8c2b88d Compare August 4, 2026 13:25
* parse slice syntax: a[start?:count?] or a[start?:count?:step],
  producing `ArraySelectionExpr` AST objects.
* `ArraySelectionExpr` with a builtin base object are changed to
  `BitSelectionExpr` objects at analysis time.
* removed bitoffset indexing object
* array slices are not supported in expressions yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant