Fixed incparser for new functag format and added a sample Crimson Editor template
This commit is contained in:
parent
3c365259cc
commit
944c523a49
@ -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(';');
|
||||
|
||||
|
62
tools/incparser/sourcepawn.key.template
Normal file
62
tools/incparser/sourcepawn.key.template
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user