Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correction for short function syntax, closes hsutter#356
Current implementation does not work for the following code: ```cpp main: () = { :() = 1; [[assert: 1]] } ``` It fails with error: ``` error: subscript expression [ ] must not be empty (if you were trying to name a C-style array type, use 'std::array' instead) (at '[') ``` This change introduce small correction that moves back parsing to semicolon (to simulate double semicolon) for short syntax. It is not done in the following cases: ```cpp :() = 1;(); // imediatelly called lambda f(a,b,:() = 1;); // last argument in function call f(a,:() = 1;,c); // first or in the middle argument ``` After this change the original issue is solved. All regression tests pass. Closes hsutter#356
- Loading branch information