MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / BraceOpposite

Function BraceOpposite

scintilla/src/Document.cxx:2005–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2003}
2004
2005static char BraceOpposite(char ch) {
2006 switch (ch) {
2007 case '(':
2008 return ')';
2009 case ')':
2010 return '(';
2011 case '[':
2012 return ']';
2013 case ']':
2014 return '[';
2015 case '{':
2016 return '}';
2017 case '}':
2018 return '{';
2019 case '<':
2020 return '>';
2021 case '>':
2022 return '<';
2023 default:
2024 return '\0';
2025 }
2026}
2027
2028// TODO: should be able to extend styled region to find matching brace
2029int Document::BraceMatch(int position, int /*maxReStyle*/) {

Callers 1

BraceMatchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected