Skip to content

Improve pragma safe

Quinten Cabo requested to merge pragma-safe-improvements into develop

This mr improves the parsing of pragma and brings it inline with the current grammer specification.

  • Move #pragma safe for blocks to the start of the block instead of behind. You now write:
{ #pragma safe

}
  • Add #pragma safe to the with loop scope, this is the same as block but it is parsed and traversed separately.
with {
        #pragma safe // this is new and is a shortcut for marking ccc is safe
        ([0] <= [i] < [ccc(15)]): arr[i];
    } : fold(+, 0) // But not a shortcut for the plus!
  • Improve parse error when you try to mark an infix function as safe (#2496 (closed))
  • Improve the printing of pragma safe
Edited by Quinten Cabo

Merge request reports