14.07.2012, 13:34
(
Last edited by Slice; 14/07/2012 at 03:45 PM.
)
This is mainly meant for automatically creating syntax-highlighting based on your own code.
Quick example:
Output:
The code is well-documented, go have a look.
Hosted on GitHub, get it here.
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";
?>
Code:
native SetPlayerPos(playerid, Float:x, Float:y, Float:z) SetPlayerPos playerid, Float:x, Float:y, Float:z Float:x Float
Hosted on GitHub, get it here.




great work! 