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

Bracket Colors code review 2/5/23 #2

Merged
merged 7 commits into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Available plugins are:
* ``addons`` -- the Addons plugin
* ``autoclose`` -- the Autoclose plugin
* ``automark`` -- the Automark plugin
* ``bracketcolors`` -- the BracketColors plugin
* ``codenav`` -- the CodeNav plugin
* ``commander`` -- the Commander plugin
* ``debugger`` -- the Debugger plugin
Expand Down
4 changes: 2 additions & 2 deletions bracketcolors/README
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Color brackets, parenthesis, and braces
===================
=======================================

.. contents::

About
-----

This plugin enables bracket coloring features. Brackets are colored based on
nesting level
nesting level, often referred as "rainbow brackets".

Features
--------
Expand Down
35 changes: 1 addition & 34 deletions bracketcolors/src/BracketMap.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* BracketMap.cc
*
* Copyright 2013 Asif Amin <[email protected]>
* Copyright 2023 Asif Amin <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -67,7 +67,6 @@
}



// -----------------------------------------------------------------------------
void BracketMap::ComputeOrder()
/*
Expand Down Expand Up @@ -109,35 +108,3 @@
GetOrder(bracket) = orderStack.size() - 1;
}
}



// -----------------------------------------------------------------------------
void BracketMap::Show()
/*

----------------------------------------------------------------------------- */
{ g_debug("%s: Showing bracket map ...", __FUNCTION__);

for (const auto it : mBracketMap) {

const Index &startIndex = it.first;
const Bracket &bracket = it.second;

Length length = std::get<0>(bracket);
Order order = std::get<1>(bracket);

Index end = -1;
if (length > 0) {
end = startIndex + length;
}

g_debug(
"%s: Bracket at %d, Length: %d, End: %d, Order: %d",
__FUNCTION__, startIndex, length, end, order
);
}

g_debug("%s: ... Finished showing bracket map", __FUNCTION__);
}

15 changes: 1 addition & 14 deletions bracketcolors/src/BracketMap.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* BracketMap.h
*
* Copyright 2013 Asif Amin <[email protected]>
* Copyright 2023 Asif Amin <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -40,8 +40,6 @@
BracketMap();
~BracketMap();

void Show();

void Update(Index index, Length length);
void ComputeOrder();

Expand All @@ -62,15 +60,4 @@
}
};












#endif
Loading