No description
Find a file
Charles fdfb19bab5 Add test.
'Alias' is a keyword only inside a declare statement; this test checks that it is highlighted as an an identifier when used outside a declare.

Signed-off-by: Charles <charles@declareSub.com>
2015-07-26 15:31:42 -04:00
pygments_xojo Add test. 2015-07-26 15:31:42 -04:00
.gitignore Initial commit. 2015-07-24 11:25:49 -04:00
LICENSE Initial commit 2015-07-24 11:28:40 -04:00
make_virtualenv.bash make_virtualenv.bash now looks for python2, python3, and skips .venv creation if python version is not installed. 2015-07-24 12:30:43 -04:00
pytest.ini Initial commit. 2015-07-24 11:25:49 -04:00
README.md Add a bit more information. 2015-07-24 12:48:46 -04:00
requirements.txt Initial commit. 2015-07-24 11:25:49 -04:00
setup.py Fix typos. 2015-07-26 14:59:22 -04:00
tox.ini Initial commit. 2015-07-24 11:25:49 -04:00

Pygments-Xojo

Pygments-Xojo implements Xojo language markup for Pygments, the Python syntax highlighter.

To try it out, clone this repository to your computer. Pygments requires Python >= 2.6 or >= 3.3, so you'll need the same, plus pip and virtualenv. The project is set up to use tox for testing, but as of now there is only one smoke test, so you can skip this.

Once your Python world is configured, run the script make_virtualenv.bash. This will create virtual environments for Python2 and Python3, if installed. To activate a virtual environment, open a Terminal window and cd to the repository directory. Then execute the following command (assuming you want to use Python 2).

source python2.env/bin/activate

You can format some Xojo code in a file /path/to/foo as follows.

pygmentize -f html  -l xojo /path/to/foo

which writes output to stdout, or

pygmentize -f html  -l xojo /path/to/foo /path/to/foo.html

which writes the output to a file that you can view in the browser of your choice.