[Tool/Web/Other] PAWN Scanner - Scan PAWN files for information.
#1

This is mainly meant for automatically creating syntax-highlighting based on your own code.

Quick example:
Code:
<?php
	include 'PAWNScanner.php';

	$scanner = new PAWNScanner\Scanner();

	$scanner->scan_dir('include', 'a_npc.inc');

	// Most things can be casted to strings
	echo $scanner->functions['SetPlayerPos'] . "\n";

	// They're split into pieces, however.
	echo $scanner->functions['SetPlayerPos']->name . "\n";
	echo $scanner->functions['SetPlayerPos']->arguments . "\n";

	// Argument lists are subclasses of VariableList.
	echo $scanner->functions['SetPlayerPos']->arguments->variables[1] . "\n";
	echo $scanner->functions['SetPlayerPos']->arguments->variables[1]->tags . "\n";
?>
Output:
Code:
native SetPlayerPos(playerid, Float:x, Float:y, Float:z)
SetPlayerPos
playerid, Float:x, Float:y, Float:z
Float:x
Float
The code is well-documented, go have a look.

Hosted on GitHub, get it here.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)