[gnome-builder] auto-indent: add comment about future implementations.



commit 266e93f91d5493998973159d479ab6e64dd4bbca
Author: Christian Hergert <christian hergert me>
Date:   Thu Oct 16 18:08:45 2014 -0700

    auto-indent: add comment about future implementations.

 src/auto-indent/gb-source-auto-indenter-c.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/auto-indent/gb-source-auto-indenter-c.c b/src/auto-indent/gb-source-auto-indenter-c.c
index c385ad2..5e55082 100644
--- a/src/auto-indent/gb-source-auto-indenter-c.c
+++ b/src/auto-indent/gb-source-auto-indenter-c.c
@@ -25,6 +25,22 @@
 
 #include "c-parse-helper.h"
 
+/*
+ * TODO:
+ *
+ * Don't let the fact that this auto-indenter "sort of works" fool you. It
+ * needs some serious rebuilding. In particular, we can't use something like
+ * clang because clang_tokenize() wont work on a TranslationUnit that fails
+ * to compile.
+ *
+ * But, it would be nice to have a bit of relaxed tokenizing. So that we can
+ * work our way backwards without having to keep checking things on a
+ * character by character basis. (Lots of code duplication here too).
+ *
+ * I imagine something that is more like source_iter_get_previous_token()
+ * which would return something like PARAM, FUNC, COMMENT, STRING, etc.
+ */
+
 struct _GbSourceAutoIndenterCPrivate
 {
   gint  scope_indent;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]