Updated analyzer.

This commit is contained in:
2019-02-03 19:51:32 +01:00
parent 687f2d157d
commit 74a0d25926
2 changed files with 25 additions and 30 deletions
+20 -20
View File
@@ -52,10 +52,10 @@ TOKEN_TYPEDEF_STRUCT typedef struct _GtkWindowGroupPrivate GtkWindowGroupPrivate
TOKEN_STRUCT struct _GtkWindow TOKEN_STRUCT struct _GtkWindow
{ {
TOKEN_MEMBER GtkBin bin; GtkBin TOKEN_FUNCTION bin;
TOKEN_MEMBER GtkWindowPrivate *priv; GtkWindowPrivate TOKEN_FUNCTION *priv;
}; TOKEN_ENDBRACE };
TOKEN_CSTART /** TOKEN_CSTART /**
TOKEN_CMID * GtkWindowClass: TOKEN_CMID * GtkWindowClass:
@@ -68,30 +68,30 @@ TOKEN_CMID * mnemonics that are associated with window changes.
TOKEN_CMID * @enable_debugging: Class handler for the #GtkWindow::enable-debugging TOKEN_CMID * @enable_debugging: Class handler for the #GtkWindow::enable-debugging
TOKEN_CMID * keybinding signal. Since: 3.14 TOKEN_CMID * keybinding signal. Since: 3.14
TOKEN_CEND */ TOKEN_CEND */
TOKEN_STRUCT struct _GtkWindowClass TOKEN_STRUCT struct TOKEN_MEMBER _GtkWindowClass
{ {
TOKEN_MEMBER GtkBinClass parent_class; GtkBinClass TOKEN_FUNCTION parent_class;
TOKEN_MEMBER /*< public TOKEN_MEMBER >*/ TOKEN_CSTART /*< public TOKEN_CEND >*/
void TOKEN_MEMBER (* set_focus) TOKEN_MEMBER (GtkWindow *window, TOKEN_VOID void TOKEN_FUNCTION_POINTER (* TOKEN_FUNCTION set_focus) (GtkWindow TOKEN_FUNCTION *window,
TOKEN_MEMBER GtkWidget *focus); GtkWidget TOKEN_FUNCTION *focus);
TOKEN_MEMBER /* G_SIGNAL_ACTION TOKEN_MEMBER signals for TOKEN_MEMBER keybindings */ TOKEN_CSTART /* G_SIGNAL_ACTION signals for keybindings TOKEN_CEND */
TOKEN_MEMBER void (* TOKEN_MEMBER activate_focus) (GtkWindow TOKEN_MEMBER *window); TOKEN_VOID void TOKEN_FUNCTION_POINTER (* TOKEN_FUNCTION activate_focus) (GtkWindow TOKEN_FUNCTION *window);
void TOKEN_MEMBER (* activate_default) TOKEN_MEMBER (GtkWindow *window); TOKEN_VOID void TOKEN_FUNCTION_POINTER (* TOKEN_FUNCTION activate_default) (GtkWindow TOKEN_FUNCTION *window);
TOKEN_MEMBER void (* TOKEN_MEMBER keys_changed) (GtkWindow TOKEN_MEMBER *window); TOKEN_VOID void TOKEN_FUNCTION_POINTER (* TOKEN_FUNCTION keys_changed) (GtkWindow TOKEN_FUNCTION *window);
gboolean TOKEN_MEMBER (* enable_debugging) TOKEN_MEMBER (GtkWindow *window, TOKEN_FUNCTION gboolean TOKEN_FUNCTION_POINTER (* TOKEN_FUNCTION enable_debugging) (GtkWindow TOKEN_FUNCTION *window,
TOKEN_MEMBER gboolean toggle); TOKEN_FUNCTION gboolean TOKEN_FUNCTION toggle);
TOKEN_MEMBER /*< private TOKEN_MEMBER >*/ TOKEN_CSTART /*< private TOKEN_CEND >*/
/* TOKEN_MEMBER Padding for TOKEN_MEMBER future expansion TOKEN_MEMBER */ TOKEN_CSTART /* Padding for future expansion TOKEN_CEND */
void TOKEN_MEMBER (*_gtk_reserved1) (void); TOKEN_VOID void TOKEN_FUNCTION_POINTER (*_gtk_reserved1) TOKEN_FUNCTION (void);
TOKEN_MEMBER void (*_gtk_reserved2) TOKEN_MEMBER (void); TOKEN_VOID void TOKEN_FUNCTION_POINTER (*_gtk_reserved2) TOKEN_FUNCTION (void);
void TOKEN_MEMBER (*_gtk_reserved3) (void); TOKEN_VOID void TOKEN_FUNCTION_POINTER (*_gtk_reserved3) TOKEN_FUNCTION (void);
}; TOKEN_ENDBRACE };
TOKEN_CSTART /** TOKEN_CSTART /**
TOKEN_CMID * GtkWindowType: TOKEN_CMID * GtkWindowType:
+5 -10
View File
@@ -237,16 +237,17 @@ class PARSEOBJECT:
analysed.append(t) analysed.append(t)
analysed.append(w) analysed.append(w)
continue continue
if t == ('TOKEN_LBRACE'): if t == 'TOKEN_LBRACE':
inside_braces = True inside_braces = True
analysed.append(w) analysed.append(w)
continue continue
if w == '};' and inside_struct == True: if t == 'TOKEN_RBRACE' and inside_struct == True:
inside_braces = False inside_braces = False
inside_struct = False inside_struct = False
analysed.append(t)
analysed.append(w) analysed.append(w)
continue continue
elif inside_braces == True and inside_struct == True: if inside_braces == True and inside_struct == True:
if inside_member == True: if inside_member == True:
inside_member = False inside_member = False
analysed.append(w) analysed.append(w)
@@ -257,13 +258,6 @@ class PARSEOBJECT:
analysed.append(t) analysed.append(t)
analysed.append(w) analysed.append(w)
continue continue
if t == 'TOKEN_RBRACE' and inside_braces == True:
inside_braces = False
if inside_struct == True:
inside_struct = False
analysed.append(t)
analysed.append(w)
continue
if t == False: if t == False:
analysed.append(w) analysed.append(w)
continue continue
@@ -271,6 +265,7 @@ class PARSEOBJECT:
analysed.append(t) analysed.append(t)
analysed.append(w) analysed.append(w)
inside_include = False inside_include = False
inside_struct = False
return analysed return analysed
def token_analyzer(self, ln): def token_analyzer(self, ln):