@@ -37,7 +37,6 @@ typedef enum {
3737typedef struct {
3838 char const * token ;
3939 BasicKind kind ;
40- int skip ;
4140} KeyWord ;
4241
4342static kindDefinition BasicKinds [] = {
@@ -51,31 +50,31 @@ static kindDefinition BasicKinds[] = {
5150
5251static KeyWord basic_keywords [] = {
5352 /* freebasic */
54- {"const" , K_CONST , 0 },
55- {"dim" , K_VARIABLE , 0 },
56- {"common" , K_VARIABLE , 0 },
57- {"function" , K_FUNCTION , 0 },
58- {"sub" , K_FUNCTION , 0 },
59- {"private sub" , K_FUNCTION , 0 },
60- {"public sub" , K_FUNCTION , 0 },
61- {"private function" , K_FUNCTION , 0 },
62- {"public function" , K_FUNCTION , 0 },
63- {"property" , K_FUNCTION , 0 },
64- {"constructor" , K_FUNCTION , 0 },
65- {"destructor" , K_FUNCTION , 0 },
66- {"type" , K_TYPE , 0 },
67- {"enum" , K_ENUM , 0 },
53+ {"const" , K_CONST },
54+ {"dim" , K_VARIABLE },
55+ {"common" , K_VARIABLE },
56+ {"function" , K_FUNCTION },
57+ {"sub" , K_FUNCTION },
58+ {"private sub" , K_FUNCTION },
59+ {"public sub" , K_FUNCTION },
60+ {"private function" , K_FUNCTION },
61+ {"public function" , K_FUNCTION },
62+ {"property" , K_FUNCTION },
63+ {"constructor" , K_FUNCTION },
64+ {"destructor" , K_FUNCTION },
65+ {"type" , K_TYPE },
66+ {"enum" , K_ENUM },
6867
6968 /* blitzbasic, purebasic */
70- {"global" , K_VARIABLE , 0 },
69+ {"global" , K_VARIABLE },
7170
7271 /* purebasic */
73- {"newlist" , K_VARIABLE , 0 },
74- {"procedure" , K_FUNCTION , 0 },
75- {"interface" , K_TYPE , 0 },
76- {"structure" , K_TYPE , 0 },
72+ {"newlist" , K_VARIABLE },
73+ {"procedure" , K_FUNCTION },
74+ {"interface" , K_TYPE },
75+ {"structure" , K_TYPE },
7776
78- {NULL , 0 , 0 }
77+ {NULL , 0 }
7978};
8079
8180/*
@@ -166,7 +165,6 @@ static int match_keyword (const char *p, KeyWord const *kw)
166165{
167166 vString * name ;
168167 size_t i ;
169- int j ;
170168 const char * old_p ;
171169 for (i = 0 ; i < strlen (kw -> token ); i ++ )
172170 {
@@ -190,10 +188,7 @@ static int match_keyword (const char *p, KeyWord const *kw)
190188 }
191189
192190 name = vStringNew ();
193- for (j = 0 ; j < 1 + kw -> skip ; j ++ )
194- {
195- p = extract_name (p , name );
196- }
191+ extract_name (p , name );
197192 makeSimpleTag (name , kw -> kind );
198193 vStringDelete (name );
199194 return 1 ;
0 commit comments