Fixed incparser for new functag format and added a sample Crimson Editor template

This commit is contained in:
Matt Woodrow 2009-08-09 14:03:50 +12:00
parent 3c365259cc
commit 944c523a49
2 changed files with 72 additions and 10 deletions

View File

@ -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(';');

View 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