diff --git a/tools/incparser/IncParser.cs b/tools/incparser/IncParser.cs index 94010d04..7f06591e 100644 --- a/tools/incparser/IncParser.cs +++ b/tools/incparser/IncParser.cs @@ -376,16 +376,6 @@ namespace incparser { w.BeginSection("functag"); - /* Get the functag name */ - NeedToken(LexToken.TOKEN_SYMBOL); - w.WritePair("name", LexString); - w.functagList.Add(LexString); - - if (MatchToken(LexToken.TOKEN_LABEL)) - { - w.WritePair("return", LexString); - } - if (MatchToken(LexToken.TOKEN_PUBLIC)) { w.WritePair("type", "public"); @@ -395,6 +385,16 @@ namespace incparser w.WritePair("type", "stock"); } + if (MatchToken(LexToken.TOKEN_LABEL)) + { + w.WritePair("return", LexString); + } + + /* Get the functag name */ + NeedToken(LexToken.TOKEN_SYMBOL); + w.WritePair("name", LexString); + w.functagList.Add(LexString); + ParseParameters(w); NeedChar(';'); diff --git a/tools/incparser/sourcepawn.key.template b/tools/incparser/sourcepawn.key.template new file mode 100644 index 00000000..e6e63b74 --- /dev/null +++ b/tools/incparser/sourcepawn.key.template @@ -0,0 +1,62 @@ +[-COMMENT-:GLOBAL] +# =================================================================== +# "SourcePawn" LANGUAGE KEYWORD FILE FOR CRIMSON EDITOR +# Created by David Anderson +# =================================================================== + +[KEYWORDS0:GLOBAL] +# Statements +assert begin break case continue default defined do else enum exit for +forward funcenum functag if native new decl operator return struct switch while + +[KEYWORDS1:GLOBAL] +# Operators +cellsof chars sizeof tagof + +# Predefined constants +false true cellbits cellmax cellmin charbits charmax charmin myinfo INVALID_HANDLE +__version NULL_VECTOR NULL_STRING + +# Predefined tag names +bool Float Handle String + +[KEYWORDS2:GLOBAL] +# Directives + #assert #define #else #elseif #emit #endif #endinput #endscript #if #include + #pragma #error #tryinclude #undef + +# Extra information for #pragma +align ctrlchar dynamic library pack rational semicolon tabsize + +[KEYWORDS3:GLOBAL] +# Others +const public static stock + +[KEYWORDS4:GLOBAL] +#defines +$defines + +[KEYWORDS5:GLOBAL] +#natives +$natives +#stocks +$stocks + +[KEYWORDS6:GLOBAL] +#structs +$structs + +[KEYWORDS7:GLOBAL] +#enums +$enums + +[KEYWORDS8:GLOBAL] +#enumtypes +$enumtypes + +[KEYWORDS9:GLOBAL] +#forwards +$forwards +#funcenums/#functags +$funcenums +$functags \ No newline at end of file