- // analyze token, which identifies the begining of a new context
-
- if ( CheckVisibilty( cur ) )
- {
- skip_token( cur );
- return;
- }
-
- if ( is_class_token( cur ) )
- {
- if ( is_forward_decl( cur ) )
- {
- // forward declarations are ignored;
- skip_token( cur );
- return;
- }
-
- if ( mNestingLevel == 0 )
- {
- // change context form global class context
- mCurCtxType = SP_CTX_CLASS;
- }
-
- ++mNestingLevel;
-
- // add information about new class (name, inheritance, etc)
- AddClassNode( cur );
-
- // the default visiblity for class members is 'private'
- mCurVis = SP_VIS_PRIVATE;
-
- return;
- }
-
- size_t len = get_token_len( cur );
-
- if ( cmp_tokens_fast( cur, "typedef", len ) )
- {
- skip_token(cur);
- get_next_token(cur);
-
- if ( cmp_tokens_fast( cur, "struct", len ) ||
- cmp_tokens_fast( cur, "union", len ) ||
- cmp_tokens_fast( cur, "class", len )
- )
- {
- if ( mNestingLevel == 0 )
- {
- // change context form global class context
- mCurCtxType = SP_CTX_CLASS;
- }
-
- ++mNestingLevel;
-
- // add information about new class (name, inheritance, etc)
- AddClassNode( cur );
-
- // the default visiblity for class members is 'private'
- mCurVis = SP_VIS_PRIVATE;
-
- return;
-
- // FOR NOW:: typedef struct, etc are also ignored
- //skip_scope_block( cur );
- }
-
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- AddEnumNode( cur );
- return;
- }
-
- AddTypeDefNode( cur );
-
- return;
- }
-
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- AddEnumNode( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "extern", len ) )
- {
- // extern's are ignored (both extern "C" and extern vars)
- while ( *cur != '{' &&
- *cur != ';' )
- {
- skip_token( cur );
- get_next_token( cur );
- }
- return;
-
- }
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- // enumeration blocks are ignored
-
- skip_scope_block( cur );
-
- get_next_token( cur );
- skip_token( cur ); // skip ';' token;
- return;
- }
-
- if ( cmp_tokens_fast( cur, "package", len ) )
- {
- // packages are ignored
- skip_statement( cur );
- return;
- };
-
- if ( cmp_tokens_fast( cur, "import", len ) )
- {
- // import statements are ignored
- skip_statement( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "virtual", len ) )
- {
- // probably the virtual method is in front of us;
- mIsVirtaul = 1;
- skip_token( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "template", len ) )
- {
- mIsTemplate = 1;
- skip_tempalate_statement( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "friend", len ) )
- {
- skip_statement( cur );
- return;
- }
-
- // ingnore "unsigificant" tokens (i.e. which do not
- // affect the current parsing context)
-
- skip_token( cur );
+ // analyze token, which identifies the begining of a new context
+
+ if ( CheckVisibilty( cur ) )
+ {
+ skip_token( cur );
+ return;
+ }
+
+ if ( is_class_token( cur ) )
+ {
+ if ( is_forward_decl( cur ) )
+ {
+ // forward declarations are ignored;
+ skip_token( cur );
+ return;
+ }
+
+ if ( mNestingLevel == 0 )
+ {
+ // change context form global class context
+ mCurCtxType = SP_CTX_CLASS;
+ }
+
+ ++mNestingLevel;
+
+ // add information about new class (name, inheritance, etc)
+ AddClassNode( cur );
+
+ // the default visiblity for class members is 'private'
+ mCurVis = SP_VIS_PRIVATE;
+
+ return;
+ }
+
+ size_t len = get_token_len( cur );
+
+ if ( cmp_tokens_fast( cur, "typedef", len ) )
+ {
+ skip_token(cur);
+ get_next_token(cur);
+
+ if ( cmp_tokens_fast( cur, "struct", len ) ||
+ cmp_tokens_fast( cur, "union", len ) ||
+ cmp_tokens_fast( cur, "class", len )
+ )
+ {
+ if ( mNestingLevel == 0 )
+ {
+ // change context form global class context
+ mCurCtxType = SP_CTX_CLASS;
+ }
+
+ ++mNestingLevel;
+
+ // add information about new class (name, inheritance, etc)
+ AddClassNode( cur );
+
+ // the default visiblity for class members is 'private'
+ mCurVis = SP_VIS_PRIVATE;
+
+ return;
+
+ // FOR NOW:: typedef struct, etc are also ignored
+ //skip_scope_block( cur );
+ }
+
+ if ( cmp_tokens_fast( cur, "enum", len ) )
+ {
+ AddEnumNode( cur );
+ return;
+ }
+
+ AddTypeDefNode( cur );
+
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "enum", len ) )
+ {
+ AddEnumNode( cur );
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "extern", len ) )
+ {
+ // extern's are ignored (both extern "C" and extern vars)
+ while ( *cur != '{' &&
+ *cur != ';' )
+ {
+ skip_token( cur );
+ get_next_token( cur );
+ }
+ return;
+
+ }
+ if ( cmp_tokens_fast( cur, "enum", len ) )
+ {
+ // enumeration blocks are ignored
+
+ skip_scope_block( cur );
+
+ get_next_token( cur );
+ skip_token( cur ); // skip ';' token;
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "package", len ) )
+ {
+ // packages are ignored
+ skip_statement( cur );
+ return;
+ };
+
+ if ( cmp_tokens_fast( cur, "import", len ) )
+ {
+ // import statements are ignored
+ skip_statement( cur );
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "virtual", len ) )
+ {
+ // probably the virtual method is in front of us;
+ mIsVirtual = 1;
+ skip_token( cur );
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "template", len ) )
+ {
+ mIsTemplate = 1;
+ skip_tempalate_statement( cur );
+ return;
+ }
+
+ if ( cmp_tokens_fast( cur, "friend", len ) )
+ {
+ skip_statement( cur );
+ return;
+ }
+
+ // ingnore "unsigificant" tokens (i.e. which do not
+ // affect the current parsing context)
+
+ skip_token( cur );