Symbol suggestions: distinguish native functions and Pawn functions
This commit is contained in:
parent
ad730d32d8
commit
ef49529b50
@ -521,15 +521,24 @@ enum { /* identifier types */
|
|||||||
estAUTOMATON,
|
estAUTOMATON,
|
||||||
estSTATE
|
estSTATE
|
||||||
};
|
};
|
||||||
enum { /* symbol type flags */
|
enum { /* search types for error_suggest() when the identifier type is "estSYMBOL" */
|
||||||
esfLABEL = 1 << 0,
|
/* symbol type flags */
|
||||||
|
esfLABEL = 1 << 0, /* label */
|
||||||
esfCONST = 1 << 1, /* named constant */
|
esfCONST = 1 << 1, /* named constant */
|
||||||
esfVARIABLE = 1 << 2, /* single variable */
|
esfVARIABLE = 1 << 2, /* single variable */
|
||||||
esfARRAY = 1 << 3, /* array */
|
esfARRAY = 1 << 3, /* array */
|
||||||
esfFUNCTION = 1 << 4, /* Pawn or native function */
|
esfPAWNFUNC = 1 << 4, /* Pawn function */
|
||||||
|
esfNATIVE = 1 << 5, /* native function */
|
||||||
|
|
||||||
|
/* composite search types */
|
||||||
|
/* find symbols of any type (used only to define other search types) */
|
||||||
|
esfANY = esfLABEL | esfCONST | esfVARIABLE | esfARRAY | esfPAWNFUNC | esfNATIVE,
|
||||||
|
|
||||||
|
/* any function */
|
||||||
|
esfFUNCTION = esfPAWNFUNC | esfNATIVE,
|
||||||
|
|
||||||
/* find symbols of any type but labels */
|
/* find symbols of any type but labels */
|
||||||
esfNONLABEL = esfCONST | esfVARIABLE | esfARRAY | esfFUNCTION,
|
esfNONLABEL = esfANY & ~esfLABEL,
|
||||||
|
|
||||||
/* find an array, a single variable, or a named constant */
|
/* find an array, a single variable, or a named constant */
|
||||||
esfVARCONST = esfCONST | esfVARIABLE | esfARRAY
|
esfVARCONST = esfCONST | esfVARIABLE | esfARRAY
|
||||||
|
@ -534,7 +534,7 @@ static int find_closest_symbol_table(const char *name,const symbol *root,int sym
|
|||||||
break;
|
break;
|
||||||
case iFUNCTN:
|
case iFUNCTN:
|
||||||
case iREFFUNC:
|
case iREFFUNC:
|
||||||
if ((symboltype & esfFUNCTION)==0)
|
if ((symboltype & (((sym->usage & uNATIVE)!=0) ? esfNATIVE : esfFUNCTION))==0)
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user