Go to the source code of this file.
|
| $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php" |
|
◆ convert()
Definition at line 137 of file HFile_conv.php.
References $argv, $file, $out, and HFile_print_php_file().
Referenced by dump_hash(), and showHelp().
141 $LANGNAME = str_replace(
".txt",
"", $LANGNAME);
143 $fileout =
'../object/'.$LANGNAME .
'.php';
145 print
"Writing $file to $fileout\n";
147 HFile_parse_file(
$file);
150 ob_implicit_flush(0);
153 $out = ob_get_contents();
158 $fd = fopen($fileout,
"w");
HFile_print_php_file($tofile=1)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ dump_array()
dump_array |
( |
|
$array, |
|
|
|
$name |
|
) |
| |
◆ dump_colours()
◆ dump_hash()
dump_hash |
( |
|
$hash, |
|
|
|
$name |
|
) |
| |
Definition at line 124 of file HFile_conv.php.
Referenced by dump_linkscripts(), and HFile_print_php_file().
127 print $name.
" = array(";
128 foreach(array_keys($hash) as $k)
130 if (!$first) print
", ";
else $first = 0;
131 print
"\n \"".addslashes($k).
"\"";
132 print
" => \"".addslashes($hash[$k]).
"\"";
◆ dump_linkscripts()
dump_linkscripts |
( |
|
$cats | ) |
|
Definition at line 75 of file HFile_conv.php.
References array, and dump_hash().
Referenced by HFile_print_php_file().
78 // Each category can specify a PHP function that returns an altered 79 // version of the keyword. 80 # This link is then placed in a <a href=\"...\">foo</a>; structure around keyword 'foo' - which is 87 $linkhash{$c} =
"donothing";
90 dump_hash($linkhash,
"\$this->linkscripts ");
91 print
"}\n# DoNothing link function\n\n";
92 print
"function donothing(\$keywordin)\n{\n return \$keywordin;\n}\n";
Create styles array
The data for the language used.
◆ dump_var()
dump_var |
( |
|
$variable, |
|
|
|
$name |
|
) |
| |
◆ get_categories()
Definition at line 62 of file HFile_conv.php.
References array.
Referenced by HFile_print_php_file().
67 foreach(array_keys($keywords) as $k)
70 if (!in_array($cat, $usedcats)) array_push($usedcats, $cat);
Create styles array
The data for the language used.
◆ HFile_print_php_file()
HFile_print_php_file |
( |
|
$tofile = 1 | ) |
|
Definition at line 14 of file HFile_conv.php.
References $config, dump_array(), dump_colours(), dump_hash(), dump_linkscripts(), dump_var(), and get_categories().
Referenced by convert().
18 global $indent, $unindent, $stringchars,
$config, $keywords, $delimiters, $lang_name;
19 global $linecommenton, $blockcommenton, $blockcommentoff;
20 global $perl, $nocase, $notrim;
21 if ($tofile) print
"<?php\n";
else print
"<?\n";
23 print
'require_once(\'HFile.php\');'.
"\n";
24 print
' class HFile_'.$LANGNAME.
' extends HFile{'.
"\n";
25 print
' function HFile_'.$LANGNAME.
'(){'.
"\n";
26 print
' $this->HFile(); '.
"\n";
30 print
"######################################\n";
31 print
"# Beautifier Highlighting Configuration File \n";
32 print
"# $lang_name\n";
33 print
"######################################\n";
35 dump_var($nocase,
"\$this->nocase ");
36 dump_var($notrim,
"\$this->notrim ");
38 print
"\n# Colours\n\n";
41 dump_var(
"blue",
"\$this->quotecolour ");
42 dump_var(
"green",
"\$this->blockcommentcolour");
43 dump_var(
"green",
"\$this->linecommentcolour ");
44 print
"\n# Indent Strings\n\n";
47 print
"\n# String characters and delimiters\n\n";
48 dump_array($stringchars,
"\$this->stringchars ");
49 dump_array($delimiters,
"\$this->delimiters ");
50 dump_var ($escchar,
"\$this->escchar ");
51 print
"\n# Comment settings\n\n";
52 dump_var ($linecommenton,
"\$this->linecommenton ");
53 dump_var ($blockcommenton,
"\$this->blockcommenton ");
54 dump_var ($blockcommentoff,
"\$this->blockcommentoff ");
55 print
"\n# Keywords (keyword mapping to colour number)\n\n";
56 dump_hash ($keywords,
"\$this->keywords ");
57 print
"\n# Special extensions\n";
59 if ($tofile) print
"\n}?>";
else print
"}\n?>";
dump_array($array, $name)
dump_var($variable, $name)
◆ $BEAUT_PATH
$BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php" |