Eisenwave / cdecl-plus

Similar to cdecl.org, but with broader support for language features. Static web page which supports file protocol. Parsing and to-prose conversion happen in the front-end, resulting in instant feedback.
https://cdecl.plus/
MIT License
32 stars 4 forks source link

Array length should work with any expressions #14

Open Halalaluyafail3 opened 2 years ago

Halalaluyafail3 commented 2 years ago

cdecl+ Input

int a(int[static 2+1]),b(int q,int[static q]),c(int[2+1]),d(int q,int[q])

Expected Prose

Declare a as function(array[2+1] (size checked) of int) returning int

Declare b as function(int named q, array[q] (size checked) of int) returning int

Declare c as function(array[2+1] of int) returning int

Declare d as function(int named q, array[q] of int) returning int

Actual Prose or Error

Syntax Error

Additional Context

Any expression may be used for array bounds, the expression should just be pasted into the square brackets after array and it should be checked that no comma operators are used directly (e.g. int[1,2] is invalid).