Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpp.hrc: allow curly brackets inside expressions, fixes #78 #79

Merged
merged 1 commit into from Nov 18, 2019

Conversation

yeputons
Copy link
Contributor

@yeputons yeputons commented Jul 19, 2019

C++11 allowed curly brackets in expressions inside round brackets where
they were not allowed before:

  • Lambda functions: ({ return 1; })();
  • List initialization: vector({1, 2, 3})

This patch adds {} as correct pair inside 'Expression' region,
hence they are not highlighted as errors anymore.

Fixes #78

C++11 allowed curly brackets in expressions inside round brackets where
they were not allowed before:
* Lambda functions: ([](){ return 1; })();
* List initialization: vector({1, 2, 3})

This patch adds {} as correct pair inside 'Expression' region,
hence they are not highlighted as errors anymore.
@ctapmex ctapmex merged commit 7c831f5 into colorer:master Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

C++11: curly brackets should be allowed in expressions
2 participants