mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge pull request #1090 from github/pr-1011-updated
Add SourcePawn language, part deux (replaces #1011)
This commit is contained in:
@@ -1720,6 +1720,13 @@ Smalltalk:
|
|||||||
Smarty:
|
Smarty:
|
||||||
primary_extension: .tpl
|
primary_extension: .tpl
|
||||||
|
|
||||||
|
SourcePawn:
|
||||||
|
type: programming
|
||||||
|
color: "#f69e1d"
|
||||||
|
aliases:
|
||||||
|
- sourcemod
|
||||||
|
primary_extension: .sp
|
||||||
|
|
||||||
Squirrel:
|
Squirrel:
|
||||||
type: programming
|
type: programming
|
||||||
lexer: C++
|
lexer: C++
|
||||||
|
|||||||
@@ -455,6 +455,9 @@
|
|||||||
"Slash": [
|
"Slash": [
|
||||||
".sl"
|
".sl"
|
||||||
],
|
],
|
||||||
|
"SourcePawn": [
|
||||||
|
".sp"
|
||||||
|
],
|
||||||
"Squirrel": [
|
"Squirrel": [
|
||||||
".nut"
|
".nut"
|
||||||
],
|
],
|
||||||
@@ -597,8 +600,8 @@
|
|||||||
".gemrc"
|
".gemrc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tokens_total": 523444,
|
"tokens_total": 525524,
|
||||||
"languages_total": 634,
|
"languages_total": 635,
|
||||||
"tokens": {
|
"tokens": {
|
||||||
"ABAP": {
|
"ABAP": {
|
||||||
"*/**": 1,
|
"*/**": 1,
|
||||||
@@ -49324,6 +49327,343 @@
|
|||||||
"ast.eval": 1,
|
"ast.eval": 1,
|
||||||
"Env.new": 1
|
"Env.new": 1
|
||||||
},
|
},
|
||||||
|
"SourcePawn": {
|
||||||
|
"//#define": 1,
|
||||||
|
"DEBUG": 2,
|
||||||
|
"#if": 1,
|
||||||
|
"defined": 1,
|
||||||
|
"#define": 7,
|
||||||
|
"assert": 2,
|
||||||
|
"(": 233,
|
||||||
|
"%": 18,
|
||||||
|
")": 234,
|
||||||
|
"if": 44,
|
||||||
|
"ThrowError": 2,
|
||||||
|
";": 213,
|
||||||
|
"assert_msg": 2,
|
||||||
|
"#else": 1,
|
||||||
|
"#endif": 1,
|
||||||
|
"#pragma": 1,
|
||||||
|
"semicolon": 1,
|
||||||
|
"#include": 3,
|
||||||
|
"<sourcemod>": 1,
|
||||||
|
"<mapchooser>": 1,
|
||||||
|
"<nextmap>": 1,
|
||||||
|
"public": 21,
|
||||||
|
"Plugin": 1,
|
||||||
|
"myinfo": 1,
|
||||||
|
"{": 73,
|
||||||
|
"name": 7,
|
||||||
|
"author": 1,
|
||||||
|
"description": 1,
|
||||||
|
"version": 1,
|
||||||
|
"SOURCEMOD_VERSION": 1,
|
||||||
|
"url": 1,
|
||||||
|
"}": 71,
|
||||||
|
"new": 62,
|
||||||
|
"Handle": 51,
|
||||||
|
"g_Cvar_Winlimit": 5,
|
||||||
|
"INVALID_HANDLE": 56,
|
||||||
|
"g_Cvar_Maxrounds": 5,
|
||||||
|
"g_Cvar_Fraglimit": 6,
|
||||||
|
"g_Cvar_Bonusroundtime": 6,
|
||||||
|
"g_Cvar_StartTime": 3,
|
||||||
|
"g_Cvar_StartRounds": 5,
|
||||||
|
"g_Cvar_StartFrags": 3,
|
||||||
|
"g_Cvar_ExtendTimeStep": 2,
|
||||||
|
"g_Cvar_ExtendRoundStep": 2,
|
||||||
|
"g_Cvar_ExtendFragStep": 2,
|
||||||
|
"g_Cvar_ExcludeMaps": 3,
|
||||||
|
"g_Cvar_IncludeMaps": 2,
|
||||||
|
"g_Cvar_NoVoteMode": 2,
|
||||||
|
"g_Cvar_Extend": 2,
|
||||||
|
"g_Cvar_DontChange": 2,
|
||||||
|
"g_Cvar_EndOfMapVote": 8,
|
||||||
|
"g_Cvar_VoteDuration": 3,
|
||||||
|
"g_Cvar_RunOff": 2,
|
||||||
|
"g_Cvar_RunOffPercent": 2,
|
||||||
|
"g_VoteTimer": 7,
|
||||||
|
"g_RetryTimer": 4,
|
||||||
|
"g_MapList": 8,
|
||||||
|
"g_NominateList": 7,
|
||||||
|
"g_NominateOwners": 7,
|
||||||
|
"g_OldMapList": 7,
|
||||||
|
"g_NextMapList": 2,
|
||||||
|
"g_VoteMenu": 1,
|
||||||
|
"g_Extends": 2,
|
||||||
|
"g_TotalRounds": 7,
|
||||||
|
"bool": 10,
|
||||||
|
"g_HasVoteStarted": 7,
|
||||||
|
"g_WaitingForVote": 4,
|
||||||
|
"g_MapVoteCompleted": 9,
|
||||||
|
"g_ChangeMapAtRoundEnd": 6,
|
||||||
|
"g_ChangeMapInProgress": 4,
|
||||||
|
"g_mapFileSerial": 3,
|
||||||
|
"-": 12,
|
||||||
|
"g_NominateCount": 3,
|
||||||
|
"MapChange": 4,
|
||||||
|
"g_ChangeTime": 1,
|
||||||
|
"g_NominationsResetForward": 3,
|
||||||
|
"g_MapVoteStartedForward": 2,
|
||||||
|
"MAXTEAMS": 4,
|
||||||
|
"g_winCount": 4,
|
||||||
|
"[": 19,
|
||||||
|
"]": 19,
|
||||||
|
"VOTE_EXTEND": 1,
|
||||||
|
"VOTE_DONTCHANGE": 1,
|
||||||
|
"OnPluginStart": 1,
|
||||||
|
"LoadTranslations": 2,
|
||||||
|
"arraySize": 5,
|
||||||
|
"ByteCountToCells": 1,
|
||||||
|
"PLATFORM_MAX_PATH": 6,
|
||||||
|
"CreateArray": 5,
|
||||||
|
"CreateConVar": 15,
|
||||||
|
"_": 18,
|
||||||
|
"true": 26,
|
||||||
|
"RegAdminCmd": 2,
|
||||||
|
"Command_Mapvote": 2,
|
||||||
|
"ADMFLAG_CHANGEMAP": 2,
|
||||||
|
"Command_SetNextmap": 2,
|
||||||
|
"FindConVar": 4,
|
||||||
|
"||": 15,
|
||||||
|
"decl": 5,
|
||||||
|
"String": 11,
|
||||||
|
"folder": 5,
|
||||||
|
"GetGameFolderName": 1,
|
||||||
|
"sizeof": 6,
|
||||||
|
"strcmp": 3,
|
||||||
|
"HookEvent": 6,
|
||||||
|
"Event_TeamPlayWinPanel": 3,
|
||||||
|
"Event_TFRestartRound": 2,
|
||||||
|
"else": 5,
|
||||||
|
"Event_RoundEnd": 3,
|
||||||
|
"Event_PlayerDeath": 2,
|
||||||
|
"AutoExecConfig": 1,
|
||||||
|
"//Change": 1,
|
||||||
|
"the": 5,
|
||||||
|
"mp_bonusroundtime": 1,
|
||||||
|
"max": 1,
|
||||||
|
"so": 1,
|
||||||
|
"that": 2,
|
||||||
|
"we": 2,
|
||||||
|
"have": 2,
|
||||||
|
"time": 9,
|
||||||
|
"to": 4,
|
||||||
|
"display": 2,
|
||||||
|
"vote": 6,
|
||||||
|
"//If": 1,
|
||||||
|
"you": 1,
|
||||||
|
"a": 1,
|
||||||
|
"during": 2,
|
||||||
|
"bonus": 2,
|
||||||
|
"good": 1,
|
||||||
|
"defaults": 1,
|
||||||
|
"are": 1,
|
||||||
|
"duration": 1,
|
||||||
|
"and": 1,
|
||||||
|
"mp_bonustime": 1,
|
||||||
|
"SetConVarBounds": 1,
|
||||||
|
"ConVarBound_Upper": 1,
|
||||||
|
"CreateGlobalForward": 2,
|
||||||
|
"ET_Ignore": 2,
|
||||||
|
"Param_String": 1,
|
||||||
|
"Param_Cell": 1,
|
||||||
|
"APLRes": 1,
|
||||||
|
"AskPluginLoad2": 1,
|
||||||
|
"myself": 1,
|
||||||
|
"late": 1,
|
||||||
|
"error": 1,
|
||||||
|
"err_max": 1,
|
||||||
|
"RegPluginLibrary": 1,
|
||||||
|
"CreateNative": 9,
|
||||||
|
"Native_NominateMap": 1,
|
||||||
|
"Native_RemoveNominationByMap": 1,
|
||||||
|
"Native_RemoveNominationByOwner": 1,
|
||||||
|
"Native_InitiateVote": 1,
|
||||||
|
"Native_CanVoteStart": 2,
|
||||||
|
"Native_CheckVoteDone": 2,
|
||||||
|
"Native_GetExcludeMapList": 2,
|
||||||
|
"Native_GetNominatedMapList": 2,
|
||||||
|
"Native_EndOfMapVoteEnabled": 2,
|
||||||
|
"return": 23,
|
||||||
|
"APLRes_Success": 1,
|
||||||
|
"OnConfigsExecuted": 1,
|
||||||
|
"ReadMapList": 1,
|
||||||
|
"MAPLIST_FLAG_CLEARARRAY": 1,
|
||||||
|
"|": 1,
|
||||||
|
"MAPLIST_FLAG_MAPSFOLDER": 1,
|
||||||
|
"LogError": 2,
|
||||||
|
"CreateNextVote": 1,
|
||||||
|
"SetupTimeleftTimer": 3,
|
||||||
|
"false": 8,
|
||||||
|
"ClearArray": 2,
|
||||||
|
"for": 9,
|
||||||
|
"i": 13,
|
||||||
|
"<": 5,
|
||||||
|
"+": 12,
|
||||||
|
"&&": 5,
|
||||||
|
"GetConVarInt": 10,
|
||||||
|
"GetConVarFloat": 2,
|
||||||
|
"<=>": 1,
|
||||||
|
"Warning": 1,
|
||||||
|
"Bonus": 1,
|
||||||
|
"Round": 1,
|
||||||
|
"Time": 2,
|
||||||
|
"shorter": 1,
|
||||||
|
"than": 1,
|
||||||
|
"Vote": 4,
|
||||||
|
"Votes": 1,
|
||||||
|
"round": 1,
|
||||||
|
"may": 1,
|
||||||
|
"not": 1,
|
||||||
|
"complete": 1,
|
||||||
|
"OnMapEnd": 1,
|
||||||
|
"map": 27,
|
||||||
|
"GetCurrentMap": 1,
|
||||||
|
"PushArrayString": 3,
|
||||||
|
"GetArraySize": 8,
|
||||||
|
"RemoveFromArray": 3,
|
||||||
|
"OnClientDisconnect": 1,
|
||||||
|
"client": 9,
|
||||||
|
"index": 8,
|
||||||
|
"FindValueInArray": 1,
|
||||||
|
"oldmap": 4,
|
||||||
|
"GetArrayString": 3,
|
||||||
|
"Call_StartForward": 1,
|
||||||
|
"Call_PushString": 1,
|
||||||
|
"Call_PushCell": 1,
|
||||||
|
"GetArrayCell": 2,
|
||||||
|
"Call_Finish": 1,
|
||||||
|
"Action": 3,
|
||||||
|
"args": 3,
|
||||||
|
"ReplyToCommand": 2,
|
||||||
|
"Plugin_Handled": 4,
|
||||||
|
"GetCmdArg": 1,
|
||||||
|
"IsMapValid": 1,
|
||||||
|
"ShowActivity": 1,
|
||||||
|
"LogAction": 1,
|
||||||
|
"SetNextMap": 1,
|
||||||
|
"OnMapTimeLeftChanged": 1,
|
||||||
|
"GetMapTimeLeft": 1,
|
||||||
|
"startTime": 4,
|
||||||
|
"*": 1,
|
||||||
|
"GetConVarBool": 6,
|
||||||
|
"InitiateVote": 8,
|
||||||
|
"MapChange_MapEnd": 6,
|
||||||
|
"KillTimer": 1,
|
||||||
|
"//g_VoteTimer": 1,
|
||||||
|
"CreateTimer": 3,
|
||||||
|
"float": 2,
|
||||||
|
"Timer_StartMapVote": 3,
|
||||||
|
"TIMER_FLAG_NO_MAPCHANGE": 4,
|
||||||
|
"data": 8,
|
||||||
|
"CreateDataTimer": 1,
|
||||||
|
"WritePackCell": 2,
|
||||||
|
"ResetPack": 1,
|
||||||
|
"timer": 2,
|
||||||
|
"Plugin_Stop": 2,
|
||||||
|
"mapChange": 2,
|
||||||
|
"ReadPackCell": 2,
|
||||||
|
"hndl": 2,
|
||||||
|
"event": 11,
|
||||||
|
"const": 4,
|
||||||
|
"dontBroadcast": 4,
|
||||||
|
"Timer_ChangeMap": 2,
|
||||||
|
"bluescore": 2,
|
||||||
|
"GetEventInt": 7,
|
||||||
|
"redscore": 2,
|
||||||
|
"StrEqual": 1,
|
||||||
|
"CheckMaxRounds": 3,
|
||||||
|
"switch": 1,
|
||||||
|
"case": 2,
|
||||||
|
"CheckWinLimit": 4,
|
||||||
|
"//We": 1,
|
||||||
|
"need": 2,
|
||||||
|
"do": 1,
|
||||||
|
"nothing": 1,
|
||||||
|
"on": 1,
|
||||||
|
"winning_team": 1,
|
||||||
|
"this": 1,
|
||||||
|
"indicates": 1,
|
||||||
|
"stalemate.": 1,
|
||||||
|
"default": 1,
|
||||||
|
"winner": 9,
|
||||||
|
"//": 3,
|
||||||
|
"Nuclear": 1,
|
||||||
|
"Dawn": 1,
|
||||||
|
"SetFailState": 1,
|
||||||
|
"winner_score": 2,
|
||||||
|
"winlimit": 3,
|
||||||
|
"roundcount": 2,
|
||||||
|
"maxrounds": 3,
|
||||||
|
"fragger": 3,
|
||||||
|
"GetClientOfUserId": 1,
|
||||||
|
"GetClientFrags": 1,
|
||||||
|
"when": 2,
|
||||||
|
"inputlist": 1,
|
||||||
|
"IsVoteInProgress": 1,
|
||||||
|
"Can": 1,
|
||||||
|
"t": 7,
|
||||||
|
"be": 1,
|
||||||
|
"excluded": 1,
|
||||||
|
"from": 1,
|
||||||
|
"as": 2,
|
||||||
|
"they": 1,
|
||||||
|
"weren": 1,
|
||||||
|
"nominationsToAdd": 1,
|
||||||
|
"Change": 2,
|
||||||
|
"Extend": 2,
|
||||||
|
"Map": 5,
|
||||||
|
"Voting": 7,
|
||||||
|
"next": 5,
|
||||||
|
"has": 5,
|
||||||
|
"started.": 1,
|
||||||
|
"SM": 5,
|
||||||
|
"Nextmap": 5,
|
||||||
|
"Started": 1,
|
||||||
|
"Current": 2,
|
||||||
|
"Extended": 1,
|
||||||
|
"finished.": 3,
|
||||||
|
"The": 1,
|
||||||
|
"current": 1,
|
||||||
|
"been": 1,
|
||||||
|
"extended.": 1,
|
||||||
|
"Stays": 1,
|
||||||
|
"was": 3,
|
||||||
|
"Finished": 1,
|
||||||
|
"s.": 1,
|
||||||
|
"Runoff": 2,
|
||||||
|
"Starting": 2,
|
||||||
|
"indecisive": 1,
|
||||||
|
"beginning": 1,
|
||||||
|
"runoff": 1,
|
||||||
|
"T": 3,
|
||||||
|
"Dont": 1,
|
||||||
|
"because": 1,
|
||||||
|
"outside": 1,
|
||||||
|
"request": 1,
|
||||||
|
"inputarray": 1,
|
||||||
|
"plugin": 5,
|
||||||
|
"numParams": 5,
|
||||||
|
"CanVoteStart": 1,
|
||||||
|
"array": 3,
|
||||||
|
"GetNativeCell": 3,
|
||||||
|
"size": 2,
|
||||||
|
"maparray": 3,
|
||||||
|
"ownerarray": 3,
|
||||||
|
"If": 1,
|
||||||
|
"optional": 1,
|
||||||
|
"parameter": 1,
|
||||||
|
"an": 1,
|
||||||
|
"owner": 1,
|
||||||
|
"list": 1,
|
||||||
|
"passed": 1,
|
||||||
|
"then": 1,
|
||||||
|
"fill": 1,
|
||||||
|
"out": 1,
|
||||||
|
"well": 1,
|
||||||
|
"PushArrayCell": 1
|
||||||
|
},
|
||||||
"Squirrel": {
|
"Squirrel": {
|
||||||
"//example": 1,
|
"//example": 1,
|
||||||
"from": 1,
|
"from": 1,
|
||||||
@@ -54106,6 +54446,7 @@
|
|||||||
"Shell": 3744,
|
"Shell": 3744,
|
||||||
"Shen": 3472,
|
"Shen": 3472,
|
||||||
"Slash": 187,
|
"Slash": 187,
|
||||||
|
"SourcePawn": 2080,
|
||||||
"Squirrel": 130,
|
"Squirrel": 130,
|
||||||
"Standard ML": 6405,
|
"Standard ML": 6405,
|
||||||
"Stylus": 76,
|
"Stylus": 76,
|
||||||
@@ -54264,6 +54605,7 @@
|
|||||||
"Shell": 37,
|
"Shell": 37,
|
||||||
"Shen": 3,
|
"Shen": 3,
|
||||||
"Slash": 1,
|
"Slash": 1,
|
||||||
|
"SourcePawn": 1,
|
||||||
"Squirrel": 1,
|
"Squirrel": 1,
|
||||||
"Standard ML": 4,
|
"Standard ML": 4,
|
||||||
"Stylus": 1,
|
"Stylus": 1,
|
||||||
@@ -54290,5 +54632,5 @@
|
|||||||
"Xtend": 2,
|
"Xtend": 2,
|
||||||
"YAML": 2
|
"YAML": 2
|
||||||
},
|
},
|
||||||
"md5": "856e1bcc53c067f8a7e56e6aa1563b0e"
|
"md5": "bea2304b61e5920c044b83aec7788dd8"
|
||||||
}
|
}
|
||||||
1192
samples/SourcePawn/foo.sp
Normal file
1192
samples/SourcePawn/foo.sp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user